From bf178b4575bce251cb5321220e7e6be112230d6f Mon Sep 17 00:00:00 2001 From: niushuai233 Date: Fri, 16 Sep 2022 17:04:53 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E7=AC=AC=E4=B8=80=E6=AC=A1=E5=90=AF?= =?UTF-8?q?=E5=8A=A8=E4=B8=8D=E6=8F=90=E7=A4=BA=E9=94=99=E8=AF=AF=E4=BF=A1?= =?UTF-8?q?=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- MainForm.Designer.cs | 2 +- MainForm.cs | 3 +-- Util/CommonUtil.cs | 1 + Util/SteamTwoFactorToken.cs | 6 +++++- 4 files changed, 8 insertions(+), 4 deletions(-) diff --git a/MainForm.Designer.cs b/MainForm.Designer.cs index 4faf45e..81017a7 100644 --- a/MainForm.Designer.cs +++ b/MainForm.Designer.cs @@ -185,7 +185,7 @@ namespace steam_token this.MinimizeBox = false; this.Name = "MainForm"; this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; - this.Text = "Steam令牌计算器"; + this.Text = "Steam令牌计算器 v1.0"; this.FormClosed += new System.Windows.Forms.FormClosedEventHandler(this.mainForm_FormClosed); this.menuStrip.ResumeLayout(false); this.menuStrip.PerformLayout(); diff --git a/MainForm.cs b/MainForm.cs index 488147b..452d703 100644 --- a/MainForm.cs +++ b/MainForm.cs @@ -23,13 +23,12 @@ namespace steam_token ConfigUtil.Init(new Config()); InitializeComponent(); - this.timer_time.Start(); - while (!ConfigUtil.INIT_SUCCESS) { CheckConfig(); } + this.timer_time.Start(); // 新开一个线程去初始化数据 SteamGuardCalcThread.StartThread(this.label_guard, this.progressBar_refresh); } diff --git a/Util/CommonUtil.cs b/Util/CommonUtil.cs index 4f5ea4d..307ce9c 100644 --- a/Util/CommonUtil.cs +++ b/Util/CommonUtil.cs @@ -11,6 +11,7 @@ namespace steam_token.Util public class CommonUtil { + public static bool FIRST_ENABLE = true; public static Config GetConfig() { return ConfigUtil.Read(); diff --git a/Util/SteamTwoFactorToken.cs b/Util/SteamTwoFactorToken.cs index 69b3f3e..629c577 100644 --- a/Util/SteamTwoFactorToken.cs +++ b/Util/SteamTwoFactorToken.cs @@ -47,7 +47,11 @@ namespace steam_token.Util } catch (Exception) { - MessageBox.Show("shared_secret值校验失败, 请重新设置"); + if (!CommonUtil.FIRST_ENABLE) + { + MessageBox.Show("shared_secret值校验失败, 请重新设置"); + } + CommonUtil.FIRST_ENABLE = false; return false; } }