PropertyAction

ObjectActionAction
[IoId("00000000-a35f-4afb-bb7a-9acc7e91e053")] [UiName("Custom Property")] public sealed class PropertyAction : ObjectAction
An undo action for setting and unsetting simple properties or fields on objects. Here, 'simple' means some of the primitives (bool, int, float, double, string), some of the eto core types (Color, Size, SizeF, Point, PointF, Rectangle, RectangleF), and anything which implements IStorable. Furthermore any property which is an enum will be stored and restored using 32-bit integer values.

Constructors

PropertyAction

#
public PropertyAction(IDocumentObject obj, string property, Effects response = Effects.ExpireSolution, bool autoExtend = true)
obj (IDocumentObject)
property (string)
response (Effects = Effects.ExpireSolution)
autoExtend (bool = true)

PropertyAction

#
public PropertyAction(IReader reader)
reader (IReader)

Properties

AutoExtend

#
public bool AutoExtend { get; }
Gets whether consecutive instances of this undo action extend each other.

Id

public Guid Id { get; }
Gets the IDocumentObject.InstanceId of the object associated with this action.
inherited fromObjectAction

Name

#
public string Name { get; }
Name of property to get or set.

Response

public Effects Response { get; }
Gets the automatic response required by this action.
inherited fromAction

State

public State State { get; }
Gets the state this action is in.
inherited fromAction

Methods

Extends

#
public override bool Extends(Action action)
action (Action)
Action.Extends

PerformRedo

public bool PerformRedo(Document doc)
Redo this action. This is only allowed if the Action.State equals State.Redo.
inherited fromAction
doc (Document)

PerformRedoInternal

#
protected override void PerformRedoInternal(Document doc, IDocumentObject obj)

PerformRedoInternal

protected sealed override void PerformRedoInternal(Document doc)
inherited fromObjectAction
doc (Document)

PerformUndo

public bool PerformUndo(Document doc)
Undo this action. This is only allowed if the Action.State equals State.Undo.
inherited fromAction
doc (Document)

PerformUndoInternal

#
protected override void PerformUndoInternal(Document doc, IDocumentObject obj)

PerformUndoInternal

protected sealed override void PerformUndoInternal(Document doc)
inherited fromObjectAction
doc (Document)

PrepareRedo

public bool PrepareRedo(Document doc)
Run the preperatory work for a redo operation. The Action.PerformRedo(Document) method ought never be called without a preceding call to Action.PrepareRedo(Document), although note that a call to Action.PrepareRedo(Document) is not necessarily followed by a call to Action.PerformRedo(Document).
inherited fromAction
doc (Document)

PrepareRedoInternal

#
protected override void PrepareRedoInternal(Document doc, IDocumentObject obj)

PrepareRedoInternal

protected sealed override void PrepareRedoInternal(Document doc)
inherited fromObjectAction
doc (Document)

PrepareUndo

public bool PrepareUndo(Document doc)
Run the preperatory work for an undo operation. The Action.PerformUndo(Document) method ought never be called without a preceding call to Action.PrepareUndo(Document), although note that a call to Action.PrepareUndo(Document) is not necessarily followed by a call to Action.PerformUndo(Document).
inherited fromAction
doc (Document)

PrepareUndoInternal

#
protected override void PrepareUndoInternal(Document doc, IDocumentObject obj)

PrepareUndoInternal

protected sealed override void PrepareUndoInternal(Document doc)
inherited fromObjectAction
doc (Document)

Store

#
public override void Store(IWriter writer)
writer (IWriter)