Beispiel #1
0
 // Implementation of IDownloadProgressChangedCallback interface...
 public void Invoke(IInstallationJob iInstallationJob, IInstallationProgressChangedCallbackArgs e)
 {
     form1.ShowProgressMessage(
         "progress_install",
         "安装进度: "
         + e.Progress.CurrentUpdateIndex
         + " / "
         + iInstallationJob.Updates.Count
         + " - 已完成 "
         + e.Progress.CurrentUpdatePercentComplete + "%");
 }
Beispiel #2
0
            // Implementation of IDownloadProgressChangedCallback interface...
            public void Invoke(IDownloadJob downloadJob,
                               IDownloadProgressChangedCallbackArgs e)
            {
                decimal downloaded   = ((e.Progress.TotalBytesDownloaded / 1024) / 1024);
                decimal toDownloaded = ((e.Progress.TotalBytesToDownload / 1024) / 1024);

                downloaded   = decimal.Round(downloaded, 2);
                toDownloaded = decimal.Round(toDownloaded, 2);

                form1.ShowProgressMessage("progress_download",
                                          "下载进度: "
                                          + e.Progress.CurrentUpdateIndex
                                          + "/"
                                          + downloadJob.Updates.Count
                                          + " - "
                                          + downloaded + "Mb"
                                          + " / "
                                          + toDownloaded + "Mb");
            }