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
Afficher le fichier Open project: sillsdev/FieldWorks Class Usage Examples

Méthodes publiques

Méthode 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

Méthode Description
Matches ( int pattern, int val ) : bool

Method Details

AddAndInvokeIfRedo() public static méthode

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
Résultat ExtraPropChangedAction

Commit() public méthode

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

ExtraPropChangedAction() public méthode

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
Résultat System

Redo() public méthode

Redo it.
public Redo ( ) : bool
Résultat bool

SameInfo() public méthode

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
Résultat bool

Undo() public méthode

Undo it.
public Undo ( ) : bool
Résultat bool