using System.Collections.Generic; using RGB.NET.Core; using RGB.NET.Devices.Msi.Native; namespace RGB.NET.Devices.Msi { /// /// /// Represents the update-queue performing updates for MSI devices. /// public class MsiDeviceUpdateQueue : UpdateQueue { #region Properties & Fields private string _deviceType; #endregion #region Constructors /// /// Initializes a new instance of the class. /// /// The update trigger used by this queue. /// The device-type used to identify the device. public MsiDeviceUpdateQueue(IDeviceUpdateTrigger updateTrigger, string deviceType) : base(updateTrigger) { this._deviceType = deviceType; } #endregion #region Methods /// protected override void Update(Dictionary dataSet) { foreach (KeyValuePair data in dataSet) _MsiSDK.SetLedColor(_deviceType, (int)data.Key, data.Value.GetR(), data.Value.GetG(), data.Value.GetB()); } #endregion } }