private void cbStartupAtLogin_Click(object sender, RoutedEventArgs e) { if (cbStartupAtLogin.IsChecked.HasValue && cbStartupAtLogin.IsChecked.Value) { if (!StartupShortcut.Exist()) { StartupShortcut.Add(); } } else { if (StartupShortcut.Exist()) { StartupShortcut.Remove(); } } }
/// <summary> /// Window with various configurations to customize the application /// Init default value for config parameters /// </summary> public ConfigurationWindow() { InitializeComponent(); cbNotifications.IsChecked = Config.getInstance().ShowNotification; cbStartupAtLogin.IsChecked = StartupShortcut.Exist(); }