private void button1_Click(object sender, EventArgs e) { try { string variable = txtvariable.Text; //int clases = int.Parse(txtclases.Text); desc = new Descriptiva(datos, variable); if (dashboard == null) { dashboard = new frmDashboard(datos, variable); dashboard.FormClosed += new FormClosedEventHandler(CerrarForm); dashboard.Show(); } else { dashboard.Activate(); } } catch (Exception) { } }
void CerrarForm(object sender, FormClosedEventArgs e) { dashboard = null; }