private void ingresarPartidoToolStripMenuItem_Click(object sender, EventArgs e) { if (vtnPartido == null) { this.cerrarVentanas(); vtnPartido = new IngresarPartido(); vtnPartido.MdiParent = this; vtnPartido.FormClosed += VtnPartido_FormClosed; vtnPartido.Show(); } else { vtnEquipo.Activate(); } }
private void cerrarVentanas() { if (vtnTorneo != null) { vtnTorneo.Close(); vtnTorneo = null; } if (vtnEquipo != null) { vtnEquipo.Close(); vtnEquipo = null; } if (vtnResultado != null) { vtnResultado.Close(); vtnResultado = null; } if (vtnPartido != null) { vtnPartido.Close(); vtnPartido = null; } }