private void AutoUpdaterOnCheckForUpdateEvent(UpdateInfoEventArgs args)
        {
            Dispatcher.Invoke(() =>
            {
                if (args.IsUpdateAvailable)
                {
                    if (args.CurrentVersion == Settings.Default.SkippedUpdate && !_isManualUpdate)
                    {
                        return;
                    }

                    _updatePage.SetInfo(args);
                    var x = Properties.Settings.Default.SkippedUpdate;
                    Console.WriteLine(x);
                    PageControl.TransitionType = PageTransitionType.Fade;
                    PageControl.ShowPage(_updatePage);
                }
                else if (_isManualUpdate)
                {
                    MessageBox.Show(Loc.GetString("updater_noupdate"),
                                    Loc.GetString("updater_noupdate_title"), MessageBoxButton.OK, MessageBoxImage.Information);
                }

                _isManualUpdate = false;
            });
        }
예제 #2
0
        private void AutoUpdaterOnCheckForUpdateEvent(UpdateInfoEventArgs args)
        {
            Dispatcher.Invoke(() =>
            {
                if (args.IsUpdateAvailable)
                {
                    if (args.CurrentVersion == Properties.Settings.Default.SkippedUpdate && !_isManualUpdate)
                    {
                        return;
                    }

                    _updatePage.SetInfo(args);
                    var x = Properties.Settings.Default.SkippedUpdate;
                    Console.WriteLine(x);
                    PageControl.TransitionType = PageTransitionType.Fade;
                    PageControl.ShowPage(_updatePage);
                }
                else if (_isManualUpdate)
                {
                    /*SWMessageWindow w = new SWMessageWindow("No updates are available at the moment.\n" +
                     *                                      "Please try again later or check and subscribe the GitHub page for updates.")
                     * {
                     *  OptionsLabel = {Visibility = Visibility.Hidden}
                     * };
                     * w.ShowDialog();*/
                    MessageBox.Show("No updates are available at the moment.\n" +
                                    "Please try again later or check and subscribe the GitHub page for updates.",
                                    "No updates", MessageBoxButton.OK, MessageBoxImage.Information);
                }

                _isManualUpdate = false;
            });
        }