Example #1
0
 protected virtual void OnWorkPerformed(WorkerEventArgs work)
 {
     if (WorkPerformed != null)
     {
         WorkPerformed(this, work);
     }
 }
Example #2
0
        public void DoWork(WorkerEventArgs work)
        {
            var hours = work.hours;

            for (int i = 0; i <= hours; i++)
            {
                work.hours = i + 1;
                OnWorkPerformed(work);
            }
            OnWorkCompleted();
        }