Ejemplo n.º 1
0
        private void OnCancelCurrentOperation()
        {
            if ((CurrentOperation != null) && CurrentOperation.IsRunning)
            {
                var result = DisplayUserPrompt("Confirm Cancel Operation", "Press OK to cancel the current operation, or Cancel otherwise.", UserPromptType.OK_CANCEL);

                if (result == UserPromptResult.OK)
                {
                    DisplayStatusMessage("Cancelling current operation.", StatusMessageType.USER);

                    CurrentOperation.Abort();

                    //set these incase the operation completed handler doesn't clean up properly
                    OperationInProgress = false;
                }
            }
        }