using System.Collections.Generic; using RGB.NET.Core; using RGB.NET.Devices.Wooting.Generic; namespace RGB.NET.Devices.Wooting.Keypad; /// /// /// Represents a Wooting keyboard. /// public sealed class WootingKeypadRGBDevice : WootingRGBDevice, IKeypad { #region Constructors /// /// /// Initializes a new instance of the class. /// /// The specific information provided by Wooting for the keyboard /// The update queue used to update this device. internal WootingKeypadRGBDevice(WootingKeypadRGBDeviceInfo info, IUpdateQueue updateQueue) : base(info, updateQueue) { InitializeLayout(); } #endregion #region Methods private void InitializeLayout() { Dictionary mapping = WootingLedMappings.Mapping[DeviceInfo.WootingDeviceType]; foreach (KeyValuePair led in mapping) AddLed(led.Key, new Point(led.Value.column * 19, led.Value.row * 19), new Size(19, 19)); } /// protected override object GetLedCustomData(LedId ledId) => WootingLedMappings.Mapping[DeviceInfo.WootingDeviceType][ledId]; #endregion }