/// <inheritdoc /> /// <summary> /// Sets all Chroma devices to the specified <see cref="Color" />. /// </summary> /// <param name="color">The <see cref="Color" /> to set.</param> public async Task SetAllAsync(Color color) { await Keyboard.SetAllAsync(color).ConfigureAwait(false); await Mouse.SetAllAsync(color).ConfigureAwait(false); await Mousepad.SetAllAsync(color).ConfigureAwait(false); await Keypad.SetAllAsync(color).ConfigureAwait(false); await Headset.SetAllAsync(color).ConfigureAwait(false); await ChromaLink.SetAllAsync(color).ConfigureAwait(false); }
public override Task ApplyAsync(IVirtualLedGrid virtualGrid, CancellationToken cancellationToken = default) { if (!this.Initialized) { return(Task.CompletedTask); } var chromaLinkGrid = CustomChromaLinkEffect.Create(); var keyIdx = 0; foreach (var key in virtualGrid) { chromaLinkGrid[keyIdx++] = ToColoreColor(key.Color); } return(this.ChromaInterface !.ChromaLink.SetCustomAsync(chromaLinkGrid)); }
public DeviceContainer() { Keyboard = new Keyboard(); Headset = new Headset(); Mouse = new Mouse(); Mousepad = new Mousepad(); Keypad = new Keypad(); ChromaLink = new ChromaLink(); Devices = new List <IDevice>() { Keyboard, Headset, Mouse, Mousepad, Keypad, ChromaLink }; }