Exemple #1
0
 public void Clean_onion(Icecream p)
 {
     if (p.Have_scin)
     {
         p.Have_scin = false;
     }
 }
 public void WashOnion(Icecream o)
 {
     if (State)
     {
         o.Dirty = 0;
     }
 }
 private void button15_Click(object sender, EventArgs e)
 {
     potato = new Ice[3];
     for (int i = 0; i < potato.Length; i++)
     {
         potato[i] = new Ice();
     }
     carrot = new Chokolate[2];
     for (int i = 0; i < carrot.Length; i++)
     {
         carrot[i] = new Chokolate();
     }
     onion = new Icecream[2];
     for (int i = 0; i < onion.Length; i++)
     {
         onion[i] = new Icecream();
     }
     chicken = new Vanil();
     lapsha  = new Milk();
 }
        private void button17_Click(object sender, EventArgs e)
        {
            if (!waterTap.State)
            {
                MessageBox.Show("Холодос закрыт, может откроем?", "Ошибка логики", MessageBoxButtons.OK, MessageBoxIcon.Error);
                return;
            }

            else
            {
                for (int i = 0; i < onion.Length; ++i)
                {
                    onion[i] = new Icecream();
                }
                for (int i = 0; i < onion.Length; ++i)
                {
                    onion[i].Dirty = 0;
                }
            }
            MessageBox.Show("Шоколадку достали", "Кухня", MessageBoxButtons.OK, MessageBoxIcon.Information);
        }