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(); }
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(); }
protected abstract void DoWorkCore(DevExpress.ExpressApp.Demos.LongOperation longOperation);