C# Class NanoByte.Common.Undo.PropertyChangedCommand

An undo command that handles a changed property - usually used with a PropertyGrid.
Inheritance: PreExecutedCommand
Mostrar archivo Open project: nano-byte/common

Public Methods

Method Description
PropertyChangedCommand ( object target, PropertyDescriptor property, object oldValue, object newValue ) : System.ComponentModel

Initializes the command after the property was first changed.

Protected Methods

Method Description
OnRedo ( ) : void

Set the changed property value again.

OnUndo ( ) : void

Restore the original property value.

Private Methods

Method Description
PropertyChangedCommand ( object target, System.Windows.Forms.PropertyValueChangedEventArgs e ) : System.ComponentModel

Method Details

OnRedo() protected method

Set the changed property value again.
protected OnRedo ( ) : void
return void

OnUndo() protected method

Restore the original property value.
protected OnUndo ( ) : void
return void

PropertyChangedCommand() public method

Initializes the command after the property was first changed.
public PropertyChangedCommand ( object target, PropertyDescriptor property, object oldValue, object newValue ) : System.ComponentModel
target object The object the property belongs to.
property System.ComponentModel.PropertyDescriptor The property that was changed.
oldValue object The property's old value.
newValue object The property's current value.
return System.ComponentModel