예제 #1
0
        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);
        }
예제 #2
0
        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);
        }