public void UpdateCaretPosition(CodeDocument document) { if (this.sandDockManager1.ActiveTabbedDocument != document) { return; } this.UpdateCaretPosition(); }
private void pasteToolStripMenuItem_Click(object sender, EventArgs e) { CodeDocument codeDocument = this.sandDockManager1.ActiveTabbedDocument as CodeDocument; if (codeDocument == null) { return; } codeDocument.Content.Paste(); }
private void copyMenuItem_Activate(object sender, EventArgs e) { CodeDocument codeDocument = this.sandDockManager1.ActiveTabbedDocument as CodeDocument; if (codeDocument == null) { return; } codeDocument.Content.Copy(); }
private void saveScriptMenuItem_Activate(object sender, EventArgs e) { CodeDocument codeDocument = this.sandDockManager1.ActiveTabbedDocument as CodeDocument; if (codeDocument == null) { return; } codeDocument.SaveFile(); }
private void functionToolStripMenuItem_Click(object sender, EventArgs e) { CodeDocument codeDocument = this.sandDockManager1.ActiveTabbedDocument as CodeDocument; if (codeDocument == null) { return; } codeDocument.Content.Paste(((ToolStripMenuItem)sender).Text + "("); codeDocument.Content.ShowCodeHelper(); }
private void runMenuItem_Activate(object sender, EventArgs e) { CodeDocument codeDocument = this.sandDockManager1.ActiveTabbedDocument as CodeDocument; if (codeDocument == null) { return; } codeDocument.Run(); this.UpdateCaretPosition(); }
private void openScriptMenuItem_Activate(object sender, EventArgs e) { if (this.openFileDialog.ShowDialog(this) != DialogResult.OK) { return; } CodeDocument codeDocument = this.CreateDocument(); codeDocument.LoadFile(this.openFileDialog.FileName); codeDocument.Open(); }
public void UpdateCaretPosition() { CodeDocument codeDocument = this.sandDockManager1.ActiveTabbedDocument as CodeDocument; if (codeDocument == null) { return; } NomadTextBox.Position caretPosition = codeDocument.Content.CaretPosition; this.lineStatusLabel.Text = "Line " + (caretPosition.line + 1); this.columnStatusLabel.Text = "Col " + (caretPosition.column + 1); this.codeMapViewerDock1.Image = codeDocument.GetLineImage(codeDocument.Content.CaretPosition.line); }
private void newFileMenuItem_Activate(object sender, EventArgs e) { CodeDocument codeDocument = this.CreateDocument(); codeDocument.Open(); }