示例#1
0
        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
                });
            }
        }
示例#2
0
        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;
            }
        }
示例#3
0
 private void Editor_DblClick(object sender, EventArgs e)
 {
     this.highlightedText = FastColoredEditorUtils.highlightText(this.editor.SelectedText, this.editor);
 }
示例#4
0
 private void Editor_MouseDown(Object sender, MouseEventArgs e)
 {
     FastColoredEditorUtils.clearHighlightedText(highlightedText);
 }