Ejemplo n.º 1
0
 /// <summary>
 /// Invokes LedChanged event.
 /// </summary>
 /// <param name="e">Arguments passed with event.</param>
 protected virtual void OnLedChanged(LedEventArgs e)
 {
     LedChanged?.Invoke(this, e);
 }
Ejemplo n.º 2
0
 /// <summary>
 /// Starts observing LED's brightness for changes.
 /// </summary>
 /// <remarks>
 /// Event LedChanged will be never invoked before calling this method.
 /// </remarks>
 public void StartListening()
 {
     Led.BrightnessChanged += (s, e) => { LedChanged?.Invoke(s, new LedEventArgs(e.Brightness)); };
 }