public void btnIR_Click(object sender, EventArgs e) { if (GetIRRADIANCE == null) { GetIRRADIANCE = new IRRADIANCE(); GetIRRADIANCE.FormClosed += new FormClosedEventHandler(GetIRRADIANCE_FormClosed); GetIRRADIANCE.Show(); } else { GetIRRADIANCE.Activate(); switch (cmbBoxLanguage.SelectedIndex) { case 0: MessageBox.Show("The 'IRRADIANCE TEST' window is already open!"); break; case 1: MessageBox.Show("A janela 'TESTE DE IRRADIÂNCIA' já está aberta!"); break; } } }
private void GetIRRADIANCE_FormClosed(object sender, FormClosedEventArgs e) { GetIRRADIANCE = null; }