示例#1
0
 // Invoke the Changed event
 protected virtual void OnChanged(GeneralTaskEventArgs e)
 {
     if (Changed != null)
     {
         Changed(this, e);
     }
 }
示例#2
0
 // Invoke the Changed event
 protected virtual void OnChanged(GeneralTaskEventArgs e)
 {
     if (Changed != null)
     {
         Changed(this, e);
     }
 }
示例#3
0
 private void AddResultToList(GeneralTaskEventArgs args)
 {
     outputListBox.Items.Add(String.Format("{0} Result (Worker thread #{1})", _concreteEventArgsToTaskDescription[args.GetType()], args.SourceThreadId));
     outputListBox.Items.Add(args.ToString());
 }
示例#4
0
 private void NewResult(object state, GeneralTaskEventArgs args)
 {
     if (InvokeRequired)
     {
         Invoke(_resultDelegate, new object[] { args });
     }
     else
     {
         _resultDelegate(args);
     }
 }