Esempio n. 1
0
        public void Push(UndoableAction action)
        {
            stack.Push(action);

            if (stack.Count == 1)
            {
                RaiseIsEmptyChanged();
            }
        }
Esempio n. 2
0
        public void AddAction(UndoableAction action)
        {
            if (!isEnabled)
            {
                return;
            }

            if (state != UndoState.None)
            {
                return;
            }

            undoStack.Push(action);
            redoStack.Clear();
        }