關閉QR Content,修改紅跑馬燈

This commit is contained in:
jasonchenwork 2025-06-26 14:27:54 +08:00
parent 79093d8627
commit 08dc3539e6
2 changed files with 5 additions and 4 deletions

View File

@ -169,7 +169,7 @@ namespace OverlayFormObj
string qrContent = serverAddress.Contains(":") ? string qrContent = serverAddress.Contains(":") ?
String.Format("http://{0}/{1}/windows.html", serverAddress, randomFolderPath) : String.Format("http://{0}/{1}/windows.html", serverAddress, randomFolderPath) :
String.Format("http://{0}:{1}/{2}/windows.html", serverAddress, 9090, randomFolderPath); String.Format("http://{0}:{1}/{2}/windows.html", serverAddress, 9090, randomFolderPath);
Console.WriteLine("QR Content: " + qrContent); // Console.WriteLine("QR Content: " + qrContent);
string qrImagePath = Path.Combine(Application.StartupPath, "themes/superstar/_www", randomFolderPath, "qrcode.png"); string qrImagePath = Path.Combine(Application.StartupPath, "themes/superstar/_www", randomFolderPath, "qrcode.png");
if (!File.Exists(qrImagePath)) if (!File.Exists(qrImagePath))
{ {
@ -474,7 +474,7 @@ namespace OverlayFormObj
using (Font largeFont = new Font("微軟正黑體", 34, FontStyle.Bold)) using (Font largeFont = new Font("微軟正黑體", 34, FontStyle.Bold))
using (Font secondLineFont = new Font("微軟正黑體", 34, FontStyle.Bold)) using (Font secondLineFont = new Font("微軟正黑體", 34, FontStyle.Bold))
using (Brush whiteBrush = new SolidBrush(Color.White)) using (Brush whiteBrush = new SolidBrush(Color.White))
using (Brush limeGreenBrush = new SolidBrush(Color.LimeGreen)) using (Brush RedBrush = new SolidBrush(Color.Red))
using (Brush marqueeBrush = new SolidBrush(marqueeTextColor)) using (Brush marqueeBrush = new SolidBrush(marqueeTextColor))
using (Brush backgroundBrush = new SolidBrush(Color.FromArgb(255, 0, 0, 0))) using (Brush backgroundBrush = new SolidBrush(Color.FromArgb(255, 0, 0, 0)))
{ {
@ -500,7 +500,8 @@ namespace OverlayFormObj
SizeF textSizeSecondLine = e.Graphics.MeasureString(displayText, secondLineFont); SizeF textSizeSecondLine = e.Graphics.MeasureString(displayText, secondLineFont);
float centeredXPos = (this.Width - textSizeSecondLine.Width) / 2; float centeredXPos = (this.Width - textSizeSecondLine.Width) / 2;
e.Graphics.FillRectangle(backgroundBrush, centeredXPos, yPosition2, textSizeSecondLine.Width, textSizeSecondLine.Height); e.Graphics.FillRectangle(backgroundBrush, centeredXPos, yPosition2, textSizeSecondLine.Width, textSizeSecondLine.Height);
e.Graphics.DrawString(displayText, secondLineFont, limeGreenBrush, new PointF(centeredXPos, yPosition2)); // 系統公告塗色調整區域
e.Graphics.DrawString(displayText, secondLineFont, RedBrush, new PointF(centeredXPos, yPosition2));
// 还原裁剪区域 // 还原裁剪区域
e.Graphics.Clip = originalClip; e.Graphics.Clip = originalClip;

View File

@ -34,7 +34,7 @@ namespace DualScreenDemo
string qrContent = serverAddress.Contains(":") ? string qrContent = serverAddress.Contains(":") ?
String.Format("http://{0}/{1}/windows.html", serverAddress, randomFolderPath) : String.Format("http://{0}/{1}/windows.html", serverAddress, randomFolderPath) :
String.Format("http://{0}:{1}/{2}/windows.html", serverAddress, 9090, randomFolderPath); String.Format("http://{0}:{1}/{2}/windows.html", serverAddress, 9090, randomFolderPath);
Console.WriteLine("QR Content: " + qrContent); // Console.WriteLine("QR Content: " + qrContent);
string qrImagePath = Path.Combine(Application.StartupPath, "themes/superstar/_www", randomFolderPath, "qrcode.png"); string qrImagePath = Path.Combine(Application.StartupPath, "themes/superstar/_www", randomFolderPath, "qrcode.png");