diff --git a/PrimaryFormParts/PrimaryForm.cs b/PrimaryFormParts/PrimaryForm.cs index 769641e..16e90aa 100644 --- a/PrimaryFormParts/PrimaryForm.cs +++ b/PrimaryFormParts/PrimaryForm.cs @@ -3474,13 +3474,21 @@ public class MultiPagePanel : Panel sendOffPanel.Controls.Add(buttonTopLeft); sendOffPanel.Controls.Add(buttonThanks); + // 包廂名稱顯示 + sendOffPanel.Paint+=SendOffPanel_Paint; + // 確保圖片在最上層 serviceBellPictureBox.BringToFront(); // 確保服務鈴在最上層 buttonMiddle.BringToFront(); buttonTopRight.BringToFront(); buttonTopLeft.BringToFront(); buttonThanks.BringToFront(); - sendOffPanel.Resize += (s, e) => UpdateSendOffButtonPositions(); + + // 重新計算按鈕位置 + sendOffPanel.Resize += (s, e) => { + UpdateSendOffButtonPositions(); + sendOffPanel.Invalidate(); // 重新繪製面板以更新顯示 + }; this.Controls.Add(sendOffPanel); } /// @@ -3511,6 +3519,34 @@ public class MultiPagePanel : Panel serviceBellPictureBox.Location = new Point((int)(757 * scaleX), (int)(151 * scaleY)); serviceBellPictureBox.Size = new Size((int)(410 * scaleX), (int)(130 * scaleY)); } + /// + /// 送客畫面包廂名稱顯示 + /// + /// + /// + private void SendOffPanel_Paint(object sender, PaintEventArgs e) + { + Size designSize = new Size(1920, 1080); + var panelWidth = sendOffPanel.Width; + var panelHeight = sendOffPanel.Height; + + // 計算寬高的縮放比例 + float scaleX = panelWidth / (float)designSize.Width; + float scaleY = panelHeight / (float)designSize.Height; + float scaledFontSize = 84f * scaleY; + + string hostName = System.Net.Dns.GetHostName(); + string displayName = "包廂" + hostName.Substring(Math.Max(0, hostName.Length - 20)); + + using (Font font = new Font("微軟正黑體", scaledFontSize, FontStyle.Bold)) + using (Brush brush = new SolidBrush(Color.Red)) + { + + PointF point_PCName = new PointF(820 * scaleX, 325 * scaleY); + e.Graphics.DrawString(displayName, font, brush, point_PCName); + } + } + // 添加載入按鈕圖片的方法 private Image LoadButtonImage(string imageName) diff --git a/bin/VOD_送客畫面.jpg b/bin/VOD_送客畫面.jpg deleted file mode 100644 index 1e9789e..0000000 Binary files a/bin/VOD_送客畫面.jpg and /dev/null differ