private void CreateEntityForm() { entityForm = new EntityForm(); entityForm.Shown += (s, e) => entitiesToolStripMenuItem.Checked = true; entityForm.FormClosing += (s, e) => { e.Cancel = true; entityForm.Hide(); entitiesToolStripMenuItem.Checked = false; }; entityForm.EntityChanged += entityForm_EntityChanged; }
private void entitiesToolStripMenuItem_Click(object sender, EventArgs e) { if (entityForm.Visible) { entityForm.Hide(); } else { entityForm.Show(); } entitiesToolStripMenuItem.Checked = entityForm.Visible; }