private void adicionarIngredienteToolStripMenuItem_Click(object sender, EventArgs e) { if (addIngredients == null) { addIngredients = new FrmAddIngredients(true); addIngredients.MdiParent = this; addIngredients.FormClosed += AddIngredients_FormClosed; addIngredients.Show(); } else { addIngredients.Activate(); } }
private void AddIngredients_FormClosed(object sender, FormClosedEventArgs e) { addIngredients = null; }