Пример #1
0
        public void setCurrentMenu(string menuName)
        {
            if (!menuExists(menuName))
            {
                throw new MenuDoesNotExistException("The given menu does not exist!");
            }

            MenuNames.Push(menuName);
            CurrentMenu = Menus[menuName];
        }
Пример #2
0
        public void addMenu(string menuName, IMenuType menuToAdd)
        {
            if (MenuNames.Contains(menuName))
            {
                return;
            }

            Menus.Add(menuName, menuToAdd);
            MenuNames.Push(menuName);
            CurrentMenu = menuToAdd;
        }