private void button1_Click(object sender, EventArgs e) { var iceCream = new Lib.IceCreamProduct { Name = nameBox.Text, Cost = costBox.Text, Flavor = flavorBox.Text }; AddIceCreamToFreezer(iceCream); ClearInput(); }
/// <summary> /// Add Ice Cream to the Storage unit. /// </summary> /// <param name="iceCreamProduct"></param> public void AddIceCreamToFreezer(Lib.IceCreamProduct iceCreamProduct) { _freezer.AddIceCream(iceCreamProduct); ResetListBox(); }