Exemplo n.º 1
0
        /// <summary>
        ///     Execute a command using a command string
        /// </summary>
        /// <param name="commandString">The command string</param>
        public static void DoCommand(string commandString)
        {
            CommandType              = GeneralFunctions.GetCommandNameFromCommandString(commandString); //Get command name (first word in command string)
            CommandString            = SaveFileParser.EscapeSemiColons(commandString);                  //Escape semicolons
            Parameters.ParameterList = ParseInput.Parse(commandString);

            //if a project is open
            if (Program.OpenProject == null)
            {
                DoCommandNoOpenProject(); //Do a command that won't affect any project, eg. createproject, openproject, etc.
            }
            else
            {
                if (Program.OpenCommand == null)
                {
                    DoCommandForOpenProject(); //Do a command for the open project
                }
                else
                {
                    EditCommand(); //Go in edit command mode
                }
            }
        }
Exemplo n.º 2
0
 /// <summary>
 ///     Update the parameters using command string
 /// </summary>
 /// <param name="commandString"></param>
 public static void UpdateParameters(string commandString, string type)
 {
     Parameters.ParameterList = ParseInput.Parse(commandString); //Parse command
     Commands.LoadParametersForCommand(type);                    //Update parameters
 }
Exemplo n.º 3
0
 public static List <string> GroupCommandStringByEvent(List <string> commandList, string evnt)
 {
     return(commandList.Where(x => ParseInput.Parse(x)[0] == evnt).ToList());
 }