void ShowOptions(object sender, EventArgs e) { // If we are already showing the window, merely focus it. if (optionsWindow == null) { optionsWindow = new Forms.Options(); optionsWindow.FormClosed += optionsFormClosed; optionsWindow.Show(); } else { optionsWindow.Activate(); } }
void optionsFormClosed(object sender, EventArgs e) { optionsWindow = null; checkOptions(); }