예제 #1
0
 public void Restore(XmlEditor editor, bool restoreText, bool restoreScroll = true)
 {
     if (restoreText)
     {
         editor._highlighting = true;
         editor.Rtf = Text;
         editor._highlighting = false;
     }
     editor.Select(CursorLocation, Length);
     if (restoreScroll)
         editor.SetScrollPos(ScrollPos);
     if (restoreText)
         editor.OnTextChanged(EventArgs.Empty);
 }
예제 #2
0
 public void Restore(XmlEditor editor, bool restoreText, bool restoreScroll = true)
 {
     if (restoreText)
     {
         editor._highlighting = true;
         editor.Rtf           = Text;
         editor._highlighting = false;
     }
     editor.Select(CursorLocation, Length);
     if (restoreScroll)
     {
         editor.SetScrollPos(ScrollPos);
     }
     if (restoreText)
     {
         editor.OnTextChanged(EventArgs.Empty);
     }
 }
예제 #3
0
 public static UndoRedoInfo Create(XmlEditor editor)
 {
     return(new UndoRedoInfo(editor.Rtf, editor.GetScrollPos(), editor.SelectionStart, editor.SelectionLength));
 }
예제 #4
0
 public static UndoRedoInfo Create(XmlEditor editor)
 {
     return new UndoRedoInfo(editor.Rtf, editor.GetScrollPos(), editor.SelectionStart, editor.SelectionLength);
 }