예제 #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;
 }