Exemplo n.º 1
0
 // The following adds controls to order a drink!
 private void addDrink(string dname, int price)
 {
     numDrinks++;
     getraenkeboerse_widgetlibrary.drinkorderer dro = new getraenkeboerse_widgetlibrary.drinkorderer();
     dro.Show();
     dro.DrinkName = dname;
     dro.Price     = price;
     tblDrinkOrderers.Attach(dro,
                             numDrinks,
                             numDrinks + 1,
                             0,
                             1);
     tblDrinkOrderers.Show();
     dro.BuyAction += triggerBuyAction;
     dro.DrinkIndex = numDrinks - 1;
     drinkOrderers.Add(dro);
     if (numDrinks < 12)
     {
         usedOrderingKeys.Add(rawOrderingKeys[numDrinks - 1], dro);
         dro.BuyCaption = rawOrderingKeys[numDrinks - 1].ToString();
     }
 }
 // The following adds controls to order a drink!
 private void addDrink(string dname, int price)
 {
     numDrinks++;
     getraenkeboerse_widgetlibrary.drinkorderer dro = new getraenkeboerse_widgetlibrary.drinkorderer();
     dro.Show();
     dro.DrinkName = dname;
     dro.Price = price;
     tblDrinkOrderers.Attach(dro,
                             numDrinks,
                             numDrinks+1,
                             0,
                             1);
     tblDrinkOrderers.Show();
     dro.BuyAction += triggerBuyAction;
     dro.DrinkIndex = numDrinks-1;
     drinkOrderers.Add(dro);
     if (numDrinks<12){
         usedOrderingKeys.Add(rawOrderingKeys[numDrinks-1], dro);
         dro.BuyCaption = rawOrderingKeys[numDrinks-1].ToString();
     }
 }