Example #1
0
 private void OnDownloadProgressChanged(object sender, DownloadProgressChangedEventArgs e)
 {
     downloadProgressTracker_.SetProgress(e.BytesReceived, e.TotalBytesToReceive);
     if (DateTime.Now.Ticks > lastDlstringUpdate_ + 500000L)
     {
         lastDlstringUpdate_     = DateTime.Now.Ticks;
         updateProgressBar.Value = e.ProgressPercentage;
         string desc = currentFile_ is null ? "" : currentFile_.Value.Description;
         updateLabelText.Text = string.Format(
             Locale.Get("DLRate")
             , FormatBytes(e.BytesReceived)
             , FormatBytes(e.TotalBytesToReceive)
             , downloadProgressTracker_.GetBytesPerSecondString()
             , desc
             );
     }
 }
Example #2
0
 private void OnDownloadProgressChanged(object sender, DownloadProgressChangedEventArgs e)
 {
     downloadProgressTracker_.SetProgress(e.BytesReceived, e.TotalBytesToReceive);
     _progressBar1.Value = e.ProgressPercentage;
 }