예제 #1
0
 private void DoProgress(BackupProgressEventArgs e)
 {
     if (OnProgress != null)
         OnProgress(this, e);
 }
예제 #2
0
        private void OnProgress(object sender, BackupProgressEventArgs e)
        {
            Application.Current.Dispatcher.BeginInvoke(DispatcherPriority.Background, (MethodInvokerNoArg)delegate()
            {
                lblTotal.Text = String.Format(strings.Backup_lblTotal,
                                                        e.Count,
                                                        e.TotalCount,
                                                        String.Format("{0:N2} ko", (double)e.TotalSize / 1024));
                pbTotal.Value = e.Progress;

                lblCurrentFile.Text = String.Format("{0}, {1}",
                                                        System.IO.Path.GetFileName(e.Filename),
                                                        String.Format("{0:N2} ko", (double)e.FileSize / 1024));
                pbCurrentFile.Value = e.FileProgress;
            });
        }