Ejemplo n.º 1
0
        public override void Redo()
        {
            foreach (KeyValuePair <Element, ElementTimeInfo> e in m_changedElements)
            {
                // Key is reference to actual element. Value is class with the times before undo.
                // Swap the element's times with the saved times from before the undo, essentially re-doing the original action.
                ElementTimeInfo.SwapTimes(e.Key, e.Value);
            }

            base.Redo();
        }
Ejemplo n.º 2
0
        public override void Undo()
        {
            foreach (KeyValuePair <Element, ElementTimeInfo> e in m_changedElements)
            {
                // Key is reference to actual element. Value is class with its times before move.
                // Swap the element's times with the saved times from before the move, so we can restore them later in redo.
                ElementTimeInfo.SwapTimes(e.Key, e.Value);
            }

            base.Undo();
        }