Пример #1
0
 private void Iniz(Drink d)
 {
     drinkTypeChose.Text = d.type;
     drinkGrade.Text     = d.grade;
     drinkHard.Text      = d.hard;
     drinkPrice.Text     = d.price.ToString();
     drinkWeight.Text    = d.weight.ToString();
     path = d.getPath();
 }
Пример #2
0
 private void TextFull(Drink d)
 {
     drinkType.Text   = d.type;
     drinkGrade.Text  = d.grade;
     drinkHard.Text   = d.hard;
     drinkPrice.Text  = d.price.ToString();
     drinkWeight.Text = d.weight.ToString();
     try
     {
         Image img = new Bitmap(new Bitmap(d.getPath()), 300, 300);
         DrinkPictureBox.Image = img;
     }
     catch (Exception e)
     {
         Image img = new Bitmap(new Bitmap("image\\banned.png"), 300, 300);
         DrinkPictureBox.Image = img;
         return;
     }
 }
Пример #3
0
 public static void Change(int pos, Drink changeDrink)
 {
     if (bindList.ElementAt(pos).getPath() != "" && bindList.ElementAt(pos).getPath() != changeDrink.getPath())
     {
         File.Delete(bindList.ElementAt(pos).getPath());
     }
     bindList.RemoveAt(pos);
     bindList.Insert(pos, changeDrink);
 }