public LightableButtonConfig(int ledPin, int buttonPin, ButtonIdentifier buttonIdentifier) { this.Id = buttonIdentifier; this.LedPin = ledPin; this.ButtonPin = buttonPin; }
public ButtonPressedEventArgs(ButtonIdentifier identifier, bool isPressed) { this.Identifier = identifier; this.IsPressed = isPressed; }
public override async Task Set(ButtonIdentifier button, bool enabled, TimeSpan?duration = null) { var lightableButton = this.lookup[button]; await lightableButton.SetLight(enabled, duration); }
public override ILightableButton this[ButtonIdentifier buttonIdentifier] { get { return(this.LedButtonPinPins.FirstOrDefault(lbpp => lbpp.ButtonIdentifier.Equals(buttonIdentifier))); } }
public abstract Task Set(ButtonIdentifier button, bool enabled, TimeSpan?duration = null);
public abstract ILightableButton this[ButtonIdentifier buttonIdentifier] { get; }