private void ThreadedPanelIdentification(CancellationToken cancellationToken) { try { while (true) { var bitmap = BitMapCreator.CreateEmptyStreamDeckBitmap(_colors[_random.Next(0, 20)]); _streamDeckPanel.SetImage(_random.Next(0, _streamDeckPanel.ButtonCount - 1), bitmap); Thread.Sleep(50); if (cancellationToken.IsCancellationRequested) { break; } } } catch (Exception ex) { Common.LogError(ex); } }
public static void TestImage(this StreamDeckFaceTextBox textBox, StreamDeckPanel streamDeckPanel) { var bitmap = BitMapCreator.CreateStreamDeckBitmap(textBox.Text, textBox.Bill.TextFont, textBox.Bill.FontColor, textBox.Bill.BackgroundColor, textBox.Bill.OffsetX, textBox.Bill.OffsetY); streamDeckPanel.SetImage(streamDeckPanel.SelectedButtonName, bitmap); }