Exemple #1
0
        public void Insert(int position, FragmentSelection fragments)
        {
            var command = new InsertSelectionCommand(this, position, fragments);

            command.Execute();
            var undoCommand = new CutSelectionCommand(this, fragments);

            AddRedoUndo(undoCommand, command);
        }
Exemple #2
0
        public void Cut(FragmentSelection fragments)
        {
            var command = new CutSelectionCommand(this, fragments);

            command.Execute();
            var undoCommand = new InsertSelectionCommand(this, fragments.Start, fragments);

            AddRedoUndo(undoCommand, command);
        }