private UndoAction MakeUndoAction() { var result = new UndoAction(m_state, s => { Text = s.Text; CursorPos = s.CursorPos; SelectionLength = s.SelectionLength; }); m_undoQueue.Queue(result); return(result); }
public void Change(SimpleUndoPair actions, string description) { var action = new GenericUndoAction(new SimpleUndoPair { Redo = () => { actions.Redo(); Modified.Execute(); }, Undo = () => { actions.Undo(); Modified.Execute(); } }, description); action.Redo(); m_undoQueue.Queue(action); }