Example #1
0
        private void button1_Click(object sender, EventArgs e)
        {
            eggs = new egg[Convert.ToInt32(numericUpDownEgg.Value)];
            pan.init(Convert.ToInt32(numericUpDownEgg.Value));
            salt       = new salt();
            salt.Count = Convert.ToInt32(numericUpDownSalt.Value);
            for (int i = 0; i < eggs.Length; ++i)
            {
                eggs[i] = new egg();
            }

            if (numericUpDownEgg.Value > 0)
            {
                for (int i = 0; i < eggs.Length; i++)
                {
                    knife.Clean(eggs[i]);
                }
                add_egg.Enabled = true;

                MessageBox.Show("Ингредиенты смешаны", "Бар", MessageBoxButtons.OK, MessageBoxIcon.Information);
            }
            else
            {
                MessageBox.Show("А про молоко то забыли...", "Бар", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }
Example #2
0
 public void Clean(egg e)
 {
     if (e.Have_skin)
     {
         e.Have_skin = false;
     }
 }
Example #3
0
 public void add_egg(egg e)
 {
     for (int i = 0; i < egg.Length; i++)
     {
         if (egg[i] == null)
         {
             egg[i] = e;
             return;
         }
     }
 }