示例#1
0
 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;
 }
示例#2
0
        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);
            }
        }
示例#3
0
 public static decimal GetDbItemId(DessertType dessertType)
 {
     if (DessertTypeDbIdDictionary.ContainsKey(dessertType))
     {
         return(DessertTypeDbIdDictionary[dessertType]);
     }
     return(0);
 }
示例#4
0
 public Dessert(DessertType dessertType)
 {
     DessertType = dessertType;
     DbItemId    = MenuFood.GetDbItemId(dessertType);
     ItemName    = DisplayNames.GetDessertDisplayName(dessertType)[0];
     ShortName   = DisplayNames.GetDessertDisplayName(dessertType)[1];
     PopulateBasePrice();
     PopulatePricePerItem();
 }
示例#5
0
 public static string[] GetDessertDisplayName(DessertType dessertType)
 {
     if (DisplayDessertNameDictionary.ContainsKey(dessertType))
     {
         return(DisplayDessertNameDictionary[dessertType]);
     }
     return(new string[2] {
         "Not in Dict", "NotFnd"
     });
 }
示例#6
0
 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;
 }
示例#7
0
 public static decimal GetDessertPrice(DessertType dessertType)
 {
     if (DessertPriceDictionary.ContainsKey(dessertType))
     {
         return(DessertPriceDictionary[dessertType]);
     }
     else
     {
         return(0M);
     }
 }
示例#8
0
 private Color GetCircleColor(DessertType dessertType)
 {
     if (dessertType.ToString().Contains("Cookie"))
     {
         return(Color.Orange);
     }
     else
     {
         return(Color.Tan);
     }
 }
示例#9
0
 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);
     }
 }
示例#10
0
 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);
     }
 }
示例#11
0
        //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);
        }
示例#12
0
 internal DessertCard(DessertType type)
 {
     this.Type = type;
 }