public ScheduledTaskConfig() { InitializeComponent(); //check if scheduled task already configured TaskSettings.UseBackgroundService = AppViewModel.Current.Preferences.UseBackgroundServiceAutoRenewal; var taskScheduler = new Shared.TaskScheduler(); TaskSettings.TaskConfigured = taskScheduler.IsWindowsScheduledTaskPresent(); if (TaskSettings.TaskConfigured) { AutoRenewPrompt.Text = SR.ScheduledTaskConfig_AlreadyConfiged; AutoRenewPrompt.Foreground = Brushes.DarkGreen; } DataContext = TaskSettings; if (TaskSettings.UseBackgroundService) { RadioUseBackgroundService.IsChecked = true; RadioUseScheduledTask.IsChecked = false; } else { RadioUseBackgroundService.IsChecked = false; RadioUseScheduledTask.IsChecked = true; } }
public ScheduledTaskConfig() { InitializeComponent(); //check if scheduled task already configured var taskScheduler = new Shared.TaskScheduler(); TaskConfigured = taskScheduler.IsWindowsScheduledTaskPresent(); if (TaskConfigured) { AutoRenewPrompt.Text = SR.ScheduledTaskConfig_AlreadyConfiged; AutoRenewPrompt.Foreground = Brushes.DarkGreen; } }