private void ShowHotKeySettingsForm() { if (_hotkeySettingsForm != null) { _hotkeySettingsForm.Activate(); } else { _hotkeySettingsForm = new HotkeySettingsForm(controller); _hotkeySettingsForm.Show(); _hotkeySettingsForm.Activate(); _hotkeySettingsForm.FormClosed += hotkeySettingsForm_FormClosed; } }
void hotkeySettingsForm_FormClosed(object sender, FormClosedEventArgs e) { _hotkeySettingsForm.Dispose(); _hotkeySettingsForm = null; }