1
0
mirror of https://github.com/DarthAffe/RGB.NET.git synced 2025-12-13 01:58:30 +00:00
RGB.NET/RGB.NET.Core/Events/DevicesChangedEventArgs.cs

36 lines
838 B
C#

using System;
namespace RGB.NET.Core;
public sealed class DevicesChangedEventArgs : EventArgs
{
#region Properties & Fields
public IRGBDevice Device { get; }
public DevicesChangedAction Action { get; }
#endregion
#region Constructors
public DevicesChangedEventArgs(IRGBDevice device, DevicesChangedAction action)
{
this.Device = device;
this.Action = action;
}
#endregion
#region Methods
public static DevicesChangedEventArgs CreateDevicesAddedArgs(IRGBDevice addedDevice) => new(addedDevice, DevicesChangedAction.Added);
public static DevicesChangedEventArgs CreateDevicesRemovedArgs(IRGBDevice removedDevice) => new(removedDevice, DevicesChangedAction.Removed);
#endregion
public enum DevicesChangedAction
{
Added,
Removed
}
}