/// <summary> /// アプリを更新するかどうかイベントを通して確認します。 /// </summary> private bool OnDownloadDone(bool cancelled, Exception ex) { var e = new DownloadDoneEventArgs { IsUpdate = false, ApplicationConfig = this.config, LatestVersion = this.latestVersion, IsCancelled = cancelled, Error = ex, }; DownloadDone.SafeRaiseEvent(this, e); return(e.IsUpdate); }
/// <summary> /// アプリを更新するかどうかイベントを通して確認します。 /// </summary> private bool OnDownloadDone(bool cancelled, Exception ex) { var e = new DownloadDoneEventArgs { IsUpdate = false, ApplicationConfig = this.config, LatestVersion = this.latestVersion, IsCancelled = cancelled, Error = ex, }; DownloadDone.SafeRaiseEvent(this, e); return e.IsUpdate; }
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; }