private void cursosToolStripMenuItem_Click(object sender, EventArgs e) { if (Tools.FormManager.FindAndOpenForm("MantCursosForm")) { return; } var formToShow = new Forms.Mantenimientos.MantCursosForm { MdiParent = this }; formToShow.Show(); }
private void creaCursoBtn_Click(object sender, EventArgs e) { if (Tools.FormManager.FindAndOpenForm("MantCursosForm")) { return; } var formParent = this.Parent.FindForm(); var formToShow = new Forms.Mantenimientos.MantCursosForm() { MdiParent = formParent }; this.closeButton1.PerformClick(); formToShow.Show(); formToShow.bindingNavigatorAddNewItem.PerformClick(); }