public async void CBDownloadMadeProgress(object sender, AppCastItem item, ItemDownloadProgressEventArgs e) { await Task.Run(() => { if (LastProgressPercentage != e.ProgressPercentage) { LastProgressPercentage = e.ProgressPercentage; string DownloadLog = string.Format($"The download made some progress! {e.ProgressPercentage}% done."); SparkleInst.LogWriter.PrintMessage(DownloadLog); if (IsCancelRequested == false) { string DownloadInfo = string.Format($"{item.AppName} {item.Version}<br>The download made some progress! {e.ProgressPercentage}% done."); DownloadUpdate?.UpdateProgress(DownloadInfo, e.ProgressPercentage); } else { if (IsCanceled == false) { IsCanceled = true; Task.Delay(100); DownloadUpdate?.ClosePopUp(); } } } }); }
private void OnDownloadMadeProgress(object sender, AppCastItem appCastItem, ItemDownloadProgressEventArgs e) { UpdateProgressDownloadEventArgs eventArgs = new UpdateProgressDownloadEventArgs(); eventArgs.AppUpdateProgress = e.ProgressPercentage; EventHandler <UpdateProgressDownloadEventArgs> eventHandler = UpdateProgressEventHandler; eventHandler(this, eventArgs); }
/// <summary> /// /// </summary> public void OnDownloadProgressChanged(object sender, ItemDownloadProgressEventArgs e) { OnDownloadProgressChanged(sender, e.BytesReceived, e.TotalBytesToReceive, e.ProgressPercentage); }
private void OnDownloadMadeProgress(object sender, AppCastItem item, ItemDownloadProgressEventArgs args) { _progressText.Text = string.Format(Loc.Resolve("updater_dl_progress"), args.ProgressPercentage); _progressSizeText.Text = string.Format(Loc.Resolve("updater_dl_progress_size"), (args.BytesReceived / 1000000f).ToString("N2"), (args.TotalBytesToReceive / 1000000f).ToString("N2")); _progress.Value = args.ProgressPercentage; }
public void CBDownloadMadeProgress(object sender, AppCastItem item, ItemDownloadProgressEventArgs e) { // TODO: Display in progress -> DownloadInfo.Text = string.Format("The download made some progress! {0}% done.", e.ProgressPercentage); }
private void RuntimeModuleSubscriptionService_ItemDownloadProgress(object sender, ItemDownloadProgressEventArgs e) { int i = 0; int count = this.guiModules.Count; while (i < count) { if (this.guiModules[i].IsDownloading && this.guiModules[i].DownloadingModuleID == e.PublishedFileId) { this.guiModules[i].ModuleLine.RefreshDownloadProgress(e.BytesDownloaded, e.BytesTotal); } i++; } }
private void _sparkle_DownloadMadeProgress(object sender, AppCastItem item, ItemDownloadProgressEventArgs e) { DownloadInfo.Text = string.Format("The download made some progress! {0}% done.", e.ProgressPercentage); }