/// <summary> /// Build Fanta and add it to the list of standard order items. /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void addFantaBtn_Click(object sender, EventArgs e) { Object selectedItem = fantaSizeCbox.SelectedItem; Drink.DrinkSize drinkSizeType = Drink.sizeFromString((String)selectedItem); Drink fanta = new Drink("Fanta", drinkSizeType); bs.Add(fanta); }
/// <summary> /// Build Coke and add it to the list of standard order items. /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void addCokeBtn_Click(object sender, EventArgs e) { Object selectedItem = cokeSizeCbox.SelectedItem; Drink.DrinkSize drinkSizeType = Drink.sizeFromString((String)selectedItem); Drink coke = new Drink("Coca Cola", drinkSizeType); bs.Add(coke); }