From 9655a39ef82d1b9418e3b97443d23b2749f89fda Mon Sep 17 00:00:00 2001 From: Dong <1278815766@qq.com> Date: Mon, 12 May 2025 01:57:28 +0800 Subject: [PATCH] =?UTF-8?q?refactor(Form1.cs):=20=E7=A7=BB=E9=99=A4?= =?UTF-8?q?=E5=A4=9A=E4=BD=99=E7=9A=84=E8=BF=9B=E5=BA=A6=E6=9B=B4=E6=96=B0?= =?UTF-8?q?=E8=B0=83=E7=94=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 移除在验证在线数据和比较MD5文件后多余的`UpdateProgressValue`调用,以简化代码逻辑并避免重复更新进度 --- Form1.cs | 2 -- 1 file changed, 2 deletions(-) diff --git a/Form1.cs b/Form1.cs index 1ffd7ef..b23e652 100644 --- a/Form1.cs +++ b/Form1.cs @@ -111,7 +111,6 @@ namespace CheckDownload OssClient client = new OssClient(OssEndpoint, OssAccessKeyId, OssAccessKeySecret); var onlineData = ReadOnlineMd5File(client, OssBucketName, Md5File); if (!ValidateOnlineData(onlineData.Version, onlineData.Md5, onlineData.Data)) return; - UpdateProgressValue(++currentStep * 100 / totalSteps); UpdateStatus("比较本地和在线MD5文件..."); var compareResult = CompareMd5Data(onlineData.Data); @@ -123,7 +122,6 @@ namespace CheckDownload this.Close(); return; } - UpdateProgressValue(++currentStep * 100 / totalSteps); UpdateStatus("下载并验证文件..."); _totalCount = compareResult.Count;