Esempio n. 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);
     }
 }
Esempio n. 2
0
 public static UndoRedoInfo Create(XmlEditor editor)
 {
     return(new UndoRedoInfo(editor.Rtf, editor.GetScrollPos(), editor.SelectionStart, editor.SelectionLength));
 }