C# Class SIL.FieldWorks.FDO.ExtraPropChangedAction

Generate an additional PropChanged as part of an Undo or Redo action. A typical usage is pretending that the row that is the target of a dependent clause annotation has changed in its parent. Note that we create TWO of these, one that is the first action in the group, and one that is the last. The first is for Undo, and updates the ribbon to the appropriate state for when the action is undone. (It needs to be first so it will be the last thing undone.) The last is for Redo, and updates the ribbon after the task is redone (needs to be last so it is the last thing redone). A typical usage is using (new ExtraPropChangedInserter(actionHandler, sda, hvo, tag, ihvo, chvoIns, chvoDel) { // Do the changes which require the extra propchanged before and after. }
Inheritance: IUndoAction
Mostrar archivo Open project: sillsdev/FieldWorks Class Usage Examples

Public Methods

Method Description
AddAndInvokeIfRedo ( IActionHandler actionHandler, ISilDataAccess sda, int hvo, int tag, int ihvo, int chvoIns, int chvoDel, bool fForRedo ) : ExtraPropChangedAction

Make an instance and add it to the undo stack. Also, if it's the 'redo' action added after the actual changes (fForRedo is true), issue the propchanged at once to complete the original action.

Commit ( ) : void

Called when action can no longer be undone or redone

ExtraPropChangedAction ( ISilDataAccess sda, int hvo, int tag, int ihvo, int chvoIns, int chvoDel, bool fForRedo ) : System

Make one.

Redo ( ) : bool

Redo it.

SameInfo ( int hvo, int tag, int ihvo, int chvoIns, int chvoDel, bool fForRedo ) : bool

Mainly for testing...check whether this one has the same info as the arguments. May use -1 as 'don't care' argument for ihvo, chvoIns, chvoDel.

Undo ( ) : bool

Undo it.

Private Methods

Method Description
Matches ( int pattern, int val ) : bool

Method Details

AddAndInvokeIfRedo() public static method

Make an instance and add it to the undo stack. Also, if it's the 'redo' action added after the actual changes (fForRedo is true), issue the propchanged at once to complete the original action.
public static AddAndInvokeIfRedo ( IActionHandler actionHandler, ISilDataAccess sda, int hvo, int tag, int ihvo, int chvoIns, int chvoDel, bool fForRedo ) : ExtraPropChangedAction
actionHandler IActionHandler
sda ISilDataAccess
hvo int
tag int
ihvo int
chvoIns int
chvoDel int
fForRedo bool
return ExtraPropChangedAction

Commit() public method

Called when action can no longer be undone or redone
public Commit ( ) : void
return void

ExtraPropChangedAction() public method

Make one.
public ExtraPropChangedAction ( ISilDataAccess sda, int hvo, int tag, int ihvo, int chvoIns, int chvoDel, bool fForRedo ) : System
sda ISilDataAccess
hvo int
tag int
ihvo int
chvoIns int
chvoDel int
fForRedo bool
return System

Redo() public method

Redo it.
public Redo ( ) : bool
return bool

SameInfo() public method

Mainly for testing...check whether this one has the same info as the arguments. May use -1 as 'don't care' argument for ihvo, chvoIns, chvoDel.
public SameInfo ( int hvo, int tag, int ihvo, int chvoIns, int chvoDel, bool fForRedo ) : bool
hvo int
tag int
ihvo int
chvoIns int
chvoDel int
fForRedo bool
return bool

Undo() public method

Undo it.
public Undo ( ) : bool
return bool