示例#1
0
        public void Show(bool showIfNoUpdateAvailable, bool silentCheck)
        {
            if (IsVisible)
            {
                Activate();
                return;
            }

            if (!silentCheck)
            {
                Show();
            }

            _updater.GetChangelog();

            var updaterTask = _updater.CheckForUpdates();

            if (silentCheck)
            {
                updaterTask.ContinueWith(t =>
                {
                    if (!_updater.UpdateAvailable && !showIfNoUpdateAvailable)
                    {
                        return;
                    }

                    Dispatcher.Invoke(() =>
                    {
                        if (!_error)
                        {
                            if (!_error)
                            {
                                Show();
                            }
                        }
                    });
                });
            }
        }
        public void Show(bool ShowIfNoUpdateAvailable, bool SilentCheck)
        {
            if (IsVisible)
            {
                this.Activate();
                return;
            }

            if (!SilentCheck)
            {
                this.Show();
            }

            updater.GetChangelog();

            var updaterTask = updater.CheckForUpdates();

            if (SilentCheck)
            {
                updaterTask.ContinueWith(t =>
                {
                    if (!updater.UpdateAvailable && !ShowIfNoUpdateAvailable)
                    {
                        return;
                    }

                    Dispatcher.Invoke(() =>
                    {
                        if (!error)
                        {
                            if (!error)
                            {
                                this.Show();
                            }
                        }
                    });
                });
            }
        }