關機按鈕(改版未測試)
This commit is contained in:
parent
7e1c471ee6
commit
397d8f9e5a
@ -8,8 +8,13 @@ namespace DualScreenDemo
|
||||
public class CommandHandler
|
||||
{
|
||||
public static bool readyForSongListInput = false;
|
||||
/* 關機 queue */
|
||||
private readonly int _maxHistoryLength = 6; // 最多保留 6 筆
|
||||
private readonly Queue<string> _indataHistory = new Queue<string>();
|
||||
|
||||
private int _wrongInputCountfor62 = 0; // 錯誤輸入計數器
|
||||
private int _wrongInputCountfor61 = 0; // 錯誤輸入計數器
|
||||
private const int MaxWrongLimit = 3; // 錯誤輸入限制次數
|
||||
private readonly SongListManager songListManager;
|
||||
|
||||
public CommandHandler(SongListManager songListManager)
|
||||
@ -332,7 +337,16 @@ namespace DualScreenDemo
|
||||
else
|
||||
{
|
||||
ClearDisplay();
|
||||
OverlayForm.MainForm.displayLabel.Text = "輸入錯誤!!!";
|
||||
_wrongInputCountfor61++;
|
||||
if(_wrongInputCountfor61 <= MaxWrongLimit)
|
||||
{
|
||||
OverlayForm.MainForm.displayLabel.Text += "#";
|
||||
}
|
||||
else
|
||||
{
|
||||
OverlayForm.MainForm.displayLabel.Text = "輸入錯誤!!!";
|
||||
_wrongInputCountfor61 = 0; // 重置計數器
|
||||
}
|
||||
OverlayForm.MainForm.nextSongLabel.Visible = false;
|
||||
OverlayForm.displayTimer.Start();
|
||||
}
|
||||
@ -351,7 +365,16 @@ namespace DualScreenDemo
|
||||
else
|
||||
{
|
||||
ClearDisplay();
|
||||
OverlayForm.MainForm.displayLabel.Text = "輸入錯誤!!!";
|
||||
_wrongInputCountfor61++;
|
||||
if(_wrongInputCountfor61 <= MaxWrongLimit)
|
||||
{
|
||||
OverlayForm.MainForm.displayLabel.Text += "#";
|
||||
}
|
||||
else
|
||||
{
|
||||
OverlayForm.MainForm.displayLabel.Text = "輸入錯誤!!!";
|
||||
_wrongInputCountfor61 = 0; // 重置計數器
|
||||
}
|
||||
OverlayForm.MainForm.nextSongLabel.Visible = false;
|
||||
OverlayForm.displayTimer.Start();
|
||||
}
|
||||
@ -404,7 +427,16 @@ namespace DualScreenDemo
|
||||
else
|
||||
{
|
||||
ClearDisplay();
|
||||
OverlayForm.MainForm.displayLabel.Text = "輸入錯誤!!!";
|
||||
_wrongInputCountfor62++;
|
||||
if(_wrongInputCountfor62 <= MaxWrongLimit)
|
||||
{
|
||||
OverlayForm.MainForm.displayLabel.Text += "*";
|
||||
}
|
||||
else
|
||||
{
|
||||
OverlayForm.MainForm.displayLabel.Text = "輸入錯誤!!!";
|
||||
_wrongInputCountfor62 = 0; // 重置計數器
|
||||
}
|
||||
OverlayForm.MainForm.nextSongLabel.Visible = false;
|
||||
OverlayForm.displayTimer.Start();
|
||||
}
|
||||
@ -421,7 +453,16 @@ namespace DualScreenDemo
|
||||
else
|
||||
{
|
||||
ClearDisplay();
|
||||
OverlayForm.MainForm.displayLabel.Text = "輸入錯誤!!!";
|
||||
_wrongInputCountfor62++;
|
||||
if(_wrongInputCountfor62 <= MaxWrongLimit)
|
||||
{
|
||||
OverlayForm.MainForm.displayLabel.Text += "*";
|
||||
}
|
||||
else
|
||||
{
|
||||
OverlayForm.MainForm.displayLabel.Text = "輸入錯誤!!!";
|
||||
_wrongInputCountfor62 = 0; // 重置計數器
|
||||
}
|
||||
OverlayForm.MainForm.nextSongLabel.Visible = false;
|
||||
OverlayForm.displayTimer.Start();
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user