Table of Contents

Class MultiPropertyChangedCommand

Namespace
NanoByte.Common.Undo
Assembly
NanoByte.Common.WinForms.dll

An undo command that handles multiple changed properties - usually used with a PropertyGrid.

public class MultiPropertyChangedCommand : PreExecutedCommand, IUndoCommand
Inheritance
MultiPropertyChangedCommand
Implements
Inherited Members
Extension Methods

Constructors

MultiPropertyChangedCommand(object[], PropertyDescriptor, object?[], object?)

Initializes the command after the properties were first changed.

public MultiPropertyChangedCommand(object[] targets, PropertyDescriptor property, object?[] oldValues, object? newValue)

Parameters

targets object[]

The objects the property belongs to.

property PropertyDescriptor

The property that was changed.

oldValues object[]

The property's old values.

newValue object

The property's current value.

MultiPropertyChangedCommand(object[], GridItem, object?[])

Initializes the command after the property was first changed.

public MultiPropertyChangedCommand(object[] targets, GridItem gridItem, object?[] oldValues)

Parameters

targets object[]

The objects the SelectedObject is target at.

gridItem GridItem

The grid item representing the property being changed.

oldValues object[]

The property's old values.

Methods

OnRedo()

Set the changed property value again.

protected override void OnRedo()

OnUndo()

Restore the original property values.

protected override void OnUndo()

See Also