刪除修正
This commit is contained in:
parent
be3f05122d
commit
612f995b4f
@ -174,8 +174,10 @@ namespace DualScreenDemo
|
||||
private static Bitmap resizedMouseDownImageForHotSong;
|
||||
|
||||
private PictureBox serviceBellPictureBox; // 添加为类成员变量
|
||||
|
||||
private Timer autoRefreshTimer;
|
||||
private TimeSpan remainingTime;
|
||||
private Timer timerCountdown;
|
||||
string Rtime;
|
||||
|
||||
//private Label pageNumberLabel; // 添加頁碼標籤
|
||||
public PrimaryForm()
|
||||
@ -226,6 +228,11 @@ namespace DualScreenDemo
|
||||
multiPagePanel.PageIndexChanged += HandlePageChanged;
|
||||
// 添加 Load 事件處理
|
||||
this.Load += PrimaryForm_Load;
|
||||
|
||||
timerCountdown = new Timer();
|
||||
timerCountdown.Interval = 1000; // 1 second
|
||||
timerCountdown.Tick += TimerCountdown_Tick;
|
||||
|
||||
}
|
||||
|
||||
// 添加 DPI 感知支持
|
||||
@ -245,6 +252,34 @@ namespace DualScreenDemo
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public void RoomTimeStart()
|
||||
{
|
||||
//DateTime now = DateTime.Now;
|
||||
//DateTime tenMinutesLater = now.AddMinutes(120);
|
||||
//remainingTime = tenMinutesLater - now;
|
||||
remainingTime = Program.room.timePeriod;
|
||||
timerCountdown.Start();
|
||||
}
|
||||
|
||||
private async void TimerCountdown_Tick(object sender, EventArgs e)
|
||||
{
|
||||
if (remainingTime.TotalSeconds > 0)
|
||||
{
|
||||
remainingTime = remainingTime.Subtract(TimeSpan.FromSeconds(1));
|
||||
Rtime = remainingTime.ToString(@"hh\:mm\:ss");
|
||||
this.Invalidate();
|
||||
}
|
||||
else
|
||||
{
|
||||
timerCountdown.Stop();
|
||||
await Task.Delay(10000);
|
||||
Program.room.setDB("closed");
|
||||
Program.room.set("");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private void PrimaryForm_Paint(object sender, PaintEventArgs e)
|
||||
{
|
||||
// 取得本機電腦的主機名稱 (hostname)
|
||||
@ -252,7 +287,7 @@ namespace DualScreenDemo
|
||||
string version = Program.verSion;
|
||||
// 顯示包廂名稱
|
||||
// 取主機名稱的最後 20 個字元 (如果長度不足 20,則取全部)
|
||||
string displayName = "包廂" + hostName.Substring(Math.Max(0, hostName.Length - 3));
|
||||
string displayName = "包廂" + hostName.Substring(Math.Max(0, hostName.Length - 3)) + " " + Rtime;
|
||||
string totalPages = multiPagePanel.totalPages.ToString() == "0" ? "1" : multiPagePanel.totalPages.ToString();
|
||||
string pageNumber = (multiPagePanel.currentPageIndex + 1).ToString() + "/" + totalPages;
|
||||
|
||||
@ -509,7 +544,7 @@ namespace DualScreenDemo
|
||||
InitializeButtonsForFavoritePictureBox();
|
||||
InitializePromotionsButton();
|
||||
InitializeButtonsForPictureBoxToggleLight();
|
||||
InitializeButtonsForVodScreenPictureBox();
|
||||
//InitializeButtonsForVodScreenPictureBox();
|
||||
InitializeSoundEffectButtons();
|
||||
InitializeSyncScreen();
|
||||
|
||||
@ -1111,9 +1146,11 @@ namespace DualScreenDemo
|
||||
ReplayButton_Click);
|
||||
|
||||
|
||||
pauseButton = new Button{
|
||||
pauseButton = new Button
|
||||
{
|
||||
Text = "",
|
||||
Name = "pauseButton" };
|
||||
Name = "pauseButton"
|
||||
};
|
||||
ConfigureButton(pauseButton, 456, 738, 93, 62,
|
||||
new Bitmap(Path.Combine(serverPath, "themes\\superstar\\button\\1.主類別\\主類別下方_暫停.png")),
|
||||
new Bitmap(Path.Combine(serverPath, "themes\\superstar\\button\\1.主類別\\主類別下方_暫停.png")),
|
||||
@ -1328,6 +1365,8 @@ namespace DualScreenDemo
|
||||
|
||||
public void Label_Click(object sender, EventArgs e)
|
||||
{
|
||||
InitializeButtonsForVodScreenPictureBox();
|
||||
|
||||
var data = LoadConfigData();
|
||||
var label = sender as Label;
|
||||
if (label != null && label.Tag is SongData)
|
||||
@ -1661,16 +1700,7 @@ namespace DualScreenDemo
|
||||
{
|
||||
var data = LoadConfigData();
|
||||
|
||||
newSongAlertButton.BackgroundImage = newSongAlertNormalBackground;
|
||||
hotPlayButton.BackgroundImage = hotPlayNormalBackground;
|
||||
singerSearchButton.BackgroundImage = singerSearchNormalBackground;
|
||||
songSearchButton.BackgroundImage = songSearchNormalBackground;
|
||||
languageSearchButton.BackgroundImage = languageSearchNormalBackground;
|
||||
groupSearchButton.BackgroundImage = groupSearchNormalBackground;
|
||||
categorySearchButton.BackgroundImage = categorySearchNormalBackground;
|
||||
orderedSongsButton.BackgroundImage = orderedSongsNormalBackground;
|
||||
myFavoritesButton.BackgroundImage = myFavoritesNormalBackground;
|
||||
promotionsButton.BackgroundImage = promotionsNormalBackground;
|
||||
ResetPrimaryBtnStatus();
|
||||
deliciousFoodButton.BackgroundImage = new Bitmap(Path.Combine(serverPath, "themes\\superstar\\button\\1.主類別\\主類別上方_美味菜單(已按).png"));
|
||||
isOnOrderedSongsPage = false;
|
||||
|
||||
@ -2222,17 +2252,9 @@ namespace DualScreenDemo
|
||||
{
|
||||
var data = LoadConfigData();
|
||||
|
||||
newSongAlertButton.BackgroundImage = newSongAlertNormalBackground;
|
||||
hotPlayButton.BackgroundImage = hotPlayNormalBackground;
|
||||
singerSearchButton.BackgroundImage = singerSearchNormalBackground;
|
||||
songSearchButton.BackgroundImage = songSearchNormalBackground;
|
||||
languageSearchButton.BackgroundImage = languageSearchNormalBackground;
|
||||
groupSearchButton.BackgroundImage = groupSearchNormalBackground;
|
||||
categorySearchButton.BackgroundImage = categorySearchNormalBackground;
|
||||
ResetPrimaryBtnStatus();
|
||||
orderedSongsButton.BackgroundImage = new Bitmap(Path.Combine(serverPath, "themes\\superstar\\button\\1.主類別\\主類別上方_已點歌曲(已按).png"));
|
||||
myFavoritesButton.BackgroundImage = myFavoritesNormalBackground;
|
||||
promotionsButton.BackgroundImage = promotionsNormalBackground;
|
||||
deliciousFoodButton.BackgroundImage = deliciousFoodNormalBackground;
|
||||
|
||||
|
||||
isOnOrderedSongsPage = true;
|
||||
autoRefreshTimer.Start(); // 开始自动刷新
|
||||
|
Loading…
x
Reference in New Issue
Block a user