예제 #1
0
 public AppHandlerBase()
 {
     menus = null;
     userInput = string.Empty;
     mainMenu = null;
     currentMenu = null;
     menuIndexStack = new Stack<int>();
     isReEntry = false;
 }
예제 #2
0
 public bool ChangeCurrentMenu(int indexOfNewCurrent)
 {
     bool changeResult = false;
     foreach (MenuList item in menus)
     {
         if (item.Index == indexOfNewCurrent)
         {
             if ((CurrentMenu != null) && (CurrentMenu.KeepLooping))
             {
                 MenuIndexStack.Push(CurrentMenu.Index);
             }
             currentMenu = item;
             continue;
         }
     }
     return changeResult;
 }
예제 #3
0
 public void SetMenus()
 {
     menus = SetAllMenus();
     if (menus != null)
     {
         mainMenu = menus[0];
         ChangeCurrentMenu(0);
     }
 }