/// <summary> /// /// </summary> public void Redo() { var endPos = TextPos.GetEndPos(this); if (_undoRedoHistory.TryRedo(out var command)) { RaiseModifyEvent(ModifyStatus.Modify, command, endPos); } }
/// <summary> /// /// </summary> private bool TryExecuteCommand(IHighLevelCommand command) { if (command.Validate()) { var endPos = TextPos.GetEndPos(this); _undoRedoHistory.Execute(command); RaiseModifyEvent(ModifyStatus.Modify, command, endPos); return(true); } return(false); }