新增消防畫面和消防指令
This commit is contained in:
parent
2568c5e20e
commit
04c3fb68bf
@ -26,19 +26,19 @@ namespace DualScreenDemo
|
|||||||
|
|
||||||
private void InitializeButtonsForFavoritePictureBox()
|
private void InitializeButtonsForFavoritePictureBox()
|
||||||
{
|
{
|
||||||
|
// 我的最愛數字座標按鈕
|
||||||
int[,] coords = new int[,]
|
int[,] coords = new int[,]
|
||||||
{
|
{
|
||||||
{799, 508, 70, 65},
|
{794, 508, 70, 65},
|
||||||
{878, 508, 70, 65},
|
{873, 508, 70, 65},
|
||||||
{957, 508, 70, 65},
|
{952, 508, 70, 65},
|
||||||
{1036, 508, 70, 65},
|
{1031, 508, 70, 65},
|
||||||
{1115, 508, 70, 65},
|
{1110, 508, 70, 65},
|
||||||
{799, 580, 70, 65},
|
{794, 580, 70, 65},
|
||||||
{878, 580, 70, 65},
|
{873, 580, 70, 65},
|
||||||
{957, 580, 70, 65},
|
{952, 580, 70, 65},
|
||||||
{1036, 580, 70, 65},
|
{1031, 580, 70, 65},
|
||||||
{1115, 580, 70, 65}
|
{1110, 580, 70, 65}
|
||||||
};
|
};
|
||||||
|
|
||||||
int screenW = Screen.PrimaryScreen.Bounds.Width;
|
int screenW = Screen.PrimaryScreen.Bounds.Width;
|
||||||
@ -89,7 +89,7 @@ namespace DualScreenDemo
|
|||||||
{
|
{
|
||||||
Name = "enterFavoriteButton"
|
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.BackgroundImage = Image.FromFile(Path.Combine(Application.StartupPath, @"themes\superstar\我的最愛\我的最愛-12.png"));
|
||||||
enterFavoriteButton.BackgroundImageLayout = ImageLayout.Stretch;
|
enterFavoriteButton.BackgroundImageLayout = ImageLayout.Stretch;
|
||||||
enterFavoriteButton.FlatStyle = FlatStyle.Flat;
|
enterFavoriteButton.FlatStyle = FlatStyle.Flat;
|
||||||
@ -104,7 +104,7 @@ namespace DualScreenDemo
|
|||||||
{
|
{
|
||||||
Name = "newFavoriteButton"
|
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.BackgroundImage = Image.FromFile(Path.Combine(Application.StartupPath, @"themes\superstar\我的最愛\我的最愛-13.png"));
|
||||||
newFavoriteButton.BackgroundImageLayout = ImageLayout.Stretch;
|
newFavoriteButton.BackgroundImageLayout = ImageLayout.Stretch;
|
||||||
newFavoriteButton.FlatStyle = FlatStyle.Flat;
|
newFavoriteButton.FlatStyle = FlatStyle.Flat;
|
||||||
@ -119,7 +119,7 @@ namespace DualScreenDemo
|
|||||||
{
|
{
|
||||||
Name = "refillFavoriteButton"
|
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.BackgroundImage = Image.FromFile(Path.Combine(Application.StartupPath, @"themes\superstar\我的最愛\我的最愛-14.png"));
|
||||||
refillFavoriteButton.BackgroundImageLayout = ImageLayout.Stretch;
|
refillFavoriteButton.BackgroundImageLayout = ImageLayout.Stretch;
|
||||||
refillFavoriteButton.FlatStyle = FlatStyle.Flat;
|
refillFavoriteButton.FlatStyle = FlatStyle.Flat;
|
||||||
@ -134,7 +134,7 @@ namespace DualScreenDemo
|
|||||||
{
|
{
|
||||||
Name = "closeFavoriteButton"
|
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.BackgroundImage = Image.FromFile(Path.Combine(Application.StartupPath, @"themes\superstar\我的最愛\我的最愛-15.png"));
|
||||||
closeFavoriteButton.BackgroundImageLayout = ImageLayout.Stretch;
|
closeFavoriteButton.BackgroundImageLayout = ImageLayout.Stretch;
|
||||||
closeFavoriteButton.FlatStyle = FlatStyle.Flat;
|
closeFavoriteButton.FlatStyle = FlatStyle.Flat;
|
||||||
|
@ -266,6 +266,7 @@ namespace DualScreenDemo
|
|||||||
private Dictionary<Control, Point> initialControlPositions = new Dictionary<Control, Point>();
|
private Dictionary<Control, Point> initialControlPositions = new Dictionary<Control, Point>();
|
||||||
|
|
||||||
private Panel sendOffPanel;
|
private Panel sendOffPanel;
|
||||||
|
private Panel firePanel;
|
||||||
|
|
||||||
private static Bitmap normalStateImageHotSong;
|
private static Bitmap normalStateImageHotSong;
|
||||||
private static Bitmap mouseDownImageHotSong;
|
private static Bitmap mouseDownImageHotSong;
|
||||||
@ -334,7 +335,9 @@ namespace DualScreenDemo
|
|||||||
InitializeHandWritingForSongs();
|
InitializeHandWritingForSongs();
|
||||||
|
|
||||||
InitializeSendOffPanel();
|
InitializeSendOffPanel();
|
||||||
|
//火災畫面 初始化
|
||||||
|
InitializeFirePanel();
|
||||||
|
|
||||||
InitializePromotionsAndMenuPanel();
|
InitializePromotionsAndMenuPanel();
|
||||||
SaveInitialControlStates(this);
|
SaveInitialControlStates(this);
|
||||||
// 包廂 + port 名稱
|
// 包廂 + port 名稱
|
||||||
@ -444,12 +447,21 @@ namespace DualScreenDemo
|
|||||||
buttonTopLeft.BringToFront();
|
buttonTopLeft.BringToFront();
|
||||||
buttonThanks.BringToFront();
|
buttonThanks.BringToFront();
|
||||||
}
|
}
|
||||||
|
public void ShowFireScreen()
|
||||||
|
{
|
||||||
|
firePanel.BringToFront();
|
||||||
|
firePanel.Visible = true;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
public void HideSendOffScreen()
|
public void HideSendOffScreen()
|
||||||
{
|
{
|
||||||
sendOffPanel.Visible = false;
|
sendOffPanel.Visible = false;
|
||||||
}
|
}
|
||||||
|
public void HideFireScreen()
|
||||||
|
{
|
||||||
|
firePanel.Visible = false;
|
||||||
|
}
|
||||||
private void HideAllButtons()
|
private void HideAllButtons()
|
||||||
{
|
{
|
||||||
HideControlsRecursively(this);
|
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()
|
private void InitializeSendOffPanel()
|
||||||
{
|
{
|
||||||
sendOffPanel = new Panel
|
sendOffPanel = new Panel
|
||||||
@ -3460,9 +3481,13 @@ public class MultiPagePanel : Panel
|
|||||||
};
|
};
|
||||||
this.Controls.Add(sendOffPanel);
|
this.Controls.Add(sendOffPanel);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 動態按鈕座標位置設定(依據螢幕大小)
|
/// 動態按鈕座標位置設定(依據螢幕大小)
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
||||||
private void UpdateSendOffButtonPositions()
|
private void UpdateSendOffButtonPositions()
|
||||||
{ Size designSize = new Size(1920, 1080);
|
{ Size designSize = new Size(1920, 1080);
|
||||||
var panelWidth = sendOffPanel.Width;
|
var panelWidth = sendOffPanel.Width;
|
||||||
@ -3560,7 +3585,27 @@ public class MultiPagePanel : Panel
|
|||||||
return null;
|
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 類保留在這裡
|
// 將 SequenceManager 類保留在這裡
|
||||||
private class SequenceManager
|
private class SequenceManager
|
||||||
{
|
{
|
||||||
|
22
TCPServer.cs
22
TCPServer.cs
@ -155,6 +155,9 @@ namespace DualScreenDemo
|
|||||||
await SafeInvoke(PrimaryForm.Instance, () =>
|
await SafeInvoke(PrimaryForm.Instance, () =>
|
||||||
{
|
{
|
||||||
PrimaryForm.Instance.ShowSendOffScreen();
|
PrimaryForm.Instance.ShowSendOffScreen();
|
||||||
|
PrimaryForm.Instance.HideFireScreen();
|
||||||
|
string marqueeMessage= "歡迎使用超級巨星歡唱網路版系統,與你共度美好時光。";
|
||||||
|
OverlayForm.MainForm.UpdateMarqueeText(marqueeMessage, OverlayForm.MarqueeStartPosition.Middle, Color.White);
|
||||||
Console.WriteLine("開始設置新的播放列表");
|
Console.WriteLine("開始設置新的播放列表");
|
||||||
|
|
||||||
string closePath = @"C:\video\CLOSE.MPG";
|
string closePath = @"C:\video\CLOSE.MPG";
|
||||||
@ -213,6 +216,9 @@ namespace DualScreenDemo
|
|||||||
_ = SafeInvoke(PrimaryForm.Instance, () =>
|
_ = SafeInvoke(PrimaryForm.Instance, () =>
|
||||||
{
|
{
|
||||||
PrimaryForm.Instance.HideSendOffScreen();
|
PrimaryForm.Instance.HideSendOffScreen();
|
||||||
|
PrimaryForm.Instance.HideFireScreen();
|
||||||
|
string marqueeMessage= "歡迎使用超級巨星歡唱網路版系統,與你共度美好時光。";
|
||||||
|
OverlayForm.MainForm.UpdateMarqueeText(marqueeMessage, OverlayForm.MarqueeStartPosition.Middle, Color.White);
|
||||||
});
|
});
|
||||||
VideoPlayerForm.publicPlaylist = new List<SongData>();
|
VideoPlayerForm.publicPlaylist = new List<SongData>();
|
||||||
VideoPlayerForm.playingSongList = new List<SongData>();
|
VideoPlayerForm.playingSongList = new List<SongData>();
|
||||||
@ -221,6 +227,22 @@ namespace DualScreenDemo
|
|||||||
UpdateStateFile(stateFilePath, "OPEN");
|
UpdateStateFile(stateFilePath, "OPEN");
|
||||||
continue;
|
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 準備好,嘗試顯示跑馬燈文字
|
// 若 Overlay Form 準備好,嘗試顯示跑馬燈文字
|
||||||
|
BIN
bin/themes/superstar/VOD_消防畫面.jpg
Normal file
BIN
bin/themes/superstar/VOD_消防畫面.jpg
Normal file
Binary file not shown.
After Width: | Height: | Size: 233 KiB |
Reference in New Issue
Block a user