static void optionsToolStripMenuItem_Click(object sender, EventArgs e) { using (OptionsForm form = new OptionsForm()) { form.ShowDialog(); } }
public void OpenOptionsDialog() { using (OptionsForm form = new OptionsForm()) { form.ShowDialog(); } }
private void CheckConfiguration() { // Make sure the user has entered a username and password. if (Settings.Default.UserName == string.Empty || Settings.Default.Password == string.Empty) { switchTimer.Enabled = false; using (OptionsForm optionsForm = new OptionsForm()) { if (optionsForm.ShowDialog(this) == DialogResult.OK) switchTimer.Enabled = true; } } }