Пример #1
0
        public static void ShowUpdate()
        {
            if (App.Settings.LatestRelease == null)
            {
                return;
            }

            var window = new UpdateDialog();

            window.Owner = Application.Current.MainWindow;
            window.ShowDialog();
        }
Пример #2
0
        private void menuUpdates_Click(object sender, RoutedEventArgs e)
        {
            Task.Run(async() =>
            {
                if (!await CheckForUpdates())
                {
                    MessageBox.Show("Error checking for updates.", nameof(Reclaimer));
                    return;
                }

                await Dispatcher.InvokeAsync(() =>
                {
                    if (!HasUpdate)
                    {
                        MessageBox.Show("No updates available.", nameof(Reclaimer));
                    }
                    else
                    {
                        UpdateDialog.ShowUpdate();
                    }
                });
            });
        }
Пример #3
0
        private void menuUpdates_Click(object sender, RoutedEventArgs e)
        {
            Task.Run(async() =>
            {
                if (!await CheckForUpdates())
                {
                    MessageBox.Show(Terminology.Message.ErrorCheckingUpdates, Terminology.UI.Reclaimer);
                    return;
                }

                await Dispatcher.InvokeAsync(() =>
                {
                    if (!HasUpdate)
                    {
                        MessageBox.Show(Terminology.Message.NoUpdatesAvailable, Terminology.UI.Reclaimer);
                    }
                    else
                    {
                        UpdateDialog.ShowUpdate();
                    }
                });
            });
        }