Esempio n. 1
0
        private async void AdvancedSettings_ShowFeedbackWarning(object sender, EventArgs e)
        {
            var result =
                await
                this.ShowMessageAsync(Properties.Resources.DialogAdvancedFeaturesWarningTitle,
                                      Properties.Resources.DialogAdvancedFeaturesWarningText, MessageDialogStyle.AffirmativeAndNegative);

            if (result == MessageDialogResult.Affirmative)
            {
                Settings.Default.EnableAdvancedFeatures = true;
                Settings.Default.Save();
                ProcessWatcher.Restart();
            }

            UpdateContent?.Invoke();
        }
 private void CheckboxChanged(object sender, RoutedEventArgs e)
 {
     if (CheckEnableAdvancedFeatures.IsChecked.Value != Settings.Default.EnableAdvancedFeatures)
     {
         if (Settings.Default.EnableAdvancedFeatures == false)
         {
             ShowFeedbackWarning?.Invoke(null, null);
         }
         else
         {
             Settings.Default.EnableAdvancedFeatures = false;
             Settings.Default.Save();
             ProcessWatcher.Restart();
             MainWindow.UpdateChildren();
         }
     }
 }