ACAT.Extensions.Default.FunctionalAgents.AbbreviationsAgent.AbbreviationsScanner.OnRunCommand C# (CSharp) Method

OnRunCommand() public method

Not used
public OnRunCommand ( string command, bool &handled ) : void
command string
handled bool
return void
        public void OnRunCommand(string command, ref bool handled)
        {
        }

Usage Example

Example #1
0
        /// <summary>
        /// Invoked when there is a request to run a command. This
        /// could as a result of the user activating a button on the
        /// scanner and there is a command associated with the button
        /// </summary>
        /// <param name="command">command to run</param>
        /// <param name="commandArg">any optional arguments</param>
        /// <param name="handled">was this handled?</param>
        public override void OnRunCommand(String command, object commandArg, ref bool handled)
        {
            handled = true;

            switch (command)
            {
            case "CancelEditDelAbbreviation":
                closeEditDeleteConfirmScanner();
                break;

            case "EditAbbreviation":
                closeEditDeleteConfirmScanner();
                if (_abbreviationSelected != null)
                {
                    editAbbreviation(_abbreviationSelected);
                }

                break;

            case "DeleteAbbreviation":
                if (_abbreviationSelected != null)
                {
                    if (Confirm(string.Format(Resources.Delete0, _abbreviationSelected.Mnemonic)))
                    {
                        deleteAbbreviation(_abbreviationSelected);
                        _abbreviationSelected = null;
                        closeEditDeleteConfirmScanner();
                    }
                }

                break;

            default:
                Log.Debug(command);
                if (_abbrForm != null)
                {
                    _abbrForm.OnRunCommand(command, ref handled);
                }

                break;
            }
        }