private void Window_Closing(object sender, System.ComponentModel.CancelEventArgs e) { _currentWindow = null; if (_isSentCommandToUpdater == false) { Updater.Cancel(); } }
public static void ShowWindow(Appcast appcast) { Application.Current.Dispatcher.Invoke(() => { _currentWindow = new UpdateAvailableDialog(appcast); _currentWindow.Owner = Application.Current.MainWindow; _currentWindow.Show(); }); }
public static void HideWindow() { Application.Current.Dispatcher.Invoke(() => { if (_currentWindow != null) { _currentWindow.Close(); } _currentWindow = null; }); }
private static void Updater_NewUpdateAvailable(Appcast appcast) { UpdateAvailableDialog.ShowWindow(appcast); }
private static void HideWindows() { CheckingForUpdateWindow.HideWindow(); UpdateAvailableDialog.HideWindow(); DownloadProgressWindow.HideWindow(); }