Пример #1
0
 private void button4_Click(object sender, EventArgs e)
 {
     oil = new Oil();
     fryer.AddOil(oil);
     ingr += 5;
     MessageBox.Show("Масло добавили", "Кухня", MessageBoxButtons.OK, MessageBoxIcon.Information);
 }
Пример #2
0
 public void AddOil(Oil o)
 {
     for (int i = 0; i < oil.Length; i++)
     {
         if (oil[i] == null)
         {
             oil[i] = o;
             return;
         }
     }
 }