Exemple #1
0
        public override void Append(UndoRedoAction action, bool performAction)
        {
            base.Append(action, performAction);
            UndoRedoMacroAction castAction = action as UndoRedoMacroAction;

            for (int i = 0; i < this.macro.Length; i++)
            {
                this.macro[i].Append(castAction.macro[i], performAction);
            }
        }
Exemple #2
0
        public override bool CanAppend(UndoRedoAction action)
        {
            UndoRedoMacroAction castAction = action as UndoRedoMacroAction;

            if (castAction == null)
            {
                return(false);
            }
            if (castAction.macro.Length != this.macro.Length)
            {
                return(false);
            }
            for (int i = 0; i < this.macro.Length; i++)
            {
                if (!this.macro[i].CanAppend(castAction.macro[i]))
                {
                    return(false);
                }
            }

            return(true);
        }