Beispiel #1
0
 protected virtual void OnDownloadProgressChanged(HttpDownloadProgressChangedEventArgs e)
 {
     if (DownloadProgressChanged != null)
     {
         DownloadProgressChanged(this, e);
     }
 }
Beispiel #2
0
 void DownloadProgressChangedHanlder(HttpDownloadProgressChangedEventArgs e)
 {
     // Refresh the summary every second.
     if (DateTime.Now > lastNotificationTime.AddSeconds(1))
     {
         lbSummary.Text = String.Format("Received: {0}KB, Total: {1}KB, Speed: {2}KB/s",
                                        e.ReceivedSize / 1024, e.TotalSize / 1024, e.DownloadSpeed / 1024);
         prgDownload.Value    = (int)(e.ReceivedSize * 100 / e.TotalSize);
         lastNotificationTime = DateTime.Now;
     }
 }
 void DownloadProgressChangedHanlder(HttpDownloadProgressChangedEventArgs e)
 {
     // Refresh the summary every second.
     if (DateTime.Now > lastNotificationTime.AddSeconds(1))
     {
         lbSummary.Text = String.Format("Received: {0}KB, Total: {1}KB, Speed: {2}KB/s",
             e.ReceivedSize / 1024, e.TotalSize / 1024, e.DownloadSpeed / 1024);
         prgDownload.Value = (int)(e.ReceivedSize * 100 / e.TotalSize);
         lastNotificationTime = DateTime.Now;
     }
 }
 /// <summary>
 /// Handle DownloadProgressChanged event.
 /// </summary>
 void DownloadProgressChanged(object sender, HttpDownloadProgressChangedEventArgs e)
 {
     this.Invoke(new UIProcessChanegHanlder(DownloadProgressChangedHanlder), e);
 }
Beispiel #5
0
 /// <summary>
 /// Handle DownloadProgressChanged event.
 /// </summary>
 void DownloadProgressChanged(object sender, HttpDownloadProgressChangedEventArgs e)
 {
     this.Invoke(new UIProcessChanegHanlder(DownloadProgressChangedHanlder), e);
 }
 protected virtual void OnDownloadProgressChanged(HttpDownloadProgressChangedEventArgs e)
 {
     if (DownloadProgressChanged != null)
     {
         DownloadProgressChanged(this, e);
     }
 }