using System.Linq; using RGB.NET.Core; namespace RGB.NET.Devices.Corsair { /// /// Represents a generic CUE-device. (keyboard, mouse, headset, mousmat). /// public abstract class CorsairRGBDevice : AbstractRGBDevice { #region Properties & Fields /// /// Gets information about the . /// public override IRGBDeviceInfo DeviceInfo { get; } private Rectangle _deviceRectangle; /// public override Rectangle DeviceRectangle => _deviceRectangle; #endregion #region Constructors /// /// Initializes a new instance of the class. /// /// The generic information provided by CUE for the device. protected CorsairRGBDevice(IRGBDeviceInfo info) { this.DeviceInfo = info; } #endregion #region Methods /// /// Initializes the device. /// internal void Initialize() { InitializeLeds(); _deviceRectangle = new Rectangle(this.Select(x => x.LedRectangle)); } /// /// Initializes the of the device. /// protected abstract void InitializeLeds(); #endregion } }