包廂號調整+同步畫面服務鈴調整

This commit is contained in:
jasonchenwork 2025-05-02 10:30:39 +08:00
parent 6f54a5109d
commit 34a11de7f5
2 changed files with 6 additions and 5 deletions

View File

@ -49,11 +49,11 @@ namespace DualScreenDemo
//同步畫面 服務鈴
ConfigureButton(this.syncServiceBellButton, 1240, 17, 161, 161,
resizedNormalStateImageForSyncScreen, resizedNormalStateImageForSyncScreen, resizedNormalStateImageForSyncScreen,
(sender, e) => SendCommandThroughSerialPort("a2 53 a4"));
//(sender, e) => SendCommandThroughSerialPort("a2 53 a4"));
(sender,e)=>OnServiceBellButtonClick(sender,e));

View File

@ -370,7 +370,7 @@ namespace DualScreenDemo
// 顯示包廂名稱
// 取主機名稱的最後 20 個字元 (如果長度不足 20則取全部)
string displayName = "包廂" + hostName.Substring(Math.Max(0, hostName.Length - 20));
string displayName = "包廂" + hostName.Substring(Math.Max(0, hostName.Length - 3));
string totalPages = multiPagePanel.totalPages.ToString() == "0" ? "1" : multiPagePanel.totalPages.ToString();
string pageNumber = (multiPagePanel.currentPageIndex + 1).ToString() + "/" + totalPages;
@ -3321,6 +3321,7 @@ public class MultiPagePanel : Panel
private bool isWaiting = false;
// 服務鈴事件
private async void OnServiceBellButtonClick(object sender, EventArgs e)
{
if (isWaiting) return;
@ -3499,7 +3500,7 @@ public class MultiPagePanel : Panel
float scaledFontSize = 84f * scaleY;
string hostName = System.Net.Dns.GetHostName();
string displayName = "包廂" + hostName.Substring(Math.Max(0, hostName.Length - 20));
string displayName = "包廂" + hostName.Substring(Math.Max(0, hostName.Length - 3));
using (Font font = new Font("微軟正黑體", scaledFontSize, FontStyle.Bold))
using (Brush brush = new SolidBrush(Color.Red))