Browse Source

fix: 优化进度条的观感

master
niushuai233 3 years ago
parent
commit
544dd21993
  1. 4
      MainForm.Designer.cs
  2. 6
      Util/SteamGuardCalcThread.cs

4
MainForm.Designer.cs generated

@ -95,11 +95,11 @@ namespace steam_token
this.progressBar_refresh.BackColor = System.Drawing.SystemColors.Control; this.progressBar_refresh.BackColor = System.Drawing.SystemColors.Control;
this.progressBar_refresh.ForeColor = System.Drawing.SystemColors.Control; this.progressBar_refresh.ForeColor = System.Drawing.SystemColors.Control;
this.progressBar_refresh.Location = new System.Drawing.Point(12, 28); this.progressBar_refresh.Location = new System.Drawing.Point(12, 28);
this.progressBar_refresh.Maximum = 30; this.progressBar_refresh.Maximum = 3000;
this.progressBar_refresh.Name = "progressBar_refresh"; this.progressBar_refresh.Name = "progressBar_refresh";
this.progressBar_refresh.Size = new System.Drawing.Size(620, 23); this.progressBar_refresh.Size = new System.Drawing.Size(620, 23);
this.progressBar_refresh.TabIndex = 2; this.progressBar_refresh.TabIndex = 2;
this.progressBar_refresh.Value = 30; this.progressBar_refresh.Value = 3000;
// //
// groupBox_display // groupBox_display
// //

6
Util/SteamGuardCalcThread.cs

@ -51,13 +51,13 @@ namespace steam_token.Util
return; return;
} }
CalcOnce(); CalcOnce();
for (int i = 30; i >= 0; i--) for (int i = 3000; i >= 0; i--)
{ {
Thread.Sleep(1000); Thread.Sleep(1);
if (i == 0) if (i == 0)
{ {
CalcOnce(); CalcOnce();
i = 30; i = 3000;
} }
progressBar_refresh.Value = i; progressBar_refresh.Value = i;

Loading…
Cancel
Save