Example #1
0
 private void DoWork(DevExpress.ExpressApp.Demos.LongOperation longOperation)
 {
     try {
         DoWorkCore(longOperation);
     } catch (Exception) {
         longOperation.TerminateAsync();
         _ProgressControl.Dispose();
         throw;
     }
 }
        protected void StartLongOperation(List<string> strings) {

            waitLongOperationCompleted = AsyncOperationManager.CreateOperation(null);
            var longOperation = new DevExpress.ExpressApp.Demos.LongOperation(DoWork) { CancellingTimeoutMilliSeconds = 2000 };
            longOperation.CancellingTimeoutExpired += LongOperation_CancellingTimeoutExpired;
            longOperation.Completed += LongOperation_Completed;

            ChangedProps = strings;
            progressControl = CreateProgressControl();
            progressControl.ShowProgress(longOperation);
            longOperation.StartAsync();
            OnOperationStarted();
        }
Example #3
0
        protected void StartLongOperation(List <string> strings)
        {
            _WaitLongOperationCompleted = AsyncOperationManager.CreateOperation(null);
            var longOperation = new DevExpress.ExpressApp.Demos.LongOperation(DoWork)
            {
                CancellingTimeoutMilliSeconds = 2000
            };

            longOperation.CancellingTimeoutExpired += LongOperation_CancellingTimeoutExpired;
            longOperation.Completed += LongOperation_Completed;

            ChangedProps     = strings;
            _ProgressControl = CreateProgressControl();
            _ProgressControl.ShowProgress(longOperation);
            longOperation.StartAsync();
            OnOperationStarted();
        }
Example #4
0
 protected abstract void DoWorkCore(DevExpress.ExpressApp.Demos.LongOperation longOperation);