void dimensionsForm_FormClosed(object sender, FormClosedEventArgs e) { if (dimensionsForm != null) { dimensionsForm.Dispose(); dimensionsForm = null; } }
private void buttonDimensions_Click(object sender, EventArgs e) { if ((dimensionsForm == null) && (modelControl != null)) { dimensionsForm = new AircraftDimensionsForm(modelControl); dimensionsForm.FormClosed += new FormClosedEventHandler(dimensionsForm_FormClosed); } if (dimensionsForm != null) { dimensionsForm.Show(); dimensionsForm.BringToFront(); } }