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 ScnHotspotClick(ref NativeMethods.SCNotification scn) { var keys = Keys.Modifiers & (Keys)(scn.modifiers << 16); var eventArgs = new HotspotClickEventArgs(this, keys, scn.position); switch (scn.nmhdr.code) { case NativeMethods.SCN_HOTSPOTCLICK: OnHotspotClick(eventArgs); break; case NativeMethods.SCN_HOTSPOTDOUBLECLICK: OnHotspotDoubleClick(eventArgs); break; case NativeMethods.SCN_HOTSPOTRELEASECLICK: OnHotspotReleaseClick(eventArgs); break; } }
/// <summary> /// Raises the <see cref="HotspotReleaseClick" /> event. /// </summary> /// <param name="e">A <see cref="HotspotClickEventArgs" /> that contains the event data.</param> protected virtual void OnHotspotReleaseClick(HotspotClickEventArgs e) { var handler = Events[hotspotReleaseClickEventKey] as EventHandler<HotspotClickEventArgs>; if (handler != null) handler(this, e); }
/// <summary> /// Raises the <see cref="HotspotDoubleClick"/> event. /// </summary> /// <param name="e">A <see cref="HotspotClickEventArgs"/> that contains the event data.</param> protected virtual void OnHotspotDoubleClick(HotspotClickEventArgs e) { EventHandler<HotspotClickEventArgs> handler = Events[_hotspotDoubleClickEventKey] as EventHandler<HotspotClickEventArgs>; if (handler != null) handler(this, e); }