Inheritance: System.EventArgs
示例#1
0
 public void worker_OnProgressUpdate(object sender, ProgressEventArgs e)
 {
     //throttle progress updates so UI does not flicker
     var progress = Convert.ToInt32(100.0 * (Convert.ToDouble(e.TotalBytesDownloaded) / Convert.ToDouble(m_fileSize)));
     if (progress > ProgressValue)
     {
         ProgressValue = progress;
     }
 }
示例#2
0
 private void ProgressUpdate(int bytesReceived)
 {
     if (OnProgressUpdate == null)
         return;
     var args = new ProgressEventArgs(_downloaded, bytesReceived, _length);
     OnProgressUpdate(this, args);
 }