SIL.FieldWorks.IText.InterlinDocForAnalysis.GetCurrentTextObjects C# (CSharp) Метод

GetCurrentTextObjects() приватный Метод

Retrieves the selected objects and data from the selection range.
private GetCurrentTextObjects ( int clev, SIL.FieldWorks.Common.COMInterfaces.SelLevInfo rgvsli, int tag, int &curParaIndex, int &curSegIndex, int &curNoteIndex, ISegment &curSeg, INote &curNote ) : void
clev int The number of levels of selection range results.
rgvsli SIL.FieldWorks.Common.COMInterfaces.SelLevInfo The selection range with clev levels of structure.
tag int The property of the bottom-level [0] object that is of interest.
curParaIndex int The index of the paragraph containing the selected text.
curSegIndex int The index of the segment containing the selected text.
curNoteIndex int if tag indicates a note, the note index in its segment sequence otherwise -1.
curSeg ISegment The selected segment object
curNote INote The selected note object or null if curNoteIndex is -1.
Результат void
		private void GetCurrentTextObjects(int clev, SelLevInfo[] rgvsli, int tag, out int curParaIndex, out int curSegIndex, out int curNoteIndex, out ISegment curSeg, out INote curNote)
		{
			curParaIndex = rgvsli[clev - 2].ihvo;
			var curPara = (IStTxtPara)RootStText.ParagraphsOS[curParaIndex];
			Debug.Assert(curPara != null, "Moving from a non-exisiting paragraph in interlinear Doc.");
			curSegIndex = rgvsli[clev - 3].ihvo;
			curSeg = curPara.SegmentsOS[curSegIndex];
			Debug.Assert(curSeg != null, "Moving from a non-exisiting segment in interlinear Doc.");
			curNote = null;
			curNoteIndex = -1;
			if (tag == NoteTags.kflidContent)
			{
				//if clev == 5 then we have both a Free Translation and some number of Notes
				//otherwise I assume we have only a Free Translation if clev == 4
				if (clev == 5)
				{
					curNoteIndex = rgvsli[0].ihvo; //if there are multiple Notes the index could be more than 0
					curNote = curSeg.NotesOS[curNoteIndex];
				}
			}
		}
InterlinDocForAnalysis