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 void AddDocAction(DocumentAction docAct)
 {
     if (textdom.EnableUndoHistoryRecording)
     {
         undoList.AddLast(docAct);
         EnsureCapacity();
     }
 }