調整心跳與跑馬燈

This commit is contained in:
jasonchenwork 2025-06-05 16:19:59 +08:00
parent a58601e1fb
commit 1cca77f505
3 changed files with 7 additions and 2 deletions

View File

@ -129,7 +129,7 @@ namespace HeartbeatSender
{ {
using var cpuCounter = new PerformanceCounter("Processor", "% Processor Time", "_Total"); using var cpuCounter = new PerformanceCounter("Processor", "% Processor Time", "_Total");
cpuCounter.NextValue(); // 需要呼叫兩次 cpuCounter.NextValue(); // 需要呼叫兩次
System.Threading.Thread.Sleep(1000); System.Threading.Thread.Sleep(100);
return cpuCounter.NextValue(); // 回傳的是百分比,例如 25.3 return cpuCounter.NextValue(); // 回傳的是百分比,例如 25.3
} }
private float GetTotalMemoryInMB() private float GetTotalMemoryInMB()

View File

@ -17,6 +17,7 @@ namespace DualScreenDemo
[STAThread] [STAThread]
static void Main() static void Main()
{ {
Console.WriteLine("正在與中控取得聯繫");
var sender = new HeartbeatSender.heartbeatSender("http://zqd.superstar.dnsnet.cc/api/room/receiveRegister"); var sender = new HeartbeatSender.heartbeatSender("http://zqd.superstar.dnsnet.cc/api/room/receiveRegister");
// 同步呼叫非同步登入取得 token // 同步呼叫非同步登入取得 token

View File

@ -150,7 +150,11 @@ namespace DualScreenDemo
await SafeInvoke(PrimaryForm.Instance, async () => await SafeInvoke(PrimaryForm.Instance, async () =>
{ {
PrimaryForm.Instance.ShowSendOffScreen(); PrimaryForm.Instance.ShowSendOffScreen();
_ = SafeInvoke(PrimaryForm.Instance, () =>
{
string marqueeMessage= "歡迎使用超級巨星歡唱網路版系統,與你共度美好時光。";
OverlayForm.MainForm.UpdateMarqueeText(marqueeMessage, OverlayForm.MarqueeStartPosition.Middle, Color.White);
});
Console.WriteLine("開始設置新的播放列表"); Console.WriteLine("開始設置新的播放列表");
string closePath = @"C:\video\CLOSE.MPG"; string closePath = @"C:\video\CLOSE.MPG";