void propulsionForm_FormClosed(object sender, FormClosedEventArgs e) { if (propulsionForm != null) { propulsionForm.Dispose(); propulsionForm = null; } }
private void buttonPropulsion_Click(object sender, EventArgs e) { if ((propulsionForm == null) && (modelControl != null)) { propulsionForm = new PropulsionForm(); propulsionForm.ModelControl = modelControl; propulsionForm.FormClosed += new FormClosedEventHandler(propulsionForm_FormClosed); } if (propulsionForm != null) { propulsionForm.Show(); propulsionForm.BringToFront(); } }