Beispiel #1
0
        private async void BrightnessSlider_MouseUp(object sender, System.Windows.Forms.MouseEventArgs e)
        {
            this.light.Brightness = this.BrightnessSlider.Value;
            var success = await BridgeApi.SetBrightness(this.lightId, this.light.Brightness);

            if (!success)
            {
                MetroMessageBox.Show(this, "The brightness could not been set!", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }
 private async void BrightnessSlider_MouseUp(object sender, System.Windows.Forms.MouseEventArgs e)
 {
     await BridgeApi.SetBrightness(this.light.Id, this.BrightnessSlider.Value);
 }