Exemplo n.º 1
0
 public void DoDownloadProgress(DownloadProgressEventArgs e)
 {
     if (OnDownloadProgress != null)
     {
         OnDownloadProgress(this, e);
     }
 }
Exemplo n.º 2
0
        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));
            }));
        }
Exemplo n.º 3
0
 public void DoDownloadProgress(DownloadProgressEventArgs e)
 {
     if (OnDownloadProgress != null)
         OnDownloadProgress(this, e);
 }