示例#1
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();
                    }
                });
            });
        }
示例#2
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();
                    }
                });
            });
        }