protected override void OnMouseDown(GetPointMouseEventArgs e) { base.OnMouseDown(e); var picker = new PickContext(); picker.View = e.Viewport.ParentView; picker.PickStyle = PickStyle.PointPick; var xform = e.Viewport.GetPickTransform(e.WindowPoint); picker.SetPickTransform(xform); foreach (var cp in m_conduit_points) { double depth; double distance; if (picker.PickFrustumTest(cp.Point, out depth, out distance)) cp.Color = System.Drawing.Color.Red; else cp.Color = System.Drawing.Color.White; } }
/// <summary>Default calls the MouseDown event.</summary> /// <param name="e">Current argument for the event.</param> protected virtual void OnMouseDown(GetPointMouseEventArgs e) { if (MouseDown != null) MouseDown(this, e); }
/// <summary>Calls the <see cref="MouseMove"/> event and can/should be called by overriding implementation.</summary> /// <param name="e">Current argument for the event.</param> protected virtual void OnMouseMove(GetPointMouseEventArgs e) { if (MouseMove != null) MouseMove(this, e); }
private static void CustomMouseCallback(IntPtr pRhinoViewport, uint flags, Point3d point, System.Drawing.Point viewWndPoint, int move) { if (null == m_active_gp) return; try { GetPointMouseEventArgs e = new GetPointMouseEventArgs(m_active_gp, pRhinoViewport, flags, point, viewWndPoint); bool callMove = (move != 0); if (callMove) m_active_gp.OnMouseMove(e); else m_active_gp.OnMouseDown(e); } catch (Exception ex) { Runtime.HostUtils.ExceptionReport(ex); } }
private void Getter_MouseMove(object sender, GetPointMouseEventArgs e) { _plane = AlignX(_original, e.Point); }
private void LocalMouseMove(object sender, GetPointMouseEventArgs e) { _plane = AlignY(_original, e.Point); }
private void LocalMouseMove(object sender, GetPointMouseEventArgs e) { _plane = e.Viewport.ConstructionPlane(); _plane.Origin = e.Point; }