2508151807

This commit is contained in:
jasonchenwork 2025-08-15 18:07:26 +08:00
parent bf1c4a0af7
commit 4f2f7cb370
2 changed files with 4 additions and 6 deletions

View File

@ -91,13 +91,12 @@ namespace OverlayFormObj
marqueeTimer_detection.Start(); marqueeTimer_detection.Start();
} }
public void UpdateMarqueeTextSecondLine(string newText,Color textColor) public void UpdateMarqueeTextSecondLine(string newText)
{ {
this.marqueeTextColor=textColor;
Console.WriteLine(InvokeRequired); Console.WriteLine(InvokeRequired);
if (InvokeRequired) if (InvokeRequired)
{ {
Invoke(new MethodInvoker(() => UpdateMarqueeTextSecondLine(newText,textColor))); Invoke(new MethodInvoker(() => UpdateMarqueeTextSecondLine(newText)));
return; return;
} }

View File

@ -174,9 +174,8 @@ namespace DualScreenDemo
} }
else else
{ {
string marqueeMessage = "系統公告: " + message.Substring(match.Value.Length).Trim(); string marqueeMessage = "系統公告: " ;
Color textColor = GetColorFromString(match.Groups[2].Value); OverlayForm.MainForm.UpdateMarqueeTextSecondLine(marqueeMessage);
OverlayForm.MainForm.UpdateMarqueeTextSecondLine(marqueeMessage,textColor);
} }
}); });
byte[] okResponse = Encoding.UTF8.GetBytes("OK\n"); byte[] okResponse = Encoding.UTF8.GetBytes("OK\n");