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