private void ShowSettingForm() { if (settingsForm != null) { settingsForm.Activate(); } else { settingsForm = new SettingsForm(controller); settingsForm.Show(); settingsForm.Activate(); settingsForm.BringToFront(); settingsForm.FormClosed += settingsForm_FormClosed; } }
void settingsForm_FormClosed(object sender, FormClosedEventArgs e) { settingsForm = null; Util.Utils.ReleaseMemory(); }