Beispiel #1
0
 public void AddDocAction(DocumentAction docAct)
 {
     if (_textdom.EnableUndoHistoryRecording)
     {
         _undoList.AddLast(docAct);
         EnsureCapacity();
     }
 }
Beispiel #2
0
 public void ReverseLastUndoAction()
 {
     if (_reverseUndoAction.Count > 0)
     {
         _textdom.EnableUndoHistoryRecording = false;
         DocumentAction docAction = _reverseUndoAction.Pop();
         _textdom.EnableUndoHistoryRecording = true;
         docAction.InvokeRedo(_textdom);
         _undoList.AddLast(docAction);
     }
 }
Beispiel #3
0
        public void UndoLastAction()
        {
            DocumentAction docAction = PopUndoCommand();

            if (docAction != null)
            {
                _textdom.EnableUndoHistoryRecording = false;
                docAction.InvokeUndo(_textdom);
                _textdom.EnableUndoHistoryRecording = true;
                _reverseUndoAction.Push(docAction);
            }
        }
Beispiel #4
0
 public DocumentAction PopUndoCommand()
 {
     if (_undoList.Count > 0)
     {
         DocumentAction lastCmd = _undoList.Last.Value;
         _undoList.RemoveLast();
         return(lastCmd);
     }
     else
     {
         return(null);
     }
 }
 public virtual void AddDocAction(DocumentAction docAction)
 {
 }