protected override void OnExit(ExitEventArgs e)
 {
     GlobalConsts.SaveConsts();
     if (GlobalConsts.UpdateOnExit && !string.IsNullOrWhiteSpace(GlobalConsts.UpdateSetupLocation) && GlobalConsts.UpdateFinishedDownloading)
     {
         Process.Start(GlobalConsts.UpdateSetupLocation);
     }
     else
     {
         GlobalConsts.CleanTempFolder();
     }
     base.OnExit(e);
 }
 private void SubscriptionsUpdateDelayTextBox_TextChanged(object sender, TextChangedEventArgs e)
 {
     if (int.TryParse(SubscriptionsUpdateDelayTextBox.Text, out int delay))
     {
         if (delay <= 0)
         {
             SubscriptionsUpdateDelayTextBox.Background = GlobalConsts.ErrorBrush;
             return;
         }
         GlobalConsts.SubscriptionsUpdateDelay      = TimeSpan.FromMinutes(delay);
         SubscriptionsUpdateDelayTextBox.Background = null;
         GlobalConsts.SaveConsts();
     }
     else
     {
         SubscriptionsUpdateDelayTextBox.Background = GlobalConsts.ErrorBrush;
     }
 }
Exemplo n.º 3
0
 private void Exit_Click(object sender, RoutedEventArgs e)
 {
     GlobalConsts.SaveConsts();
     GlobalConsts.LoadPage(GlobalConsts.MainPage.Load());
 }
 private void CheckBox_Unchecked(object sender, RoutedEventArgs e)
 {
     GlobalConsts.CheckForSubscriptionUpdates = CheckForSubscriptionUpdatesCheckBox.IsChecked.Value;
     GlobalConsts.SaveConsts();
 }