Beispiel #1
0
 private void DoWork(DevExpress.ExpressApp.Demos.LongOperation longOperation)
 {
     try {
         DoWorkCore(longOperation);
     } catch (Exception) {
         longOperation.TerminateAsync();
         _ProgressControl.Dispose();
         throw;
     }
 }
        private void LongOperation_Completed(object sender, LongOperationCompletedEventArgs e)
        {
            progressControl.Dispose();
            progressControl = null;
            ((LongOperation)sender).CancellingTimeoutExpired -= new EventHandler(LongOperation_CancellingTimeoutExpired);
            ((LongOperation)sender).Completed -= new EventHandler <LongOperationCompletedEventArgs>(LongOperation_Completed);
            ((LongOperation)sender).Dispose();

            waitLongOperationCompleted.PostOperationCompleted(WorkCompleted, null);
            waitLongOperationCompleted = null;
        }