コード例 #1
0
        /// <summary>
        /// Method to invoke when the Reset command is executed.
        /// </summary>
        private void OnResetExecute()
        {
            _keyboardMappingsService.Reset();

            if (!string.IsNullOrWhiteSpace(SelectedCommand))
            {
                SelectedCommandInputGesture = _commandManager.GetInputGesture(SelectedCommand);
            }
        }
コード例 #2
0
        private async Task OnResetExecuteAsync()
        {
            var messageResult = await _messageService.ShowAsync(_languageService.GetString("Orchestra_ResetKeyboardShortcutsAreYouSure"), string.Empty, MessageButton.YesNo, MessageImage.Question);

            if (messageResult == MessageResult.No)
            {
                return;
            }

            _keyboardMappingsService.Reset();

            if (!string.IsNullOrWhiteSpace(SelectedCommand))
            {
                SelectedCommandInputGesture = _commandManager.GetInputGesture(SelectedCommand);
            }

            UpdateCommands();
        }