標籤刷新更改方式
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 更新邏輯
|
||||
Console.WriteLine("SongDisplayTimer_Tick invoked on UI thread.");
|
||||
|
||||
MainForm.Invoke(new System.Action(() =>
|
||||
MainForm.BeginInvoke(new Action(() =>
|
||||
{
|
||||
// 清除目前歌曲的顯示標籤文字
|
||||
MainForm.songDisplayLabel.Text = "";
|
||||
if (MainForm.songDisplayLabel != null)
|
||||
MainForm.songDisplayLabel.Text = "";
|
||||
|
||||
// 顯示下一首歌的標籤
|
||||
MainForm.nextSongLabel.Visible = true;
|
||||
if (MainForm.nextSongLabel != null)
|
||||
MainForm.nextSongLabel.Visible = true;
|
||||
}));
|
||||
}
|
||||
else
|
||||
|
Loading…
x
Reference in New Issue
Block a user