void editMenuItem_Click(object sender, EventArgs e) { using (ChangePauseDialog dlg = new ChangePauseDialog()) { dlg.Pause = Pause; if (dlg.ShowDialog() == DialogResult.OK) { Pause = dlg.Pause; } } }
/// <summary> /// Displays Change Pause dialog and /// returns WaitMacroCommand object with specified pause or null. /// </summary> public static WaitMacroCommand PromptUser(int pause) { WaitMacroCommand cmd = null; using (ChangePauseDialog dlg = new ChangePauseDialog()) { dlg.Pause = pause; if (dlg.ShowDialog() == DialogResult.OK) { cmd = new WaitMacroCommand(); cmd.Pause = dlg.Pause; } } return cmd; }
/// <summary> /// Displays Change Pause dialog and /// returns WaitMacroCommand object with specified pause or null. /// </summary> public static WaitMacroCommand PromptUser(int pause) { WaitMacroCommand cmd = null; using (ChangePauseDialog dlg = new ChangePauseDialog()) { dlg.Pause = pause; if (dlg.ShowDialog() == DialogResult.OK) { cmd = new WaitMacroCommand(); cmd.Pause = dlg.Pause; } } return(cmd); }