private void OnShaftPoint2Changed(object sender, PointChangedEventArgs e) { if (_enablePointChangeEvents) { EventsHelper.Fire(_endPointChanged, this, new PointChangedEventArgs(e.Point, e.CoordinateSystem)); } }
private void OnShaftPoint1Changed(object sender, PointChangedEventArgs e) { if (_enablePointChangeEvents) { EventsHelper.Fire(_startPointChanged, this, new PointChangedEventArgs(e.Point)); } }
private void OnSubjectPoint2Changed(object sender, PointChangedEventArgs e) { this.SuspendControlPointEvents(); this.CoordinateSystem = CoordinateSystem.Source; try { this.ControlPoints[1] = this.Subject.Point2; } finally { this.ResetCoordinateSystem(); this.ResumeControlPointEvents(); } }
private void OnShaftPoint2Changed(object sender, PointChangedEventArgs e) { if (_enablePointChangeEvents) EventsHelper.Fire(_endPointChanged, this, new PointChangedEventArgs(e.Point, e.CoordinateSystem)); }
private void _lineGraphic_Point1Changed(object sender, PointChangedEventArgs e) { if (_enableInternalEvent && _pointCount > 0) this.NotifyPointChanged(0); }
private void OnShaftPoint1Changed(object sender, PointChangedEventArgs e) { if (_enablePointChangeEvents) EventsHelper.Fire(_startPointChanged, this, new PointChangedEventArgs(e.Point)); }
private void OnSubjectBottomRightChanged(object sender, PointChangedEventArgs e) { this.SuspendControlPointEvents(); this.CoordinateSystem = CoordinateSystem.Source; try { RectangleF rect = this.Subject.Rectangle; this[_topRight] = new PointF(rect.Right, rect.Top); this[_bottomRight] = new PointF(rect.Right, rect.Bottom); this[_bottomLeft] = new PointF(rect.Left, rect.Bottom); } finally { this.ResetCoordinateSystem(); this.ResumeControlPointEvents(); } }
/// <summary> /// Called to notify that the <see cref="BottomRight"/> property has changed. /// </summary> /// <param name="e"></param> protected virtual void OnBottomRightChanged(PointChangedEventArgs e) { EventsHelper.Fire(_bottomRightChangedEvent, this, e); }
/// <summary> /// Called to notify that the <see cref="TopLeft"/> property has changed. /// </summary> /// <param name="e"></param> protected virtual void OnTopLeftChanged(PointChangedEventArgs e) { EventsHelper.Fire(_topLeftChangedEvent, this, e); }
private void OnSubjectChanged(object sender, PointChangedEventArgs e) { this.SuspendControlPointEvents(); this.CoordinateSystem = CoordinateSystem.Source; try { RectangleF rect = this.Subject.Rectangle; float halfWidth = rect.Width / 2; float halfHeight = rect.Height / 2; this[_top] = new PointF(rect.Left + halfWidth, rect.Top); this[_bottom] = new PointF(rect.Left + halfWidth, rect.Bottom); this[_left] = new PointF(rect.Left, rect.Top + halfHeight); this[_right] = new PointF(rect.Right, rect.Top + halfHeight); } finally { this.ResetCoordinateSystem(); this.ResumeControlPointEvents(); } }