Beispiel #1
0
 public void SetButtonLed(XTouchMiniMcButton button, McLedState ledState)
 {
     if (State != ConnectionState.Open)
     {
         throw new InvalidOperationException($"SetButtonLed is only possible if the state is {ConnectionState.Open}.");
     }
     _midiOut?.Send(MidiEventStatusType.NoteOn, button.MidiCode, (byte)ledState);
 }
        public Task SetLedState(IDeviceLed deviceLed, DeviceLedState ledState)
        {
            McLedState xTouchLedState = AsMcLedState(ledState);

            return(Task.Run(() => base.SetButtonLed(XTouchMiniMcButton.Controls[(byte)deviceLed.Id], xTouchLedState)));
        }