public void DoDownloadProgress(DownloadProgressEventArgs e) { if (OnDownloadProgress != null) { OnDownloadProgress(this, e); } }
private void OnDownloadProgress(object sender, CIV.Common.DownloadProgressEventArgs e) { Application.Current.Dispatcher.Invoke(System.Windows.Threading.DispatcherPriority.Background, new ThreadStart(delegate { if (pbDownload.Maximum != e.File.Size) { pbDownload.Maximum = e.File.Size; } if (String.IsNullOrEmpty(_setup)) { _setup = e.File.Filename; } pbDownload.Value = e.Downloaded; lblDownload.Content = String.Format("{0} / {1}", Common.UnitsConverter.SIUnitToString(Convert.ToDouble(e.Downloaded) / 1024, SIUnitTypes.ko), Common.UnitsConverter.SIUnitToString(Convert.ToDouble(e.File.Size) / 1024, SIUnitTypes.ko)); })); }
public void DoDownloadProgress(DownloadProgressEventArgs e) { if (OnDownloadProgress != null) OnDownloadProgress(this, e); }