private void Editor_MouseUp(object sender, MouseEventArgs e) { Place p = this.editor.PointToPlace(e.Location); if (FastColoredEditorUtils.cursorIsOnTextOfStyle(p, GotoStyle, this.editor) && Control.ModifierKeys == Keys.Control) { string gotoName = findGotoClickTarget(p); if (gotoName != null) { FastColoredEditorUtils.SelectText(gotoName, this.editor); } } else if (FastColoredEditorUtils.cursorIsOnTextOfStyle(p, CheckFlagStyle, this.editor) && Control.ModifierKeys == Keys.Control) { string foundTarget = findCheckFlagClickedTarget(p); FastColoredEditorUtils.SelectText(foundTarget.Trim(), this.editor); } else if (FastColoredEditorUtils.cursorIsOnTextOfStyle(p, VocabStyle, this.editor) && Control.ModifierKeys == Keys.Control) { string foundTarget = findVocabClickedTarget(p); this.FileReferenceClicked(this, new FileReferenceClickedEventArgs { VocabFileName = foundTarget }); } }
private void Editor_MouseMove(object sender, MouseEventArgs e) { Place p = this.editor.PointToPlace(e.Location); if (FastColoredEditorUtils.cursorIsOnTextOfStyle(p, GotoStyle, this.editor) && Control.ModifierKeys == Keys.Control || FastColoredEditorUtils.cursorIsOnTextOfStyle(p, CheckFlagStyle, this.editor) && Control.ModifierKeys == Keys.Control || FastColoredEditorUtils.cursorIsOnTextOfStyle(p, VocabStyle, this.editor) && Control.ModifierKeys == Keys.Control) { this.editor.Cursor = Cursors.Hand; } else { this.editor.Cursor = Cursors.IBeam; } }
private void Editor_DblClick(object sender, EventArgs e) { this.highlightedText = FastColoredEditorUtils.highlightText(this.editor.SelectedText, this.editor); }
private void Editor_MouseDown(Object sender, MouseEventArgs e) { FastColoredEditorUtils.clearHighlightedText(highlightedText); }