Ejemplo n.º 1
0
 private void ReportUpdateProgress(DownloadProgress progress)
 {
     if (progress.Percentage == 1)
     {
         progressBox.finished = true;
     }
     progressBox.progressBar.Value         = progress.Percentage * 100;
     progressBox.taskBarItem.ProgressValue = progress.Percentage;
     progressBox.progressTitle.Text        = $"Downloading {progress.FileName}...";
     progressBox.progressText.Text         = $"{Math.Round(progress.Percentage * 100, 2)}% " +
                                             $"({StringConverters.FormatSize(progress.DownloadedBytes)} of {StringConverters.FormatSize(progress.TotalBytes)})";
 }