public void Apply() { LightBulb.SetBrightness(Brightness); if (Brightness == 0) { LightBulb.SwitchOff(); } }