test #1

Merged
jasonchenwork merged 64 commits from test into master 2025-03-18 17:32:23 +08:00
4 changed files with 85 additions and 18 deletions
Showing only changes of commit 04c3fb68bf - Show all commits

View File

@ -26,19 +26,19 @@ namespace DualScreenDemo
private void InitializeButtonsForFavoritePictureBox()
{
// 我的最愛數字座標按鈕
int[,] coords = new int[,]
{
{799, 508, 70, 65},
{878, 508, 70, 65},
{957, 508, 70, 65},
{1036, 508, 70, 65},
{1115, 508, 70, 65},
{799, 580, 70, 65},
{878, 580, 70, 65},
{957, 580, 70, 65},
{1036, 580, 70, 65},
{1115, 580, 70, 65}
{794, 508, 70, 65},
{873, 508, 70, 65},
{952, 508, 70, 65},
{1031, 508, 70, 65},
{1110, 508, 70, 65},
{794, 580, 70, 65},
{873, 580, 70, 65},
{952, 580, 70, 65},
{1031, 580, 70, 65},
{1110, 580, 70, 65}
};
int screenW = Screen.PrimaryScreen.Bounds.Width;
@ -89,7 +89,7 @@ namespace DualScreenDemo
{
Name = "enterFavoriteButton"
};
ResizeAndPositionButton(enterFavoriteButton, 842, 652, 70, 65);
ResizeAndPositionButton(enterFavoriteButton, 837, 652, 70, 65);
enterFavoriteButton.BackgroundImage = Image.FromFile(Path.Combine(Application.StartupPath, @"themes\superstar\我的最愛\我的最愛-12.png"));
enterFavoriteButton.BackgroundImageLayout = ImageLayout.Stretch;
enterFavoriteButton.FlatStyle = FlatStyle.Flat;
@ -104,7 +104,7 @@ namespace DualScreenDemo
{
Name = "newFavoriteButton"
};
ResizeAndPositionButton(newFavoriteButton, 921, 652, 70, 65);
ResizeAndPositionButton(newFavoriteButton, 916, 652, 70, 65);
newFavoriteButton.BackgroundImage = Image.FromFile(Path.Combine(Application.StartupPath, @"themes\superstar\我的最愛\我的最愛-13.png"));
newFavoriteButton.BackgroundImageLayout = ImageLayout.Stretch;
newFavoriteButton.FlatStyle = FlatStyle.Flat;
@ -119,7 +119,7 @@ namespace DualScreenDemo
{
Name = "refillFavoriteButton"
};
ResizeAndPositionButton(refillFavoriteButton, 999, 652, 70, 65);
ResizeAndPositionButton(refillFavoriteButton, 994, 652, 70, 65);
refillFavoriteButton.BackgroundImage = Image.FromFile(Path.Combine(Application.StartupPath, @"themes\superstar\我的最愛\我的最愛-14.png"));
refillFavoriteButton.BackgroundImageLayout = ImageLayout.Stretch;
refillFavoriteButton.FlatStyle = FlatStyle.Flat;
@ -134,7 +134,7 @@ namespace DualScreenDemo
{
Name = "closeFavoriteButton"
};
ResizeAndPositionButton(closeFavoriteButton, 1078, 652, 70, 65);
ResizeAndPositionButton(closeFavoriteButton, 1073, 652, 70, 65);
closeFavoriteButton.BackgroundImage = Image.FromFile(Path.Combine(Application.StartupPath, @"themes\superstar\我的最愛\我的最愛-15.png"));
closeFavoriteButton.BackgroundImageLayout = ImageLayout.Stretch;
closeFavoriteButton.FlatStyle = FlatStyle.Flat;

View File

@ -266,6 +266,7 @@ namespace DualScreenDemo
private Dictionary<Control, Point> initialControlPositions = new Dictionary<Control, Point>();
private Panel sendOffPanel;
private Panel firePanel;
private static Bitmap normalStateImageHotSong;
private static Bitmap mouseDownImageHotSong;
@ -334,7 +335,9 @@ namespace DualScreenDemo
InitializeHandWritingForSongs();
InitializeSendOffPanel();
//火災畫面 初始化
InitializeFirePanel();
InitializePromotionsAndMenuPanel();
SaveInitialControlStates(this);
// 包廂 + port 名稱
@ -444,12 +447,21 @@ namespace DualScreenDemo
buttonTopLeft.BringToFront();
buttonThanks.BringToFront();
}
public void ShowFireScreen()
{
firePanel.BringToFront();
firePanel.Visible = true;
}
public void HideSendOffScreen()
{
sendOffPanel.Visible = false;
}
public void HideFireScreen()
{
firePanel.Visible = false;
}
private void HideAllButtons()
{
HideControlsRecursively(this);
@ -3367,6 +3379,15 @@ public class MultiPagePanel : Panel
}
}
private void InitializeFirePanel(){
firePanel = new Panel{
Dock = DockStyle.Fill,
//BackColor = Color.Black,
BackgroundImage = LoadFireImage(),
BackgroundImageLayout = ImageLayout.Stretch
};
this.Controls.Add(firePanel);
}
private void InitializeSendOffPanel()
{
sendOffPanel = new Panel
@ -3460,9 +3481,13 @@ public class MultiPagePanel : Panel
};
this.Controls.Add(sendOffPanel);
}
/// <summary>
/// 動態按鈕座標位置設定(依據螢幕大小)
/// </summary>
private void UpdateSendOffButtonPositions()
{ Size designSize = new Size(1920, 1080);
var panelWidth = sendOffPanel.Width;
@ -3560,7 +3585,27 @@ public class MultiPagePanel : Panel
return null;
}
}
private Image LoadFireImage()
{
try
{
string filePath = Path.Combine(Application.StartupPath, "themes\\superstar\\VOD_消防畫面.jpg");
if (File.Exists(filePath))
{
return Image.FromFile(filePath);
}
else
{
Console.WriteLine("VOD_消防畫面.jpg 文件未找到。");
return null;
}
}
catch (Exception ex)
{
Console.WriteLine($"加載消防畫面圖片時發生錯誤: {ex.Message}");
return null;
}
}
// 將 SequenceManager 類保留在這裡
private class SequenceManager
{

View File

@ -155,6 +155,9 @@ namespace DualScreenDemo
await SafeInvoke(PrimaryForm.Instance, () =>
{
PrimaryForm.Instance.ShowSendOffScreen();
PrimaryForm.Instance.HideFireScreen();
string marqueeMessage= "歡迎使用超級巨星歡唱網路版系統,與你共度美好時光。";
OverlayForm.MainForm.UpdateMarqueeText(marqueeMessage, OverlayForm.MarqueeStartPosition.Middle, Color.White);
Console.WriteLine("開始設置新的播放列表");
string closePath = @"C:\video\CLOSE.MPG";
@ -213,6 +216,9 @@ namespace DualScreenDemo
_ = SafeInvoke(PrimaryForm.Instance, () =>
{
PrimaryForm.Instance.HideSendOffScreen();
PrimaryForm.Instance.HideFireScreen();
string marqueeMessage= "歡迎使用超級巨星歡唱網路版系統,與你共度美好時光。";
OverlayForm.MainForm.UpdateMarqueeText(marqueeMessage, OverlayForm.MarqueeStartPosition.Middle, Color.White);
});
VideoPlayerForm.publicPlaylist = new List<SongData>();
VideoPlayerForm.playingSongList = new List<SongData>();
@ -221,6 +227,22 @@ namespace DualScreenDemo
UpdateStateFile(stateFilePath, "OPEN");
continue;
}
if (command.Trim().Equals("F", StringComparison.OrdinalIgnoreCase))
{
_ = SafeInvoke(PrimaryForm.Instance, () =>
{
PrimaryForm.Instance.HideSendOffScreen();
PrimaryForm.Instance.ShowFireScreen();
VideoPlayerForm.Instance.Pause();
string marqueeMessage = "發生火災,請跟隨引導至逃生出口!!!";
OverlayForm.MainForm.UpdateMarqueeText(marqueeMessage, OverlayForm.MarqueeStartPosition.Middle, Color.Red);
});
// 更新狀態檔案(可選,若你要記錄狀態)
UpdateStateFile(stateFilePath, "PAUSE");
continue;
}
}
// 若 Overlay Form 準備好,嘗試顯示跑馬燈文字

Binary file not shown.

After

Width:  |  Height:  |  Size: 233 KiB