コード例 #1
0
ファイル: commandSet.cs プロジェクト: gorangrubic/imbACE
        public aceCommandEventArgs MakeArguments(commandExpression expression, Object __caller)
        {
            IAceCommand command = null;

            if (ContainsKey(expression.identifier))
            {
                command = this[expression.identifier];
            }
            else
            {
                foreach (IAceCommand __c in this.Values)
                {
                    if (__c.commandFullname.ToLower() == expression.identifier.ToLower())
                    {
                        command = __c;
                    }
                }
            }
            if (command != null)
            {
                aceCommandEventArgs args = new aceCommandEventArgs(aceCommandEventType.unknown, __caller, command,
                                                                   expression.parameters[0]);
                return(args);
            }
            else
            {
                return(null);
            }
        }
コード例 #2
0
        public void callCommandLineArguments(String[] arguments = null)
        {
            if (arguments == null)
            {
                arguments = Environment.GetCommandLineArgs();
            }

            commandExpression           currentExpression = null;
            commandExpressionCollection expressions       = new commandExpressionCollection();

            foreach (String arg in arguments)
            {
                if (arg.StartsWith(format.commandPrefixString))
                {
                    currentExpression = new commandExpression(arg);
                    expressions.Add(currentExpression);
                }
                else
                {
                    currentExpression.parameters[currentExpression.parameters.Length] = arg.Trim();
                }
            }
            foreach (commandExpression exp in expressions)
            {
            }
        }
コード例 #3
0
ファイル: commandSet.cs プロジェクト: gorangrubic/imbACE
        public void RunExpression(commandExpression expression)
        {
            aceCommandEventArgs args = MakeArguments(expression, this);

            args.command.callCommand(args);
        }