Пример #1
0
 public UndoHistoryImpl(UndoHistoryRegistryImpl undoHistoryRegistry) {
     _currentTransaction = null;
     UndoHistoryRegistry = undoHistoryRegistry;
     _undoStack = new Stack<ITextUndoTransaction>();
     _redoStack = new Stack<ITextUndoTransaction>();
     _activeUndoOperationPrimitive = null;
     _state = TextUndoHistoryState.Idle;
 }
Пример #2
0
        private bool ProceedWithMerge(UndoTransactionImpl transaction1, UndoTransactionImpl transaction2)
        {
            UndoHistoryRegistryImpl registry = UndoHistoryRegistry;

            return(transaction1.MergePolicy != null &&
                   transaction2.MergePolicy != null &&
                   transaction1.MergePolicy.TestCompatiblePolicy(transaction2.MergePolicy) &&
                   transaction1.MergePolicy.CanMerge(transaction1, transaction2));
        }
Пример #3
0
 public UndoHistoryImpl(UndoHistoryRegistryImpl undoHistoryRegistry)
 {
     _currentTransaction           = null;
     UndoHistoryRegistry           = undoHistoryRegistry;
     _undoStack                    = new Stack <ITextUndoTransaction>();
     _redoStack                    = new Stack <ITextUndoTransaction>();
     _activeUndoOperationPrimitive = null;
     _state = TextUndoHistoryState.Idle;
 }