Esempio n. 1
0
        protected virtual void OnCompleted(WorkItemCompletedEventArgs e)
        {
            //raise the Completed event ***on the form's synchronisation context***
            EventHandler <WorkItemCompletedEventArgs> temp = this.Completed;

            if (temp != null)
            {
                temp.Invoke(this, e);
            }
        }
Esempio n. 2
0
 //handler method to run when work has completed
 private void item_Completed(object sender, WorkItemCompletedEventArgs e)
 {
     //GUI is free to update itself
     this.Result = e.Result;
 }