Exemplo n.º 1
0
 public void AddDocAction(DocumentAction docAct)
 {
     if (_textdom.EnableUndoHistoryRecording)
     {
         _undoList.AddLast(docAct);
         EnsureCapacity();
     }
 }
Exemplo n.º 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);
     }
 }
Exemplo n.º 3
0
        public void UndoLastAction()
        {
            DocumentAction docAction = PopUndoCommand();

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