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

            if (docAction != null)
            {
                textdom.EnableUndoHistoryRecording = false;
                docAction.InvokeUndo(textdom);
                textdom.EnableUndoHistoryRecording = true;
                reverseUndoAction.Push(docAction);
            }
        }
Esempio n. 4
0
 public DocumentAction PopUndoCommand()
 {
     if (undoList.Count > 0)
     {
         DocumentAction lastCmd = undoList.Last.Value;
         undoList.RemoveLast();
         return(lastCmd);
     }
     else
     {
         return(null);
     }
 }
Esempio n. 5
0
 public void AddDocAction(DocumentAction docAct)
 {
     if (textdom.EnableUndoHistoryRecording)
     {
         undoList.AddLast(docAct);
         EnsureCapacity();
     }
 }