private void Deriveation_Click(object sender, EventArgs e) { if (deriveation.Visible == false) { try { deriveation.Visible = true; if (j > 0) { j--; } } catch (System.ObjectDisposedException) { j++; } } else { MessageBox.Show("The Window is already opened ", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); } if ((j > 0) && (deriveation.Visible == false)) { deriveation = new Deriveation(); deriveation.Visible = true; } }
private void Deriveation_Click(object sender, EventArgs e) { if (deriveation.Visible == false) { try { deriveation.Visible = true; if (j > 0) j--; } catch (System.ObjectDisposedException) { j++; } } else MessageBox.Show("The Window is already opened ", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); if ((j > 0) && (deriveation.Visible == false)) { deriveation = new Deriveation(); deriveation.Visible = true; } }