diff --git a/Windows/CS/Framework4.0/Toprie/Toprie/Camera.cs b/Windows/CS/Framework4.0/Toprie/Toprie/Camera.cs index ae137a7..19c2935 100644 --- a/Windows/CS/Framework4.0/Toprie/Toprie/Camera.cs +++ b/Windows/CS/Framework4.0/Toprie/Toprie/Camera.cs @@ -708,7 +708,12 @@ namespace JoyD.Windows.CS.Toprie } // 调用温度显示更新方法 - UpdateRealTimeInfoOnUI(); + // 在就绪条件下,调用更新实时信息 + bool isReady = !_isPaused && IsDevicePingable && _deviceManager != null && _deviceManager.ConnectionStatus == ConnectionStatus.Connected; + if (isReady) + { + UpdateRealTimeInfoOnUI(); + } Image lastImage = null; Image infoImage = null; @@ -786,12 +791,15 @@ namespace JoyD.Windows.CS.Toprie } } - // 步骤2.1:绘制DisplayImage(实时温度信息等) - lock (_displayImageLock) - { - if (_displayImage != null) - { - g.DrawImage(_displayImage, 0, 0); + // 步骤2.1:绘制DisplayImage(实时温度信息等) - 仅在就绪条件下执行 + if (isReady) + { + lock (_displayImageLock) + { + if (_displayImage != null) + { + g.DrawImage(_displayImage, 0, 0); + } } } @@ -1948,9 +1956,11 @@ namespace JoyD.Windows.CS.Toprie // 设置文本样式 Font font = new Font("微软雅黑", 12, FontStyle.Bold); Brush brush = new SolidBrush(Color.White); - StringFormat format = new StringFormat(); - format.Alignment = StringAlignment.Near; // 左对齐 - format.LineAlignment = StringAlignment.Center; + StringFormat format = new StringFormat + { + Alignment = StringAlignment.Near, // 左对齐 + LineAlignment = StringAlignment.Center + }; // 计算文本区域大小 SizeF[] textSizes = new SizeF[temperatureTexts.Count];