Ejemplo n.º 1
0
 public static void CheckForUpdates(bool ForceWatch)
 {
     if (GlobalProperties.Instance.WatchForUpdates || ForceWatch)
     {
         new Thread(() =>
         {
             Thread.CurrentThread.IsBackground = true;
             if (IDEUtil.IsUpdateAvailable)
             {
                 if (MessageBox.Show("A program update is available. Install it now?\r\nWarning: The program will be closed then!",
                                     "Update available",
                                     MessageBoxButton.YesNo,
                                     MessageBoxImage.Question,
                                     MessageBoxResult.Yes) == MessageBoxResult.Yes)
                 {
                     IDEUtil.DoUpdate();
                 }
             }
             else if (ForceWatch)
             {
                 MessageBox.Show("No update available.", "Obtaining online status.");
             }
         }).Start();
     }
 }
Ejemplo n.º 2
0
 private void Button_Update_Click(object sender, RoutedEventArgs e)
 {
     IDEUtil.CheckForUpdates(true);
 }
Ejemplo n.º 3
0
 private void RibbonWindow_Loaded(object sender, RoutedEventArgs e)
 {
     IDEUtil.CheckForUpdates(false);
 }