public void setCurrentMenu(string menuName) { if (!menuExists(menuName)) { throw new MenuDoesNotExistException("The given menu does not exist!"); } MenuNames.Push(menuName); CurrentMenu = Menus[menuName]; }
public void addMenu(string menuName, IMenuType menuToAdd) { if (MenuNames.Contains(menuName)) { return; } Menus.Add(menuName, menuToAdd); MenuNames.Push(menuName); CurrentMenu = menuToAdd; }