private void dL_StateChanged(object sender, DownloadEventArgs e) { if (StateChanged != null) { StateChanged(this, e); } }
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)); }
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)); } }
private void dL_StateChanged(object sender, DownloadEventArgs e) { if (StateChanged != null) StateChanged(this, e); }
private void StateChanged(object sender, DownloadEventArgs e) { this.Invoke(this.statusChanger, new object[]{e.DownloadState}); }
private void SingleProgressChanged(object sender, DownloadEventArgs e) { this.Invoke(this.singlePercentChanger, new object[]{e.PercentDone}); }