protected void StartLongOperation() { waitLongOperationCompleted = AsyncOperationManager.CreateOperation(null); LongOperation longOperation = new LongOperation(DoWork); longOperation.CancellingTimeoutMilliSeconds = 10000; longOperation.CancellingTimeoutExpired += new EventHandler(LongOperation_CancellingTimeoutExpired); longOperation.Completed += new EventHandler <LongOperationCompletedEventArgs>(LongOperation_Completed); progressControl = CreateProgressControl(); progressControl.ShowProgress(longOperation); longOperation.StartAsync(); OnOperationStarted(); }
protected abstract void DoWorkCore(LongOperation longOperation);