修复删除设备时的错误

This commit is contained in:
2025-10-01 18:02:33 +08:00
parent eb4bee8963
commit 03e92811dd
4 changed files with 33 additions and 1 deletions

View File

@@ -29,6 +29,11 @@ public class EventService : IEventService
/// </summary>
public event EventHandler<DeviceConnectChangedEventArgs> OnDeviceConnectChanged;
/// <summary>
/// 设备添加事件
/// </summary>
public event EventHandler<DeviceChangedEventArgs> OnDeviceChanged;
/// <summary>
/// 触发设备状态改变事件
@@ -58,6 +63,16 @@ public class EventService : IEventService
}
/// <summary>
/// 触发设备添加事件
/// </summary>
/// <param name="sender">事件发送者</param>
/// <param name="e">设备变更事件参数</param>
public void RaiseDeviceChanged(object sender, DeviceChangedEventArgs e)
{
OnDeviceChanged?.Invoke(sender, e);
}
#endregion
#region