Beispiel #1
0
        /// <summary>
        /// ダウンロードの進行度を表示します。
        /// </summary>
        private void ShowProgress()
        {
            if (this.progressWindow != null)
            {
                this.progressWindow.Activate();
                return;
            }

            if (this.updateWindow != null)
            {
                return;
            }

            this.progressWindow = new DownloadProgressWindow
            {
                Topmost     = true,
                DataContext = this,
            };
            this.progressWindow.Closed        +=
                (_, __) => this.progressWindow = null;

            this.progressWindow.ShowDialog();
        }
Beispiel #2
0
        void updater_DownloadDone(object sender, DownloadDoneEventArgs e)
        {
            DownloadError = e.Error;

            if (e.IsCancelled)
            {
                return;
            }

            if (e.Error != null)
            {
                WPFUtil.UIProcess(() =>
                                  DialogUtil.ShowError("更新ファイルのダウンロードに失敗しました。"));
                return;
            }

            WPFUtil.UIProcess(() =>
            {
                if (!this.updater.CanExecutePack())
                {
                    // 更新できません><
                    return;
                }

                if (this.progressWindow != null)
                {
                    this.progressWindow.Close();
                    this.progressWindow = null;
                }

                if (ConfirmUpdate(true))
                {
                    ExecuteUpdate();
                }
            });
            e.IsUpdate = false;
        }
        void updater_DownloadDone(object sender, DownloadDoneEventArgs e)
        {
            DownloadError = e.Error;

            if (e.IsCancelled)
            {
                return;
            }

            if (e.Error != null)
            {
                WPFUtil.UIProcess(() =>
                    DialogUtil.ShowError("更新ファイルのダウンロードに失敗しました。"));
                return;
            }

            WPFUtil.UIProcess(() =>
            {
                if (!this.updater.CanExecutePack())
                {
                    // 更新できません><
                    return;
                }

                if (this.progressWindow != null)
                {
                    this.progressWindow.Close();
                    this.progressWindow = null;
                }

                if (ConfirmUpdate(true))
                {
                    ExecuteUpdate();
                }
            });
            e.IsUpdate = false;
        }
        /// <summary>
        /// ダウンロードの進行度を表示します。
        /// </summary>
        private void ShowProgress()
        {
            if (this.progressWindow != null)
            {
                this.progressWindow.Activate();
                return;
            }

            if (this.updateWindow != null)
            {
                return;
            }

            this.progressWindow = new DownloadProgressWindow
            {
                Topmost = true,
                DataContext = this,
            };
            this.progressWindow.Closed +=
                (_, __) => this.progressWindow = null;

            this.progressWindow.ShowDialog();
        }