Пример #1
0
        private void ButtonCheck_Click(object sender, RoutedEventArgs e)
        {
            Close();

            _ = _autoUpdater.CheckForUpdates(true);

            Window window = new UpdateWindow(_autoUpdater)
            {
                Owner = Owner
            };

            window.ShowDialog();
        }
Пример #2
0
        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();
            }
        }