Exemple #1
0
        internal bool TryExecuteCurrentParametricCommand()
        {
            if (CurrentExecution.ExecuteCommand(this))
            {
                CloseOrSetInactive();
                Repaint();
                return(true);
            }

            CurrentExecution.JumpToFirstError(this);
            SearchTerms = CurrentExecution.CurrentTextEntered;
            Repaint();
            return(false);
        }
Exemple #2
0
        private void HandleSimpleCommand()
        {
            if (CommandResult == null)
            {
                return;
            }

            if (CommandResult.Count() > SelectedIndex && SelectedIndex >= 0)
            {
                if (CommandResult.ElementAt(SelectedIndex) == null)
                {
                    return;
                }

                if (CommandResult.ElementAt(SelectedIndex).IsParametric)
                {
                    ParametricCommandExecution exec =
                        new ParametricCommandExecution(CommandResult.ElementAt(SelectedIndex), this);
                    if (ForceValidationKeyPressed &&
                        CommandResult.ElementAt(SelectedIndex).CanUseQuickDefaultCall)
                    {
                        exec.ExecuteCommand(this);
                        CloseOrSetInactive();
                    }
                    else if (CommandResult.ElementAt(SelectedIndex).IsValid)
                    {
                        ActivateParametricMode(exec);
                    }
                }
                else
                {
                    if (ExecuteCommand(new[] { CommandResult.ElementAt(SelectedIndex) }))
                    {
                        if (!Event.current.control)
                        {
                            CloseOrSetInactive();
                        }
                    }
                }
            }
        }