private void ButtonCheck_Click(object sender, RoutedEventArgs e) { Close(); _ = _autoUpdater.CheckForUpdates(true); Window window = new UpdateWindow(_autoUpdater) { Owner = Owner }; window.ShowDialog(); }
private void UpdateModel_PropertyChanged(object sender, PropertyChangedEventArgs e) { UpdateModel model = (UpdateModel)sender; if (e.PropertyName == "Status" && model.Status == UpdateStatus.NewUpdate) { WindowCollection windows = Application.Current.Windows; for (int i = 0; i < windows.Count; i++) { if (windows[i] is UpdateWindow) { return; } } UpdateWindow window = new UpdateWindow(_autoUpdater) { Owner = this }; window.ShowDialog(); } }