正确显示区域框线,没收到温度数据时也显示
This commit is contained in:
@@ -2936,23 +2936,7 @@ namespace JoyD.Windows.CS.Toprie
|
|||||||
|
|
||||||
if (_deviceManager.CurrentImageMode == ImageMode.Infrared)
|
if (_deviceManager.CurrentImageMode == ImageMode.Infrared)
|
||||||
{
|
{
|
||||||
// 2. 如果没有温度数据或温度数据的时间3秒之前,返回
|
// 1. 先绘制区域框线,不受温度数据影响,只受显示设置影响
|
||||||
TemperatureData temperatureData = _deviceManager.LastTemperature;
|
|
||||||
if (temperatureData == null || temperatureData.Timestamp == null)
|
|
||||||
return;
|
|
||||||
|
|
||||||
TimeSpan timeDiff = DateTime.Now - temperatureData.Timestamp;
|
|
||||||
if (timeDiff.TotalSeconds > 3)
|
|
||||||
return;
|
|
||||||
|
|
||||||
// 3. 温度显示菜单下如果未勾选区域温度和全局温度,则不显示任何温度信息
|
|
||||||
if (!_showGlobalTemperature && !_showAreaTemperature)
|
|
||||||
return;
|
|
||||||
|
|
||||||
// 4. 如果勾选了全局温度且未勾选区域温度,则显示全局温度(居中显示),否则显示区域温度(居中显示)
|
|
||||||
bool isGlobalTemperatureMode = _showGlobalTemperature && !_showAreaTemperature;
|
|
||||||
|
|
||||||
// 5. 如果勾选了区域温度,则显示区域框和编号,否则不显示区域框
|
|
||||||
if (_showAreaTemperature)
|
if (_showAreaTemperature)
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
@@ -2986,7 +2970,21 @@ namespace JoyD.Windows.CS.Toprie
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// 6. 根据温度模式显示温度数据
|
// 2. 温度数据绘制逻辑,仍受温度数据有效性影响
|
||||||
|
TemperatureData temperatureData = _deviceManager.LastTemperature;
|
||||||
|
if (temperatureData != null && temperatureData.Timestamp != null)
|
||||||
|
{
|
||||||
|
TimeSpan timeDiff = DateTime.Now - temperatureData.Timestamp;
|
||||||
|
if (timeDiff.TotalSeconds <= 3)
|
||||||
|
{
|
||||||
|
// 3. 温度显示菜单下如果未勾选区域温度和全局温度,则不显示任何温度信息
|
||||||
|
if (!_showGlobalTemperature && !_showAreaTemperature)
|
||||||
|
return;
|
||||||
|
|
||||||
|
// 4. 如果勾选了全局温度且未勾选区域温度,则显示全局温度(居中显示),否则显示区域温度(居中显示)
|
||||||
|
bool isGlobalTemperatureMode = _showGlobalTemperature && !_showAreaTemperature;
|
||||||
|
|
||||||
|
// 5. 根据温度模式显示温度数据
|
||||||
if (isGlobalTemperatureMode)
|
if (isGlobalTemperatureMode)
|
||||||
{
|
{
|
||||||
// 准备温度文本
|
// 准备温度文本
|
||||||
@@ -3073,7 +3071,8 @@ namespace JoyD.Windows.CS.Toprie
|
|||||||
// 标记信息正在显示
|
// 标记信息正在显示
|
||||||
_isDisplayingInfo = true;
|
_isDisplayingInfo = true;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
private void SaveTemperatureToolStripMenuItem_Click(object sender, EventArgs e)
|
private void SaveTemperatureToolStripMenuItem_Click(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
|
|||||||
Reference in New Issue
Block a user