private void FixSettings(int idx) { poshsecframework.Interface.frmSettings frm = new poshsecframework.Interface.frmSettings(); System.Windows.Forms.DialogResult rslt = frm.ShowDialog(); frm.Dispose(); frm = null; if (rslt == System.Windows.Forms.DialogResult.OK) { SetStepFixed(idx); } ; }
private void FixSettings(int idx) { poshsecframework.Interface.frmSettings frm = new poshsecframework.Interface.frmSettings(); System.Windows.Forms.DialogResult rslt = frm.ShowDialog(); frm.Dispose(); frm = null; if (rslt == System.Windows.Forms.DialogResult.OK) { SetStepFixed(idx); }; }
private void mnuOptions_Click(object sender, EventArgs e) { if (lvwActiveScripts.Items.Count == 0) { poshsecframework.Interface.frmSettings frm = new poshsecframework.Interface.frmSettings(); System.Windows.Forms.DialogResult rslt = frm.ShowDialog(); frm.Dispose(); frm = null; if (rslt == System.Windows.Forms.DialogResult.OK) { Initialize(); }; } else { MessageBox.Show("You can not change the settings while scripts or commands are running. Please stop any commands or scripts and then try again."); } }
private void ShowOptions() { if (lvwActiveScripts.Items.Count == 0) { schedule.Pause(); poshsecframework.Interface.frmSettings frm = new poshsecframework.Interface.frmSettings(); System.Windows.Forms.DialogResult rslt = frm.ShowDialog(); bool restart = frm.Restart; frm.Dispose(); frm = null; if (rslt == System.Windows.Forms.DialogResult.OK) { psf.Close(); if (restart) { if (MessageBox.Show(StringValue.RestartRequired, "Restart?", MessageBoxButtons.YesNo) == System.Windows.Forms.DialogResult.Yes) { Application.Restart(); this.Close(); } else { psf.Open(); } } else { psf.Open(); Initialize(); } } schedule.Resume(); } else { MessageBox.Show(StringValue.SettingScriptsRunning); } }
private void mnuOptions_Click(object sender, EventArgs e) { if (lvwActiveScripts.Items.Count == 0) { poshsecframework.Interface.frmSettings frm = new poshsecframework.Interface.frmSettings(); System.Windows.Forms.DialogResult rslt = frm.ShowDialog(); frm.Dispose(); frm = null; if (rslt == System.Windows.Forms.DialogResult.OK) { Initialize(); }; } else { MessageBox.Show(StringValue.SettingScriptsRunning); } }