从项目中移除不再使用的TemperatureReceivedEventArgs.cs文件
This commit is contained in:
@@ -1,66 +0,0 @@
|
|||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Text;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
|
|
||||||
namespace JoyD.Windows.CS.Toprie
|
|
||||||
{
|
|
||||||
/// <summary>
|
|
||||||
/// 温度数据接收事件参数类
|
|
||||||
/// 用于在接收到温度数据时传递相关信息
|
|
||||||
/// </summary>
|
|
||||||
public class TemperatureReceivedEventArgs : EventArgs
|
|
||||||
{
|
|
||||||
/// <summary>
|
|
||||||
/// 温度数据对象
|
|
||||||
/// </summary>
|
|
||||||
public TemperatureData TemperatureData { get; private set; }
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 原始温度数据(可选,用于调试或特殊处理)
|
|
||||||
/// </summary>
|
|
||||||
public byte[] RawData { get; private set; }
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 温度补偿值
|
|
||||||
/// </summary>
|
|
||||||
public float CompensationValue { get; private set; }
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 构造函数
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="temperatureData">解析后的温度数据对象</param>
|
|
||||||
public TemperatureReceivedEventArgs(TemperatureData temperatureData)
|
|
||||||
{
|
|
||||||
TemperatureData = temperatureData ?? throw new ArgumentNullException(nameof(temperatureData));
|
|
||||||
RawData = null;
|
|
||||||
CompensationValue = 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 构造函数(包含原始数据和补偿值)
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="temperatureData">解析后的温度数据对象</param>
|
|
||||||
/// <param name="rawData">原始温度数据</param>
|
|
||||||
/// <param name="compensationValue">温度补偿值</param>
|
|
||||||
public TemperatureReceivedEventArgs(TemperatureData temperatureData, byte[] rawData, float compensationValue)
|
|
||||||
{
|
|
||||||
TemperatureData = temperatureData ?? throw new ArgumentNullException(nameof(temperatureData));
|
|
||||||
RawData = rawData;
|
|
||||||
CompensationValue = compensationValue;
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 获取温度统计摘要信息
|
|
||||||
/// </summary>
|
|
||||||
public string GetStatisticsSummary()
|
|
||||||
{
|
|
||||||
return $"温度统计 - 最低: {TemperatureData.MinTemperature:F2}°C, " +
|
|
||||||
$"最高: {TemperatureData.MaxTemperature:F2}°C, " +
|
|
||||||
$"平均: {TemperatureData.AverageTemperature:F2}°C, " +
|
|
||||||
$"数据点: {TemperatureData.Width}x{TemperatureData.Height} ({TemperatureData.Width * TemperatureData.Height}), " +
|
|
||||||
$"采集时间: {TemperatureData.Timestamp:yyyy-MM-dd HH:mm:ss.fff}";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
|
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
@@ -74,7 +74,7 @@
|
|||||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||||
<Compile Include="SharedStructures.cs" />
|
<Compile Include="SharedStructures.cs" />
|
||||||
<Compile Include="TemperatureData.cs" />
|
<Compile Include="TemperatureData.cs" />
|
||||||
<Compile Include="TemperatureReceivedEventArgs.cs" />
|
<!-- TemperatureReceivedEventArgs.cs 已移除,不再需要温度数据实时通知机制 -->
|
||||||
<Compile Include="UdpCommunicationManager.cs" />
|
<Compile Include="UdpCommunicationManager.cs" />
|
||||||
<Compile Include="V8.cs" />
|
<Compile Include="V8.cs" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|||||||
Reference in New Issue
Block a user