/// <summary> /// Captures the current state of this <see cref="TextPlaceholderControlGraphic"/>. /// </summary> public override object CreateMemento() { PointMemento pointMemento; this.Subject.CoordinateSystem = CoordinateSystem.Source; try { pointMemento = new PointMemento(this.Subject.Location); } finally { this.Subject.ResetCoordinateSystem(); } return pointMemento; }
/// <summary> /// Creates a memento of this object. /// </summary> /// <returns></returns> public virtual object CreateMemento() { // Must store source coordinates in memento this.CoordinateSystem = CoordinateSystem.Source; PointMemento memento = new PointMemento(this.TextLocation); this.ResetCoordinateSystem(); return memento; }
/// <summary> /// Captures the state of an object. /// </summary> /// <remarks> /// The implementation of <see cref="IMemorable.CreateMemento"/> should return an /// object containing enough state information so that /// when <see cref="IMemorable.SetMemento"/> is called, the object can be restored /// to the original state. /// </remarks> public object CreateMemento() { PointMemento pointMemento; this.CoordinateSystem = CoordinateSystem.Source; try { pointMemento = new PointMemento(this.Anchor); } finally { this.ResetCoordinateSystem(); } return pointMemento; }