public SnackBarForm() { InitializeComponent(); bar = new BarApp(); this.order = new Order(); bar.connect(); for (int i = 0; i < bar.GetAllSnacks().Count; i++) { this.listBoxSnacks.Items.Add(bar.GetAllSnacks()[i].ToString()); } for (int i = 0; i < bar.GetAllDrinks().Count; i++) { this.listBoxDrinks.Items.Add(bar.GetAllDrinks()[i].ToString()); } this.timer1.Start(); }
public double TotalPrice(BarApp bar, int i, int quanlity, Drinks p) { totalprice += Convert.ToDouble(bar.GetAllDrinks()[i].TotalPrice(quanlity)); return(totalprice); }
public double TotalPrice(BarApp bar, int i, int quanlity, Food p) { totalprice += Convert.ToDouble(bar.GetAllSnacks()[i].TotalPrice(quanlity).ToString("0.00")); return(totalprice); }