diff --git a/CommandHandler.cs b/CommandHandler.cs index 34c992d..e69dcc9 100644 --- a/CommandHandler.cs +++ b/CommandHandler.cs @@ -41,6 +41,9 @@ namespace DualScreenDemo break; case "A263A4": ClearDisplay(); + _wrongInputCountfor62 = 0; // 重置計數器 + _wrongInputCountfor61 = 0; // 重置計數器 + _indataHistory.Clear(); // 清空歷史紀錄 break; case "A268A4": OverlayForm.MainForm.currentPage = 1; @@ -343,11 +346,13 @@ namespace DualScreenDemo _wrongInputCountfor61++; if(_wrongInputCountfor61 <= MaxWrongLimit) { - OverlayForm.MainForm.displayLabel.Text += "#"; + string old =""; + OverlayForm.MainForm.displayLabel.Text = check_control(old); } else { OverlayForm.MainForm.displayLabel.Text = "輸入錯誤!!!"; + _indataHistory.Clear(); // 清空歷史紀錄 _wrongInputCountfor61 = 0; // 重置計數器 } OverlayForm.MainForm.nextSongLabel.Visible = false; @@ -371,11 +376,13 @@ namespace DualScreenDemo _wrongInputCountfor61++; if(_wrongInputCountfor61 <= MaxWrongLimit) { - OverlayForm.MainForm.displayLabel.Text += "#"; + string old =""; + OverlayForm.MainForm.displayLabel.Text = check_control(old); } else { OverlayForm.MainForm.displayLabel.Text = "輸入錯誤!!!"; + _indataHistory.Clear(); // 清空歷史紀錄 _wrongInputCountfor61 = 0; // 重置計數器 } OverlayForm.MainForm.nextSongLabel.Visible = false; @@ -385,6 +392,16 @@ namespace DualScreenDemo } } + private string check_control(string old){ + foreach(string item in _indataHistory) + { + if(item == "A261A4") + old += "#"; + else if(item == "A262A4") + old += "*"; + } + return old; + } private void HandleInputB() { @@ -433,11 +450,13 @@ namespace DualScreenDemo _wrongInputCountfor62++; if(_wrongInputCountfor62 <= MaxWrongLimit) { - OverlayForm.MainForm.displayLabel.Text += "*"; + string old =""; + OverlayForm.MainForm.displayLabel.Text = check_control(old); } else { OverlayForm.MainForm.displayLabel.Text = "輸入錯誤!!!"; + _indataHistory.Clear(); // 清空歷史紀錄 _wrongInputCountfor62 = 0; // 重置計數器 } OverlayForm.MainForm.nextSongLabel.Visible = false; @@ -459,11 +478,13 @@ namespace DualScreenDemo _wrongInputCountfor62++; if(_wrongInputCountfor62 <= MaxWrongLimit) { - OverlayForm.MainForm.displayLabel.Text += "*"; + string old =""; + OverlayForm.MainForm.displayLabel.Text = check_control(old); } else { OverlayForm.MainForm.displayLabel.Text = "輸入錯誤!!!"; + _indataHistory.Clear(); // 清空歷史紀錄 _wrongInputCountfor62 = 0; // 重置計數器 } OverlayForm.MainForm.nextSongLabel.Visible = false; @@ -475,9 +496,8 @@ namespace DualScreenDemo private static void ClearDisplay() { - OverlayForm.displayTimer.Stop(); - + if (OverlayForm.MainForm.InvokeRequired) { diff --git a/bin/WelcomeMessage.txt b/bin/WelcomeMessage.txt index 016907b..3ab46c9 100644 --- a/bin/WelcomeMessage.txt +++ b/bin/WelcomeMessage.txt @@ -1 +1 @@ -歡迎使用超級巨星歡唱網路版系統,與你共度美好時光。 \ No newline at end of file +歡迎使用網路版系統,與你共度美好時光。 \ No newline at end of file