示例#1
0
		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;
		}
示例#2
0
		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;
		}