test #1
@ -3474,13 +3474,21 @@ public class MultiPagePanel : Panel
|
|||||||
sendOffPanel.Controls.Add(buttonTopLeft);
|
sendOffPanel.Controls.Add(buttonTopLeft);
|
||||||
sendOffPanel.Controls.Add(buttonThanks);
|
sendOffPanel.Controls.Add(buttonThanks);
|
||||||
|
|
||||||
|
// 包廂名稱顯示
|
||||||
|
sendOffPanel.Paint+=SendOffPanel_Paint;
|
||||||
|
|
||||||
// 確保圖片在最上層
|
// 確保圖片在最上層
|
||||||
serviceBellPictureBox.BringToFront(); // 確保服務鈴在最上層
|
serviceBellPictureBox.BringToFront(); // 確保服務鈴在最上層
|
||||||
buttonMiddle.BringToFront();
|
buttonMiddle.BringToFront();
|
||||||
buttonTopRight.BringToFront();
|
buttonTopRight.BringToFront();
|
||||||
buttonTopLeft.BringToFront();
|
buttonTopLeft.BringToFront();
|
||||||
buttonThanks.BringToFront();
|
buttonThanks.BringToFront();
|
||||||
sendOffPanel.Resize += (s, e) => UpdateSendOffButtonPositions();
|
|
||||||
|
// 重新計算按鈕位置
|
||||||
|
sendOffPanel.Resize += (s, e) => {
|
||||||
|
UpdateSendOffButtonPositions();
|
||||||
|
sendOffPanel.Invalidate(); // 重新繪製面板以更新顯示
|
||||||
|
};
|
||||||
this.Controls.Add(sendOffPanel);
|
this.Controls.Add(sendOffPanel);
|
||||||
}
|
}
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@ -3511,6 +3519,34 @@ public class MultiPagePanel : Panel
|
|||||||
serviceBellPictureBox.Location = new Point((int)(757 * scaleX), (int)(151 * scaleY));
|
serviceBellPictureBox.Location = new Point((int)(757 * scaleX), (int)(151 * scaleY));
|
||||||
serviceBellPictureBox.Size = new Size((int)(410 * scaleX), (int)(130 * scaleY));
|
serviceBellPictureBox.Size = new Size((int)(410 * scaleX), (int)(130 * scaleY));
|
||||||
}
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// 送客畫面包廂名稱顯示
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="sender"></param>
|
||||||
|
/// <param name="e"></param>
|
||||||
|
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)
|
private Image LoadButtonImage(string imageName)
|
||||||
|
BIN
bin/VOD_送客畫面.jpg
BIN
bin/VOD_送客畫面.jpg
Binary file not shown.
Reference in New Issue
Block a user