void cmdEditScript_Click(object sender, EventArgs e) { Executable.Script cmd = (Executable.Script)cboScripts.SelectedItem; ScriptTool ST = new ScriptTool(); ST.Script = cmd; ST.ShowDialog(); }
void cmdNewScript_Click(object sender, EventArgs e) { Executable.Script cmd = new Executable.Script(); ScriptTool ST = new ScriptTool(); ST.Script = cmd; if (ST.ShowDialog() == DialogResult.OK) { _executable.Scripts.Add(cmd); cboScripts.Items.Add(cmd); cboScripts.SelectedItem = cmd; SetScriptEnabled(true); } }