Пример #1
0
 // The protected OnCompletedEvent method raises the event by invoking
 // the delegate. The sender is always this: the current instance 
 // of the class.
 protected virtual void OnCompletedEvent(CompletedEventParams e)
 {
     if (CompletedEvent != null)
     {
         // Invokes the delegate. 
         CompletedEvent(this, e);
     }
 }
Пример #2
0
 // The protected OnCompletedEvent method raises the event by invoking
 // the delegate. The sender is always this: the current instance
 // of the class.
 protected virtual void OnCompletedEvent(CompletedEventParams e)
 {
     if (CompletedEvent != null)
     {
         // Invokes the delegate.
         CompletedEvent(this, e);
     }
 }
Пример #3
0
        private void bw_RunWorkerCompleted(object sender, RunWorkerCompletedEventArgs e)
        {
            CompletedEventParams completed = new CompletedEventParams();

            if (_backupCancelled == true)
            {
                completed.Cancelled = true;
            }
            else if (e.Error != null)
            {
                completed.Error = e.Error;
            }
            else
            {
                completed.Success = true;
            }

            OnCompletedEvent(completed);
        }
Пример #4
0
        private void bw_RunWorkerCompleted(object sender, RunWorkerCompletedEventArgs e)
        {
            CompletedEventParams completed = new CompletedEventParams();
            if (_backupCancelled == true)
                completed.Cancelled = true;
            else if (e.Error != null)
                completed.Error = e.Error;
            else
                completed.Success = true;

            OnCompletedEvent(completed);
        }