From a6bb9b88128bdb4dc0c64eb1782ff18fa7d10171 Mon Sep 17 00:00:00 2001 From: zqm Date: Thu, 30 Oct 2025 15:25:59 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=98=BE=E7=A4=BA=E9=80=BB?= =?UTF-8?q?=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../CS/Framework4.0/Toprie/Toprie/Camera.cs | 25 ++++++++++--------- 1 file changed, 13 insertions(+), 12 deletions(-) diff --git a/Windows/CS/Framework4.0/Toprie/Toprie/Camera.cs b/Windows/CS/Framework4.0/Toprie/Toprie/Camera.cs index fae974a..e3481fa 100644 --- a/Windows/CS/Framework4.0/Toprie/Toprie/Camera.cs +++ b/Windows/CS/Framework4.0/Toprie/Toprie/Camera.cs @@ -112,32 +112,32 @@ namespace JoyD.Windows.CS.Toprie g.FillRectangle(brush, 0, 0, BUFFER_WIDTH, BUFFER_HEIGHT); } if (isPaused) - { + { // 暂停状态 - 最高优先级 // 绘制暂停文本 string text = "暂停"; Color textColor = Color.Red; - + using (Font font = new Font("Arial", 48, FontStyle.Bold)) using (SolidBrush textBrush = new SolidBrush(textColor)) { StringFormat format = new StringFormat(); format.Alignment = StringAlignment.Center; - + // 将主文本居中显示 - g.DrawString(text, font, textBrush, - new RectangleF(0, BUFFER_HEIGHT / 3, BUFFER_WIDTH, BUFFER_HEIGHT / 3), + g.DrawString(text, font, textBrush, + new RectangleF(0, BUFFER_HEIGHT / 3, BUFFER_WIDTH, BUFFER_HEIGHT / 3), format); } } else if (isPingFailed || isDisconnected || isReconnecting) - { + { // 非暂停状态下,检查Ping状态和连接状态 - + // 确定显示的文本和颜色 string text = ""; Color textColor = Color.White; - + if (isReconnecting) { text = "正在重连..."; @@ -153,20 +153,21 @@ namespace JoyD.Windows.CS.Toprie text = "连接断开"; textColor = Color.Red; } - + // 绘制文本 using (Font font = new Font("Arial", 48, FontStyle.Bold)) using (SolidBrush textBrush = new SolidBrush(textColor)) { StringFormat format = new StringFormat(); format.Alignment = StringAlignment.Center; - + // 将主文本居中显示 - g.DrawString(text, font, textBrush, - new RectangleF(0, BUFFER_HEIGHT / 3, BUFFER_WIDTH, BUFFER_HEIGHT / 3), + g.DrawString(text, font, textBrush, + new RectangleF(0, BUFFER_HEIGHT / 3, BUFFER_WIDTH, BUFFER_HEIGHT / 3), format); } } + else g.Clear(Color.Transparent); } // 否则清空InfoImage(已在开头处理)