예제 #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;
         }
     }
 }