Esempio n. 1
0
 public void CommitUndoTransaction(string transactionName)
 {
     if (_undoTransaction != null && _undoTransaction.ContainsKey(transactionName))
     {
         MathExpGroupUndo _currStates = _undoTransaction[transactionName];
         MathExpGroupUndo objRedo     = new MathExpGroupUndo(this, (MathExpGroup)root.Export().Clone());
         UndoEntity       undo        = new UndoEntity(_currStates, objRedo);
         _undoTransaction.Remove(transactionName);
         _undoEngine.AddUndoEntity(undo);
         enableUndo();
         _disableUndo = false;
     }
 }
Esempio n. 2
0
 public void AddUndoEntity(UndoEntity entity)
 {
     if (!_disableUndo)
     {
         _undoEngine.AddUndoEntity(entity);
         OnHasUndoChange();
     }
 }