private void NoteEdit_HotspotClick(object sender, HotspotClickEventArgs e) { var settings = VM?.Settings; if (settings == null) { return; } if (Settings.LinkMode == LinkHighlightMode.SingleClick) { var link = GetHighlighter(settings).GetClickedLink(NoteEdit.Text, e.Position); if (link != null) { OpenLink(link); } } else if (Settings.LinkMode == LinkHighlightMode.ControlClick && e.Modifiers.HasFlag(Keys.Control)) { var link = GetHighlighter(settings).GetClickedLink(NoteEdit.Text, e.Position); if (link != null) { OpenLink(link); } } }
private void textEditor_HotspotClick(object sender, HotspotClickEventArgs e) { var endPoint = textEditor.Text.IndexOf(']', e.Position); var startPoint = textEditor.Text.LastIndexOf('[', e.Position, e.Position + 1); var linkText = textEditor.Text.Substring(startPoint + 1, endPoint - startPoint - 1); ControllerCommand(new Commands.FollowWikiLink(Document, linkText)); }
void NavPointListView_HotspotDoubleClick(object sender, HotspotClickEventArgs e) { this.Lines.FromPosition(e.Position).Select(); try { items[this.Lines.FromPosition(e.Position).Number].Goto(); } catch { } }
private void NoteEdit_HotspotDoubleClick(object sender, HotspotClickEventArgs e) { if (Settings.LinkMode == LinkHighlightMode.DoubleClick) { var links = _highlighterDefault.FindAllLinks(NoteEdit); var link = links.FirstOrDefault(l => l.Item2 <= e.Position && e.Position <= l.Item3); if (link != null) { Process.Start(link.Item1); } } }
protected override void OnHotspotDoubleClick(HotspotClickEventArgs e) { base.OnHotspotDoubleClick(e); int pos = e.Position; var textRef = ResolveReference(ref pos); Debug.Assert(textRef != null); if (Navigate != null) { var r = textRef.Value; Navigate(this, new CodeViewNavigateEventArgs(r.IsLocal, r.IsDefinition, r.Reference)); } }
private void NoteEdit_HotspotDoubleClick(object sender, HotspotClickEventArgs e) { var settings = VM?.Settings; if (settings == null) { return; } if (Settings.LinkMode == LinkHighlightMode.DoubleClick) { var link = GetHighlighter(settings).GetClickedLink(NoteEdit.Text, e.Position); if (link != null) { OpenLink(link); } } }
private void NoteEdit_HotspotClick(object sender, HotspotClickEventArgs e) { if (Settings.LinkMode == LinkHighlightMode.SingleClick) { var links = _highlighterDefault.FindAllLinks(NoteEdit); var link = links.FirstOrDefault(l => l.Item2 <= e.Position && e.Position <= l.Item3); if (link != null) { Process.Start(link.Item1); } } else if (Settings.LinkMode == LinkHighlightMode.ControlClick && e.Modifiers.HasFlag(Keys.Control)) { var links = _highlighterDefault.FindAllLinks(NoteEdit); var link = links.FirstOrDefault(l => l.Item2 <= e.Position && e.Position <= l.Item3); if (link != null) { Process.Start(link.Item1); } } }