コード例 #1
0
        private void StoreFullNewState()
        {
            // stores the entire state of the document as a RestorePoint on the undoredo-stack
            var restorePoint = new RestorePoint();

            foreach (var layer in _document.Layers)
            {
                restorePoint.StoreNewState(layer);
            }
            _undoStack.Add(restorePoint);
            UndoStackChanged?.Invoke(this, EventArgs.Empty);
        }
コード例 #2
0
 internal void AddRestorePoint(RestorePoint restorePoint)
 {
     _undoStack.Add(restorePoint);
     UndoStackChanged?.Invoke(this, EventArgs.Empty);
 }
コード例 #3
0
 internal DocumentManipulationScope(DocumentManipulator documentManipulator, Document document)
 {
     _documentManipulator = documentManipulator;
     _document = document;
     _restorePoint = new RestorePoint();
 }