コード例 #1
0
        /// <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();
        }
コード例 #2
0
        /// <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);
        }
コード例 #3
0
        /// <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];
        }
コード例 #4
0
        /// <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}";
        }
コード例 #5
0
        /// <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);
        }
コード例 #6
0
 /// <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)
 {
 }
コード例 #7
0
 /// <summary>
 /// CM-SDK: set operating device
 /// </summary>
 internal static void SetControlDevice(CoolerMasterDevicesIndexes devicesIndexes)
 {
     _setControlDevicenPointer(devicesIndexes);
 }
コード例 #8
0
 /// <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;
 }
コード例 #9
0
 /// <summary>
 /// CM-SDK: Set Keyboard "every LED" color
 /// </summary>
 internal static bool SetAllLedColor(_CoolerMasterColorMatrix colorMatrix, CoolerMasterDevicesIndexes devIndex = CoolerMasterDevicesIndexes.Default)
 => _setAllLedColorPointer(colorMatrix, devIndex);
コード例 #10
0
 /// <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);
コード例 #11
0
 /// <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);
コード例 #12
0
 /// <summary>
 /// CM-SDK: set control over device’s LED
 /// </summary>
 internal static bool EnableLedControl(bool value, CoolerMasterDevicesIndexes devIndex = CoolerMasterDevicesIndexes.Default)
 => _enableLedControlPointer(value, devIndex);
コード例 #13
0
 /// <summary>
 /// CM-SDK: Obtain current device layout
 /// </summary>
 internal static CoolerMasterPhysicalKeyboardLayout GetDeviceLayout(CoolerMasterDevicesIndexes devIndex = CoolerMasterDevicesIndexes.Default)
 => _getDeviceLayoutPointer(devIndex);
コード例 #14
0
 /// <summary>
 /// CM-SDK: verify if the deviced is plugged in
 /// </summary>
 internal static bool IsDevicePlugged(CoolerMasterDevicesIndexes devIndex = CoolerMasterDevicesIndexes.Default)
 => _isDevicePlugPointer(devIndex);