예제 #1
0
 private void OnCommandReceived(string command)
 {
     if (m_commandParser != null)
     {
         if (command == "help")
         {
             Log(LogLevel.Debug, m_commandParser.PrintHelp());
         }
         else if (command == "clear")
         {
             m_consoleWindow.ClearMessageLog();
         }
         else if (command == "feedback")
         {
             m_feedbackUI.Open();
         }
         else if (command == "reset")
         {
             m_consoleWindow.ResetLayout();
             m_feedbackUI.ResetLayout();
         }
         else if (!string.IsNullOrEmpty(command))
         {
             m_commandParser.Run(command);
         }
     }
     else
     {
         OnLogMessageReceived("Command processor is not set!", null, LogType.Error);
     }
 }
예제 #2
0
        static void Main(string[] args)
        {
            ICommandParser parser = CommandFactory.GetParser();

            if (parser != null)
            {
                parser.Run();
            }
        }