TerrainDisplay.MpqConsole.Execute C# (CSharp) Method

Execute() public method

Executes python commands from the console.
public Execute ( string input ) : void
input string
return void
        public void Execute(string input)
        {
            try
            {
                //replace with loop that gets the names of the enums later on
                const string commandCode = "Load ";
                if (input.StartsWith(commandCode, StringComparison.CurrentCultureIgnoreCase))
                {
                    command.commandCode = ConsoleCommandStruct.CommandCode.Load;
                    command.commandData = input.Substring(commandCode.Length);
                    newCommand = true;
                    if (MyEvent != null)
                        MyEvent();

                }
                Console.Prompt(Prompt, Execute);
            }
            catch (Exception ex)
            {
                Console.WriteLine("ERROR: " + ex.Message);
                Console.Prompt(Prompt, Execute);
            }
        }