void wall_OnWallbaseDownload(object sender, WallbaseDownloadEventArgs args)
        {
            progressBar.Dispatcher.BeginInvoke( System.Windows.Threading.DispatcherPriority.Normal, new Action( delegate()
                    {
                        progressBar.Value = (int)((args.Downloaded / args.ToDownload) * 100);

                        statusLabel.Content = String.Format("Downloaded: {0} / {1} - {2}%", args.Downloaded, args.ToDownload, (int)((args.Downloaded / args.ToDownload) * 100));

                        if (((int)((args.Downloaded / args.ToDownload) * 100) == 100))
                            statusLabel.Content += " - Download successfull";
                    }));
        }
Esempio n. 2
0
 protected void OnWallbaseDownloadChanged(WallbaseDownloadEventArgs e)
 {
     WallbaseDownloadHandler handler = OnWallbaseDownload;
     if (handler != null)
         handler(this, e);
 }