Exemplo n.º 1
0
 public Caramel(Coffee coffee) : base(coffee)
 {
     Description = "Caramel";
 }
Exemplo n.º 2
0
 public Mocha(Coffee coffee) : base(coffee)
 {
     Description = "Mocha";
 }
Exemplo n.º 3
0
 public Ice(Coffee coffee) : base(coffee)
 {
     Description = "Iced";
 }
Exemplo n.º 4
0
 public Milk(Coffee coffee) : base(coffee)
 {
     Description = "Latte";
 }
Exemplo n.º 5
0
 public Decorator(Coffee coffee)
 {
     this.coffee = coffee;
 }
Exemplo n.º 6
0
        private void CoffeeSelectCB_SelectedIndexChanged(object sender, EventArgs e)
        {
            DecoratorCB.Items.Clear();
            string o = CoffeeSelectCB.SelectedItem.ToString();

            if (o == "Americano")
            {
                coffee = new Americano();
                DecoratorCB.Items.Add("Iced");
            }
            else if (o == "Caffe")
            {
                coffee = new Caffe();
                DecoratorCB.Items.Add("Latte");
                DecoratorCB.Items.Add("Mocha");
            }

            else if (o == "White Chocolate")
            {
                coffee = new WhiteChocolate();
                DecoratorCB.Items.Add("Iced");
                DecoratorCB.Items.Add("Mocha");
            }

            else if (o == "Filtered Coffee")
            {
                coffee = new FilteredCoffee();
                DecoratorCB.Items.Add("Iced");
            }
            else if (o == "Misto")
            {
                coffee = new Misto();
                DecoratorCB.Items.Add("Latte");
                DecoratorCB.Items.Add("Iced");
            }
            else if (o == "Brew")
            {
                coffee = new Brew();
                DecoratorCB.Items.Add("Latte");
                DecoratorCB.Items.Add("Iced");
            }

            else if (o == "Frappuccino")
            {
                coffee = new Frappuccino();
                DecoratorCB.Items.Add("Mocha");
                DecoratorCB.Items.Add("Caramel");
            }
            else if (o == "Esspresso")
            {
                coffee = new Esspresso();
            }
            else if (o == "Cappuccino")
            {
                coffee = new Cappuccino();
            }
            else if (o == "Vanilla Frap")
            {
                coffee = new VanillaFrap();
            }
            else if (o == "Strawberry Frap")
            {
                coffee = new StrawberryFrap();
            }
            else if (o == "chocolate Frap")
            {
                coffee = new ChocolateFrap();
            }
        }