public Menu(DishType DishType, DrinkSize DrinkSize, DessertType DessertType = DessertType.Normal, bool HasCoffee = false) { this.DishType = DishType; this.DrinkSize = DrinkSize; this.DessertType = DessertType; this.HasCoffee = HasCoffee; }
private static void CreateDessertDictionary() { dessertDictionary = new Dictionary <DessertType, Dessert>(); DessertType[] dessertTypes = new DessertType[] { DessertType.ChocolateCake, DessertType.Brownie, DessertType.Bonbon, DessertType.PeanutButterBonbon, DessertType.VanillaCannoli, DessertType.ChocolateCannoli, DessertType.HalfAndHalfCannoli, DessertType.AppleCrumbCheesecake, DessertType.SnickerDoodleCookie, DessertType.ChocolateChipCookie, DessertType.PeanutButterCookie, DessertType.OatmealRaisinCookie, DessertType.MexicanWeddingCookie, DessertType.PumpkinSpiceCookie, DessertType.VeganPumpkinSpiceCookie, DessertType.WholeCake //DessertType.AnyCookie, //DessertType.VeganDessert, //DessertType.ThreeDollarDessert }; foreach (var dessertType in dessertTypes) { Dessert newDessert = new Dessert(dessertType); dessertDictionary.Add(dessertType, newDessert); } }
public static decimal GetDbItemId(DessertType dessertType) { if (DessertTypeDbIdDictionary.ContainsKey(dessertType)) { return(DessertTypeDbIdDictionary[dessertType]); } return(0); }
public Dessert(DessertType dessertType) { DessertType = dessertType; DbItemId = MenuFood.GetDbItemId(dessertType); ItemName = DisplayNames.GetDessertDisplayName(dessertType)[0]; ShortName = DisplayNames.GetDessertDisplayName(dessertType)[1]; PopulateBasePrice(); PopulatePricePerItem(); }
public static string[] GetDessertDisplayName(DessertType dessertType) { if (DisplayDessertNameDictionary.ContainsKey(dessertType)) { return(DisplayDessertNameDictionary[dessertType]); } return(new string[2] { "Not in Dict", "NotFnd" }); }
public DessertBooth(DessertType typeOfDessert, int dessertTicket, decimal toppings, int employees, decimal totalUtensilsCost, decimal totalNapkinsCost, decimal totalDishesCost) { TypeOfDessert = typeOfDessert; DessertTicket = dessertTicket; Toppings = toppings; Employees = employees; TotalUtensilsCost = totalUtensilsCost; TotalNapkinsCost = totalNapkinsCost; TotalDishesCost = totalDishesCost; }
public static decimal GetDessertPrice(DessertType dessertType) { if (DessertPriceDictionary.ContainsKey(dessertType)) { return(DessertPriceDictionary[dessertType]); } else { return(0M); } }
private Color GetCircleColor(DessertType dessertType) { if (dessertType.ToString().Contains("Cookie")) { return(Color.Orange); } else { return(Color.Tan); } }
private static void CreateCookieDictionary() { cookieDictionary = new Dictionary <DessertType, Dessert>(); DessertType[] cookieTypes = new DessertType[] { DessertType.SnickerDoodleCookie, DessertType.ChocolateChipCookie, DessertType.PeanutButterCookie, DessertType.OatmealRaisinCookie, DessertType.MexicanWeddingCookie, DessertType.PumpkinSpiceCookie, DessertType.VeganPumpkinSpiceCookie }; foreach (var cookieType in cookieTypes) { Dessert newDessert = new Dessert(cookieType); cookieDictionary.Add(cookieType, newDessert); } }
public DessertPageModel(Dessert dessertForEdit = null) { DessertDisplayItems = new ObservableCollection <DessertDisplayRow>(); DessertsSelectedCommand = new Command(OnDessertsSelected); CookiesSelectedCommand = new Command(OnCookiesSelected); AddDessertsCommand = new Command(OnAddDesserts); DessertsOnTempOrderDictionary = new Dictionary <DessertType, Dessert>(); if (dessertForEdit == null) { LoadDessertCategoryForDisplay(false); LoadPreviousDessertSelections(false); } else { IsDessertSelectedForEdit = true; dessertSelectedForEditDessertType = dessertForEdit.DessertType; LoadDessertCategoryForDisplay(dessertForEdit.IsCookie); LoadPreviousDessertSelections(dessertForEdit.IsCookie); } }
//methods public BakedGood Bake(DessertType food) { BakedGood Dessert; if (food == DessertType.cake) { Console.WriteLine("What flavor cake would you like?"); string flavor = Console.ReadLine().Trim(); Console.WriteLine("What flavor icing would you like?"); string frost = Console.ReadLine().Trim(); Console.WriteLine("How many layers would you like"); int layers = int.Parse(Console.ReadLine().Trim()); Dessert = new Cake(flavor, frost, layers); } else { Console.WriteLine("What filling would you like?"); string filling = Console.ReadLine().Trim(); Dessert = new Pie(filling); } return(Dessert); }
internal DessertCard(DessertType type) { this.Type = type; }