Class MultiPropertyChangedCommand
An undo command that handles multiple changed properties - usually used with a PropertyGrid.
Implements
Inherited Members
Namespace: NanoByte.Common.Undo
Assembly: NanoByte.Common.WinForms.dll
Syntax
public class MultiPropertyChangedCommand : PreExecutedCommand, IUndoCommand
Constructors
MultiPropertyChangedCommand(Object[], PropertyDescriptor, Object[], Object)
Initializes the command after the properties were first changed.
Declaration
public MultiPropertyChangedCommand(object[] targets, PropertyDescriptor property, object[] oldValues, object newValue)
Parameters
Type | Name | Description |
---|---|---|
Object[] | targets | The objects the property belongs to. |
PropertyDescriptor | property | The property that was changed. |
Object[] | oldValues | The property's old values. |
Object | newValue | The property's current value. |
MultiPropertyChangedCommand(Object[], GridItem, Object[])
Initializes the command after the property was first changed.
Declaration
public MultiPropertyChangedCommand(object[] targets, GridItem gridItem, object[] oldValues)
Parameters
Type | Name | Description |
---|---|---|
Object[] | targets | The objects the SelectedObject is target at. |
GridItem | gridItem | The grid item representing the property being changed. |
Object[] | oldValues | The property's old values. |
Methods
OnRedo()
Set the changed property value again.
Declaration
protected override void OnRedo()
Overrides
OnUndo()
Restore the original property values.
Declaration
protected override void OnUndo()