private void buttonSettings_Click(object sender, EventArgs e) { if (settingsForm == null) { settingsForm = new SettingsForm(settings); } try { settingsForm.Show(); } catch { settingsForm = null; } }
private void settingsClosedHandler() { ApplySettings(); settingsForm = null; }
private void menuItemClickSettingsHandler(object sender, EventArgs e) { if (settingsForm == null) { settingsForm = new SettingsForm(settings); settingsForm.Subscribe(settingsClosedHandler); } try { settingsForm.Show(); } catch { settingsForm = null; menuItemClickSettingsHandler(sender, e); } }