public void SelectText(int index, int startPosition, int endPosition) { var segmentPair = GetSegmentPair(index); var paragraphUnitId = segmentPair.GetParagraphUnitProperties().ParagraphUnitId.Id; _document.SetActiveSegmentPair(paragraphUnitId, segmentPair.Properties.Id.Id); }
private void returnButton_Click(object sender, EventArgs e) { if (_currentDoc != null && _currentSegmentPair != null) { var editorController = GetEditorController(); editorController.Activate(_currentDoc); var projectFile = _currentSegmentPair.GetProjectFile(); _currentDoc.SetActiveSegmentPair(projectFile, _currentSegmentPair.Properties.Id.Id, true); } }