private void instanceHasBeenClosed(object sender, FormClosedEventArgs e) { agregarProducto = null; agregarCliente = null; agregarAgente = null; agregarServicio = null; agregarProveedor = null; agregarListaPreciosEstilista = null; }
private void button2_Click(object sender, EventArgs e) { if (agregarProducto == null) { agregarProducto = new AgregarProducto(); agregarProducto.Show(); agregarProducto.FormClosed += instanceHasBeenClosed; PBarForm pb = new PBarForm(); /*pb.Show(); * pb.iniciar();*/ } else { agregarProducto.Focus(); } }