/// <summary> /// Captures the current state of this <see cref="LineSegmentStretchControlGraphic"/>. /// </summary> public override object CreateMemento() { PointsMemento pointsMemento = new PointsMemento(); this.Subject.CoordinateSystem = CoordinateSystem.Source; try { pointsMemento.Add(this.Subject.Point1); pointsMemento.Add(this.Subject.Point2); } finally { this.Subject.ResetCoordinateSystem(); } return(pointsMemento); }
/// <summary> /// Captures the current state of this <see cref="VerticesControlGraphic"/>. /// </summary> public override object CreateMemento() { PointsMemento pointsMemento = new PointsMemento(); this.Subject.CoordinateSystem = CoordinateSystem.Source; try { foreach (PointF point in this.Subject.Points) { pointsMemento.Add(point); } } finally { this.Subject.ResetCoordinateSystem(); } return(pointsMemento); }