/// <inheritdoc /> public void Run() { if (_appSettingFromConfigurationManager.ValueFor("autostart").Equals("true")) { _autoStart.Enable(); } else { _autoStart.Disable(); } }
private void AutoStartIsCheckedChanged(object sender, EventArgs e) { var toggleSwitch = (ToggleSwitch)sender; if (_overrideProtection == 0) { return; } if (toggleSwitch.IsChecked.HasValue && toggleSwitch.IsChecked.Value) { _autoStart.Enable(); } else if (_autoStart.IsEnabled) { _autoStart.Disable(); } }