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();
}
public void UpdateMarqueeTextSecondLine(string newText,Color textColor)
public void UpdateMarqueeTextSecondLine(string newText)
{
this.marqueeTextColor=textColor;
Console.WriteLine(InvokeRequired);
if (InvokeRequired)
{
Invoke(new MethodInvoker(() => UpdateMarqueeTextSecondLine(newText,textColor)));
Invoke(new MethodInvoker(() => UpdateMarqueeTextSecondLine(newText)));
return;
}

View File

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