private void OnCommandRunnerOnWorkCompleted(WorkReport wr) { UpstatusFromReport(wr); if (_completeCallBack != null) { _completeCallBack(); } _commandRunner.WorkCompleted -= OnCommandRunnerOnWorkCompleted; }
private void UpstatusFromReport(WorkReport wr) { switch (wr.Status) { case WorkStatus.Success: UpdateFeedBack("Completed successfully"); break; case WorkStatus.UserCancelled: UpdateFeedBack("User cancelled"); break; case WorkStatus.CommandFailWithException: UpdateFeedBack("Operation failed"); break; case WorkStatus.UndoFailWithException: UpdateFeedBack("Undo failed"); break; } }