public System.Windows.Forms.DialogResult Edit() { if (Kind.InterfaceKind == ActionInferfaceKind.None) return System.Windows.Forms.DialogResult.OK; if (Kind.InterfaceKind == ActionInferfaceKind.Code) { CodeEditor e = new CodeEditor(); e.Code = Arguments[0]; e.ShowDialog(ListBox == null ? null : ListBox.FindForm()); if (e.DialogResult == System.Windows.Forms.DialogResult.OK) Arguments[0] = e.Code; return e.DialogResult; } return new ActionForm(this).ShowDialog(ListBox == null ? null : ListBox.FindForm()); }
public void Edit() { if (editor != null && editor.Created) editor.Focus(); else { editor = new CodeEditor(); editor.Save += new EventHandler(editor_Save); editor.Code = Code; editor.Text = "Script Properties: " + name; editor.MdiParent = Program.IDE; editor.Show(); } }