public void NotifyRegistered(CopyEvent copyInfo)
 {
     lock(_eventList)
     {
         _eventList.AsParallel()
             .ForAll(x => x.Notify(copyInfo));
     }
 }
示例#2
0
 public void Notify(CopyEvent info)
 {
     this.ReportProgress(info);
 }
示例#3
0
 private void ReportProgress(CopyEvent info)
 {
     if (InvokeRequired)
     {
         BeginInvoke(new Action(delegate
         {
             ReportProgress(info);
         }));
         return;
     }
     this.progressBar1.PerformStep();
     richTextBox1.AppendText(string.Format("Copied='{2}' {0} => {1} ", info.Source, info.Dest, info.Copied));
     richTextBox1.SelectionStart = richTextBox1.Text.Length;
     richTextBox1.ScrollToCaret();
 }