標籤刷新更改方式
This commit is contained in:
parent
7eb8f395a0
commit
5db51dda99
@ -450,13 +450,13 @@ private static void SongDisplayTimer_Elapsed(object sender, EventArgs e)
|
|||||||
// 如果目前不在 UI 執行緒上,必須透過 Invoke 安全執行 UI 更新邏輯
|
// 如果目前不在 UI 執行緒上,必須透過 Invoke 安全執行 UI 更新邏輯
|
||||||
Console.WriteLine("SongDisplayTimer_Tick invoked on UI thread.");
|
Console.WriteLine("SongDisplayTimer_Tick invoked on UI thread.");
|
||||||
|
|
||||||
MainForm.Invoke(new System.Action(() =>
|
MainForm.BeginInvoke(new Action(() =>
|
||||||
{
|
{
|
||||||
// 清除目前歌曲的顯示標籤文字
|
if (MainForm.songDisplayLabel != null)
|
||||||
MainForm.songDisplayLabel.Text = "";
|
MainForm.songDisplayLabel.Text = "";
|
||||||
|
|
||||||
// 顯示下一首歌的標籤
|
if (MainForm.nextSongLabel != null)
|
||||||
MainForm.nextSongLabel.Visible = true;
|
MainForm.nextSongLabel.Visible = true;
|
||||||
}));
|
}));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
Loading…
x
Reference in New Issue
Block a user