/// <summary> /// Internal constructor of managed <see cref="CoolerMasterRGBDeviceInfo"/>. /// </summary> /// <param name="deviceType">The type of the <see cref="IRGBDevice"/>.</param> /// <param name="deviceIndex">The <see cref="CoolerMasterDevicesIndexes"/> of the <see cref="IRGBDevice"/>.</param> internal CoolerMasterRGBDeviceInfo(RGBDeviceType deviceType, CoolerMasterDevicesIndexes deviceIndex) { this.DeviceType = deviceType; this.DeviceIndex = deviceIndex; Model = deviceIndex.GetDescription(); }
/// <inheritdoc /> /// <summary> /// Internal constructor of managed <see cref="T:RGB.NET.Devices.CoolerMaster.CoolerMasterKeyboardRGBDeviceInfo" />. /// </summary> /// <param name="deviceIndex">The index of the <see cref="T:RGB.NET.Devices.CoolerMaster.CoolerMasterKeyboardRGBDevice" />.</param> /// <param name="physicalKeyboardLayout">The <see cref="T:RGB.NET.Devices.CoolerMaster.CoolerMasterPhysicalKeyboardLayout" /> of the <see cref="T:RGB.NET.Devices.CoolerMaster.CoolerMasterKeyboardRGBDevice" />.</param> /// <param name="culture">The <see cref="T:System.Globalization.CultureInfo" /> of the layout this keyboard is using</param> internal CoolerMasterKeyboardRGBDeviceInfo(CoolerMasterDevicesIndexes deviceIndex, CoolerMasterPhysicalKeyboardLayout physicalKeyboardLayout, CultureInfo culture) : base(RGBDeviceType.Keyboard, deviceIndex) { this.PhysicalLayout = physicalKeyboardLayout; SetLayouts(culture.KeyboardLayoutId); }
/// <summary> /// Initializes a new instance of the <see cref="CoolerMasterUpdateQueue"/> class. /// </summary> /// <param name="updateTrigger">The update trigger used by this queue.</param> /// <param name="deviceIndex">The <see cref="CoolerMasterDevicesIndexes"/> of the device this queue performs updates for.</param> public CoolerMasterUpdateQueue(IDeviceUpdateTrigger updateTrigger, CoolerMasterDevicesIndexes deviceIndex) : base(updateTrigger) { this._deviceIndex = deviceIndex; _deviceMatrix = new _CoolerMasterColorMatrix(); _deviceMatrix.KeyColor = new _CoolerMasterKeyColor[_CoolerMasterColorMatrix.ROWS, _CoolerMasterColorMatrix.COLUMNS]; }
/// <summary> /// Internal constructor of managed <see cref="CoolerMasterRGBDeviceInfo"/>. /// </summary> /// <param name="deviceType">The type of the <see cref="IRGBDevice"/>.</param> /// <param name="deviceIndex">The <see cref="CoolerMasterDevicesIndexes"/> of the <see cref="IRGBDevice"/>.</param> internal CoolerMasterRGBDeviceInfo(RGBDeviceType deviceType, CoolerMasterDevicesIndexes deviceIndex) { this.DeviceType = deviceType; this.DeviceIndex = deviceIndex; Model = deviceIndex.GetDescription(); DeviceName = $"{Manufacturer} {Model}"; }
/// <inheritdoc /> /// <summary> /// Internal constructor of managed <see cref="T:RGB.NET.Devices.CoolerMaster.CoolerMasterKeyboardRGBDeviceInfo" />. /// </summary> /// <param name="deviceIndex">The index of the <see cref="T:RGB.NET.Devices.CoolerMaster.CoolerMasterKeyboardRGBDevice" />.</param> /// <param name="physicalKeyboardLayout">The <see cref="T:RGB.NET.Devices.CoolerMaster.CoolerMasterPhysicalKeyboardLayout" /> of the <see cref="T:RGB.NET.Devices.CoolerMaster.CoolerMasterKeyboardRGBDevice" />.</param> /// <param name="culture">The <see cref="T:System.Globalization.CultureInfo" /> of the layout this keyboard is using</param> internal CoolerMasterKeyboardRGBDeviceInfo(CoolerMasterDevicesIndexes deviceIndex, CoolerMasterPhysicalKeyboardLayout physicalKeyboardLayout, CultureInfo culture) : base(RGBDeviceType.Keyboard, deviceIndex) { this.PhysicalLayout = physicalKeyboardLayout; SetLayouts(culture.KeyboardLayoutId); Image = new Uri(PathHelper.GetAbsolutePath($@"Images\CoolerMaster\Keyboards\{Model.Replace(" ", string.Empty).ToUpper()}.png"), UriKind.Absolute); }
/// <inheritdoc /> /// <summary> /// Internal constructor of managed <see cref="T:RGB.NET.Devices.CoolerMaster.CoolerMasterMouseRGBDeviceInfo" />. /// </summary> /// <param name="deviceIndex">The index of the <see cref="T:RGB.NET.Devices.CoolerMaster.CoolerMasterMouseRGBDevice" />.</param> internal CoolerMasterMouseRGBDeviceInfo(CoolerMasterDevicesIndexes deviceIndex) : base(RGBDeviceType.Mouse, deviceIndex) { }
/// <summary> /// CM-SDK: set operating device /// </summary> internal static void SetControlDevice(CoolerMasterDevicesIndexes devicesIndexes) { _setControlDevicenPointer(devicesIndexes); }
/// <summary> /// Initializes a new instance of the <see cref="CoolerMasterUpdateQueue"/> class. /// </summary> /// <param name="updateTrigger">The update trigger used by this queue.</param> /// <param name="deviceIndex">The <see cref="CoolerMasterDevicesIndexes"/> of the device this queue performs updates for.</param> public CoolerMasterUpdateQueue(IDeviceUpdateTrigger updateTrigger, CoolerMasterDevicesIndexes deviceIndex) : base(updateTrigger) { this._deviceIndex = deviceIndex; }
/// <summary> /// CM-SDK: Set Keyboard "every LED" color /// </summary> internal static bool SetAllLedColor(_CoolerMasterColorMatrix colorMatrix, CoolerMasterDevicesIndexes devIndex = CoolerMasterDevicesIndexes.Default) => _setAllLedColorPointer(colorMatrix, devIndex);
/// <summary> /// CM-SDK: Set single Key LED color /// </summary> internal static bool SetLedColor(int row, int column, byte r, byte g, byte b, CoolerMasterDevicesIndexes devIndex = CoolerMasterDevicesIndexes.Default) => _setLedColorPointer(row, column, r, g, b, devIndex);
/// <summary> /// CM-SDK: Print out the lights setting from Buffer to LED /// </summary> internal static bool RefreshLed(bool autoRefresh, CoolerMasterDevicesIndexes devIndex = CoolerMasterDevicesIndexes.Default) => _refreshLedPointer(autoRefresh, devIndex);
/// <summary> /// CM-SDK: set control over device’s LED /// </summary> internal static bool EnableLedControl(bool value, CoolerMasterDevicesIndexes devIndex = CoolerMasterDevicesIndexes.Default) => _enableLedControlPointer(value, devIndex);
/// <summary> /// CM-SDK: Obtain current device layout /// </summary> internal static CoolerMasterPhysicalKeyboardLayout GetDeviceLayout(CoolerMasterDevicesIndexes devIndex = CoolerMasterDevicesIndexes.Default) => _getDeviceLayoutPointer(devIndex);
/// <summary> /// CM-SDK: verify if the deviced is plugged in /// </summary> internal static bool IsDevicePlugged(CoolerMasterDevicesIndexes devIndex = CoolerMasterDevicesIndexes.Default) => _isDevicePlugPointer(devIndex);