private void redoStripButton_Click(object sender, EventArgs e) { if (CurrentFastColoredTextBox.RedoEnabled) { CurrentFastColoredTextBox.Redo(); } }
private void bookmarkMinusButton_Click(object sender, EventArgs e) { if (CurrentFastColoredTextBox == null) { return; } CurrentFastColoredTextBox.UnbookmarkLine(CurrentFastColoredTextBox.Selection.Start.iLine); }
private void dgvObjectExplorer_CellMouseDoubleClick(object sender, DataGridViewCellMouseEventArgs e) { if (CurrentFastColoredTextBox != null) { var item = explorerList[e.RowIndex]; CurrentFastColoredTextBox.GoEnd(); CurrentFastColoredTextBox.SelectionStart = item.position; CurrentFastColoredTextBox.DoSelectionVisible(); CurrentFastColoredTextBox.Focus(); } }
private void btInvisibleChars_Click(object sender, EventArgs e) { foreach (FATabStripItem tab in tsFiles.Items) { HighlightInvisibleChars((tab.Controls[0] as FastColoredTextBox).Range); } if (CurrentFastColoredTextBox != null) { CurrentFastColoredTextBox.Invalidate(); } }
private void printToolStripButton_Click(object sender, EventArgs e) { if (CurrentFastColoredTextBox != null) { var settings = new PrintDialogSettings(); settings.Title = tsFiles.SelectedItem.Title; settings.Header = "&b&w&b"; settings.Footer = "&b&p"; CurrentFastColoredTextBox.Print(settings); } }
private void btShowFoldingLines_Click(object sender, EventArgs e) { foreach (FATabStripItem tab in tsFiles.Items) { (tab.Controls[0] as FastColoredTextBox).ShowFoldingLines = btShowFoldingLines.Checked; } if (CurrentFastColoredTextBox != null) { CurrentFastColoredTextBox.Invalidate(); } }
private void btHighlightCurrentLine_Click(object sender, EventArgs e) { foreach (FATabStripItem tab in tsFiles.Items) { if (btHighlightCurrentLine.Checked) { (tab.Controls[0] as FastColoredTextBox).CurrentLineColor = _currentLineColor; } else { (tab.Controls[0] as FastColoredTextBox).CurrentLineColor = Color.Transparent; } } if (CurrentFastColoredTextBox != null) { CurrentFastColoredTextBox.Invalidate(); } }
void popupMenu_Opening(object sender, CancelEventArgs e) { //---block autocomplete menu for comments //get index of green style (used for comments) var iGreenStyle = CurrentFastColoredTextBox.GetStyleIndex(CurrentFastColoredTextBox.SyntaxHighlighter.GreenStyle); if (iGreenStyle >= 0) { if (CurrentFastColoredTextBox.Selection.Start.iChar > 0) { //current char (before caret) var c = CurrentFastColoredTextBox[CurrentFastColoredTextBox.Selection.Start.iLine][CurrentFastColoredTextBox.Selection.Start.iChar - 1]; //green Style var greenStyleIndex = Range.ToStyleIndex(iGreenStyle); //if char contains green style then block popup menu if ((c.style & greenStyleIndex) != 0) { e.Cancel = true; } } } }
private void pasteToolStripButton_Click(object sender, EventArgs e) { CurrentFastColoredTextBox.Paste(); }
private void copyToolStripButton_Click(object sender, EventArgs e) { CurrentFastColoredTextBox.Copy(); }