Ejemplo n.º 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();
 }
Ejemplo n.º 2
0
 public double TotalPrice(BarApp bar, int i, int quanlity, Drinks p)
 {
     totalprice += Convert.ToDouble(bar.GetAllDrinks()[i].TotalPrice(quanlity));
     return(totalprice);
 }
Ejemplo n.º 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);
 }