2025-09-16 14:42:23 +08:00
|
|
|
|
namespace DMS.Core.Events;
|
2025-09-12 17:22:15 +08:00
|
|
|
|
|
2025-10-01 18:41:05 +08:00
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 已弃用:请使用 DeviceStateChangedEventArgs 替代
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
[Obsolete("Use DeviceStateChangedEventArgs instead")]
|
2025-09-12 17:22:15 +08:00
|
|
|
|
public class DeviceConnectChangedEventArgs
|
|
|
|
|
|
{
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 设备ID
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
public int DeviceId { get; }
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 设备名称
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
public string DeviceName { get; }
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 新状态
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
public bool NewStatus { get; }
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 初始化DeviceStatusChangedEventArgs类的新实例
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
/// <param name="deviceId">设备ID</param>
|
|
|
|
|
|
/// <param name="deviceName">设备名称</param>
|
|
|
|
|
|
/// <param name="oldStatus">旧状态</param>
|
|
|
|
|
|
/// <param name="newStatus">新状态</param>
|
2025-09-16 12:29:09 +08:00
|
|
|
|
public DeviceConnectChangedEventArgs(int deviceId, string deviceName, bool newStatus)
|
2025-09-12 17:22:15 +08:00
|
|
|
|
{
|
|
|
|
|
|
DeviceId = deviceId;
|
|
|
|
|
|
DeviceName = deviceName;
|
|
|
|
|
|
NewStatus = newStatus;
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|