// ReSharper disable MemberCanBePrivate.Global // ReSharper disable UnusedMember.Global using RGB.NET.Core; using RGB.NET.Devices.Razer.Native; namespace RGB.NET.Devices.Razer { /// /// /// Represents a razer keyboard. /// public class RazerKeyboardRGBDevice : RazerRGBDevice { #region Constructors /// /// /// Initializes a new instance of the class. /// /// The specific information provided by CUE for the keyboard. internal RazerKeyboardRGBDevice(RazerKeyboardRGBDeviceInfo info) : base(info) { } #endregion #region Methods /// protected override void InitializeLayout() { //string model = DeviceInfo.Model.Replace(" ", string.Empty).ToUpper(); //ApplyLayoutFromFile(PathHelper.GetAbsolutePath( // $@"Layouts\Razer\Keyboards\{model}\{DeviceInfo.PhysicalLayout.ToString().ToUpper()}.xml"), // DeviceInfo.LogicalLayout.ToString(), PathHelper.GetAbsolutePath(@"Images\Razer\Keyboards")); //TODO DarthAffe 13.12.2017: Correctly select ids if (LedMapping.Count == 0) { for (int i = 0; i < _Defines.KEYBOARD_MAX_ROW; i++) for (int j = 0; j < _Defines.KEYBOARD_MAX_COLUMN; j++) InitializeLed(LedId.Keyboard_Escape + ((i * _Defines.KEYBOARD_MAX_COLUMN) + j), new Rectangle(j * 20, i * 20, 19, 19)); } } /// protected override object CreateLedCustomData(LedId ledId) => (int)ledId - (int)LedId.Keyboard_Escape; /// protected override RazerUpdateQueue CreateUpdateQueue(IUpdateTrigger updateTrigger) => new RazerKeyboardUpdateQueue(updateTrigger, DeviceInfo.DeviceId); #endregion } }