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(); } }
private void Button_Update_Click(object sender, RoutedEventArgs e) { IDEUtil.CheckForUpdates(true); }
private void RibbonWindow_Loaded(object sender, RoutedEventArgs e) { IDEUtil.CheckForUpdates(false); }