完成S7变量启用和停用更新
This commit is contained in:
43
DMS.Core/Events/DeviceActiveChangedEventArgs.cs
Normal file
43
DMS.Core/Events/DeviceActiveChangedEventArgs.cs
Normal file
@@ -0,0 +1,43 @@
|
||||
namespace DMS.Core.Events;
|
||||
|
||||
/// <summary>
|
||||
/// 设备状态改变事件参数
|
||||
/// </summary>
|
||||
public class DeviceActiveChangedEventArgs : EventArgs
|
||||
{
|
||||
/// <summary>
|
||||
/// 设备ID
|
||||
/// </summary>
|
||||
public int DeviceId { get; }
|
||||
|
||||
/// <summary>
|
||||
/// 设备名称
|
||||
/// </summary>
|
||||
public string DeviceName { get; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 新状态
|
||||
/// </summary>
|
||||
public bool NewStatus { get; }
|
||||
|
||||
/// <summary>
|
||||
/// 状态改变时间
|
||||
/// </summary>
|
||||
public DateTime ChangeTime { get; }
|
||||
|
||||
/// <summary>
|
||||
/// 初始化DeviceStatusChangedEventArgs类的新实例
|
||||
/// </summary>
|
||||
/// <param name="deviceId">设备ID</param>
|
||||
/// <param name="deviceName">设备名称</param>
|
||||
/// <param name="oldStatus">旧状态</param>
|
||||
/// <param name="newStatus">新状态</param>
|
||||
public DeviceActiveChangedEventArgs(int deviceId, string deviceName, bool newStatus)
|
||||
{
|
||||
DeviceId = deviceId;
|
||||
DeviceName = deviceName;
|
||||
NewStatus = newStatus;
|
||||
ChangeTime = DateTime.Now;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user