private async void TurnOnAllMoon(object sender, RoutedEventArgs e) { await CeilingLed.Discover(async led => { await led.SetMoonLight(); await led.SetBrightness(50); }); }
private async void Window_Loaded(object sender, RoutedEventArgs e) { AppDomain.CurrentDomain.UnhandledException += OnUnhandledException; await CeilingLed.Discover(led => MainContent.Children.Add(new CeilingLedControl(led))); }
private async void TurnOffAll(object sender, RoutedEventArgs e) { await CeilingLed.Discover(async led => await led.SetPower(false)); }
public CeilingLedControl(CeilingLed led) { _led = led; InitializeComponent(); }