public override bool CanAppend(UndoRedoAction action) { EditFieldAction castAction = action as EditFieldAction; if (castAction == null) return false; if (castAction.targetField != this.targetField) return false; if (!castAction.targetObj.SequenceEqual(this.targetObj)) return false; return true; }
public override void Append(UndoRedoAction action, bool performAction) { base.Append(action, performAction); EditFieldAction castAction = action as EditFieldAction; if (performAction) { castAction.backupValue = this.backupValue; castAction.Do(); } this.targetValue = castAction.targetValue ?? this.targetValue; }