using System; namespace DMS.Application.Events; /// /// 设备状态改变事件参数 /// public class DeviceActiveChangedEventArgs : EventArgs { /// /// 设备ID /// public int DeviceId { get; } /// /// 设备名称 /// public string DeviceName { get; } /// /// 旧状态 /// public bool OldStatus { get; } /// /// 新状态 /// public bool NewStatus { get; } /// /// 状态改变时间 /// public DateTime ChangeTime { get; } /// /// 初始化DeviceStatusChangedEventArgs类的新实例 /// /// 设备ID /// 设备名称 /// 旧状态 /// 新状态 public DeviceActiveChangedEventArgs(int deviceId, string deviceName, bool oldStatus, bool newStatus) { DeviceId = deviceId; DeviceName = deviceName; OldStatus = oldStatus; NewStatus = newStatus; ChangeTime = DateTime.Now; } }