using System.Collections.Generic; using System.Linq; using RGB.NET.Core; namespace RGB.NET.Devices.Logitech { /// /// /// Represents a logitech per-device-lightable device. /// public class LogitechPerDeviceRGBDevice : LogitechRGBDevice, IUnknownDevice //TODO DarthAffe 18.04.2020: It's know which kind of device this is, but they would need to be separated { #region Constructors /// /// /// Initializes a new instance of the class. /// /// The specific information provided by logitech for the per-device-lightable device internal LogitechPerDeviceRGBDevice(LogitechRGBDeviceInfo info) : base(info) { } #endregion #region Methods /// protected override void InitializeLayout() { base.InitializeLayout(); if (LedMapping.Count == 0) InitializeLed(LedId.Custom1, new Rectangle(0, 0, 10, 10)); } /// protected override object CreateLedCustomData(LedId ledId) => (ledId, LogitechLedId.DEVICE); /// protected override void UpdateLeds(IEnumerable ledsToUpdate) => UpdateQueue.SetData(ledsToUpdate.Where(x => x.Color.A > 0).Take(1)); #endregion } }