protected override void OnMouseUp(MouseEventArgs e) { base.OnMouseUp(e); if (e.Button == MouseButtons.Right) { var vec = new Rhino.Geometry.Vector2d(e.X - RightMouseDownLocation.X, e.Y - RightMouseDownLocation.Y); if (vec.Length < 10) { ShowContextMenu(e.Location); } } RightMouseDownLocation = System.Drawing.Point.Empty; }
protected override void OnMouseMove(MouseEventArgs e) { if (e.Button == MouseButtons.Right) { var vec = new Rhino.Geometry.Vector2d(e.X - RightMouseDownLocation.X, e.Y - RightMouseDownLocation.Y); if (vec.Length > 10) { RightMouseDownLocation = System.Drawing.Point.Empty; } } else { RightMouseDownLocation = System.Drawing.Point.Empty; } base.OnMouseMove(e); }
public Rhino.Geometry.Vector2d ToVector2d() { Rhino.Geometry.Vector2d v = new Rhino.Geometry.Vector2d(); UnsafeNativeMethods.Rdk_Variant_Get2dVectorValue(ConstPointer(), ref v); return v; }
public Vector2dField(string internalName, string friendlyName, Rhino.Geometry.Point2d defaultValue) : base(internalName, friendlyName) { m_defaultValue = new Geometry.Vector2d(defaultValue.X, defaultValue.Y); }
public Vector2dField(string internalName, string friendlyName, Rhino.Geometry.Vector2d defaultValue) : base(internalName, friendlyName) { m_defaultValue = defaultValue; }
public Rhino.Geometry.Vector2d ToVector2d() { Rhino.Geometry.Vector2d v = new Rhino.Geometry.Vector2d(); UnsafeNativeMethods.Rdk_Variant_Get2dVectorValue(ConstPointer(), ref v); return(v); }
public void SetValue(Rhino.Geometry.Vector2d v) { UnsafeNativeMethods.Rdk_Variant_Set2dVectorValue(NonConstPointer(), v); }
public Variant(Rhino.Geometry.Vector2d v) : this() { SetValue(v); }