Пример #1
0
        private void StoreState()
        {
            var memento = UndoableInkCanvasTest.CreateMemento();

            _undoStates.Push(memento);
            MementoUndoLabel.Content = _undoStates.Count;
        }
Пример #2
0
 private void Undo(object sender, ExecutedRoutedEventArgs executedRoutedEventArgs)
 {
     if (_undoStates.Count > 1)
     {
         _redoStates.Push(_undoStates.Pop());
         var lastState = _undoStates.Peek();
         UndoableInkCanvasTest.SetMemento(lastState);
     }
     MementoUndoLabel.Content = _undoStates.Count;
     MementoRedoLabel.Content = _redoStates.Count;
 }