private void edittToolStripButton_Click(object sender, EventArgs e) { // Create the ScriptEditControl and initialize it with the diagram's ScriptingManager instance ScriptEditForm scripteditform = new ScriptEditForm(); ScriptEditControl scriptedit = scripteditform.ScriptEditControl; scriptedit.InitializeScriptEditor(this.scriptingMgr); // Disable external compilation scriptedit.EnableExternalCompile = true; // Show the ScriptEditForm as a modal dialog scripteditform.ShowDialog(this); scripteditform.Dispose(); }
private void RepositoryItemOnButtonClick(object sender, ButtonPressedEventArgs buttonPressedEventArgs) { if (buttonPressedEventArgs.Button.Kind == ButtonPredefines.Ellipsis) { var scriptForm = new ScriptEditForm(); scriptForm.Script = ((BaseEdit)sender).EditValue != null ? ((BaseEdit)sender).EditValue.ToString() : ""; if (scriptForm.ShowDialog() == DialogResult.OK) { ((BaseEdit)sender).EditValue = scriptForm.Script; } } }