/// <summary>
 /// Open another cmd, current cmd now not available until sub cmd is not closed.
 /// </summary>
 protected void TryOpenSubCmd(CommandLineBase commandLineBase)
 {
     try
     {
         _currentCmdSwitcher.PushCmdInStack(commandLineBase);
     }
     catch { }
 }
 public void RunDefault(CommandLineBase cmdLine)
 {
     OpenCmdInStack(
         cmdLine
         );
     while (cmdStack.Count > 0)
     {
         while (currentCmd.IsInRun)
         {
             currentCmd.OnEveryLoop();
         }
         cmdStack.Pop();
     }
 }
Esempio n. 3
0
 public void PushCmdInStack(CommandLineBase newCmd)
 {
     cmdStack.Push(newCmd);
     currentCmd.SetCmdSwitcher(this);
     currentCmd.OnStart();
 }
 public void OpenCmdInStack(CommandLineBase newCmd)
 {
     cmdStack.Push(newCmd);
     currentCmd.OnStart();
 }