Пример #1
0
 /// <summary>
 /// Used to display the Quantity of all Drinks in machine.
 /// </summary>
 /// <param name="Drinks"></param>
 private void DisplayQuantityofDrinks(ref List<Drinks> Drinks)
 {
     Drinks Drink = new Drinks();
     lblDrinksLeftCola.Text = Drink.QuantityOfDrinks("Cola", Drinks);
     lblDrinksLeftRootBeer.Text = Drink.QuantityOfDrinks("RootBeer", Drinks);
     lblDrinksLeftLemonLime.Text = Drink.QuantityOfDrinks("LemonLimeSoda", Drinks);
     lblDrinksLeftGrapeSoda.Text = Drink.QuantityOfDrinks("GrapeSoda", Drinks);
     lblDrinksLeftCreamSoda.Text = Drink.QuantityOfDrinks("CreamSoda", Drinks);
 }
Пример #2
0
        /// <summary>
        /// Used to display the Quantity of all Drinks in machine.
        /// </summary>
        /// <param name="Drinks"></param>
        private void DisplayQuantityofDrinks(ref List <Drinks> Drinks)
        {
            Drinks Drink = new Drinks();

            lblDrinksLeftCola.Text      = Drink.QuantityOfDrinks("Cola", Drinks);
            lblDrinksLeftRootBeer.Text  = Drink.QuantityOfDrinks("RootBeer", Drinks);
            lblDrinksLeftLemonLime.Text = Drink.QuantityOfDrinks("LemonLimeSoda", Drinks);
            lblDrinksLeftGrapeSoda.Text = Drink.QuantityOfDrinks("GrapeSoda", Drinks);
            lblDrinksLeftCreamSoda.Text = Drink.QuantityOfDrinks("CreamSoda", Drinks);
        }
Пример #3
0
        /// <summary>
        /// Used to update the quanity of a specific DrinkType and return string of new quantity
        /// </summary>
        /// <param name="DrinkType"></param>
        /// <returns></returns>
        private string UpdateDrinkQuantity(string DrinkType)
        {
            Drinks drink = new Drinks();

            drink.ReduceQuantity(DrinkType, ref Drinks);
            return(drink.QuantityOfDrinks(DrinkType, Drinks));
        }
Пример #4
0
 /// <summary>
 /// Used to update the quanity of a specific DrinkType and return string of new quantity
 /// </summary>
 /// <param name="DrinkType"></param>
 /// <returns></returns>
 private string UpdateDrinkQuantity(string DrinkType)
 {
     Drinks drink = new Drinks();
     drink.ReduceQuantity(DrinkType, ref Drinks);
     return drink.QuantityOfDrinks(DrinkType, Drinks);
 }