Beispiel #1
0
 private void dL_StateChanged(object sender, DownloadEventArgs e)
 {
     if (StateChanged != null)
     {
         StateChanged(this, e);
     }
 }
Beispiel #2
0
    private void dL_ProgressChanged(object sender, DownloadEventArgs e)
    {
      // resend the progress info
      if (CurrentProgressChanged != null)
        CurrentProgressChanged(this, e);

      // calculate total progress
      double percentForEach = (double)100 / this.totalDownloads;
      var percent = (int)((((double)this.downloadCount) / this.totalDownloads) * 100);
      percent += (int)(percentForEach * ((double)e.PercentDone / 100));
      if (percent > 100)
        percent = 100;

      // send total progress info
      if (TotalProgressChanged != null)
        TotalProgressChanged(this, new DownloadEventArgs(percent));
    }
Beispiel #3
0
        private void dL_ProgressChanged(object sender, DownloadEventArgs e)
        {
            // resend the progress info
            if (CurrentProgressChanged != null)
            {
                CurrentProgressChanged(this, e);
            }

            // calculate total progress
            double percentForEach = (double)100 / this.totalDownloads;
            var    percent        = (int)((((double)this.downloadCount) / this.totalDownloads) * 100);

            percent += (int)(percentForEach * ((double)e.PercentDone / 100));
            if (percent > 100)
            {
                percent = 100;
            }

            // send total progress info
            if (TotalProgressChanged != null)
            {
                TotalProgressChanged(this, new DownloadEventArgs(percent));
            }
        }
Beispiel #4
0
 private void dL_StateChanged(object sender, DownloadEventArgs e)
 {
   if (StateChanged != null)
     StateChanged(this, e);
 }
Beispiel #5
0
 private void StateChanged(object sender, DownloadEventArgs e)
 {
     this.Invoke(this.statusChanger, new object[]{e.DownloadState});
 }
Beispiel #6
0
 private void SingleProgressChanged(object sender, DownloadEventArgs e)
 {
     this.Invoke(this.singlePercentChanger, new object[]{e.PercentDone});
 }