예제 #1
0
        public ScreenMenuCategory AddCategory(string categoryName)
        {
            var result = new ScreenMenuCategory(categoryName);

            Categories.Add(result);
            return(result);
        }
예제 #2
0
        public void AddItemsToCategory(string category, List <MenuItem> menuItems)
        {
            ScreenMenuCategory menuCategory = Categories.Single(x => x.Name == category);

            Debug.Assert(menuCategory != null);
            foreach (var menuItem in menuItems)
            {
                menuCategory.AddMenuItem(menuItem);
            }
        }