Exemple #1
0
 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();
 }
Exemple #2
0
 public double TotalPrice(BarApp bar, int i, int quanlity, Drinks p)
 {
     totalprice += Convert.ToDouble(bar.GetAllDrinks()[i].TotalPrice(quanlity));
     return(totalprice);
 }
Exemple #3
0
 public double TotalPrice(BarApp bar, int i, int quanlity, Food p)
 {
     totalprice += Convert.ToDouble(bar.GetAllSnacks()[i].TotalPrice(quanlity).ToString("0.00"));
     return(totalprice);
 }