SIL.FieldWorks.IText.InterlinDocForAnalysis.ConvertTranslationOrNoteFlidToSegmentFlid C# (CSharp) Method

ConvertTranslationOrNoteFlidToSegmentFlid() private method

Converts InterlinLineChoices flids to corresponding SegmentTags. or NoteTags. This is useful when making translation or note selections.
private ConvertTranslationOrNoteFlidToSegmentFlid ( int annotationFlid, ISegment segment, int ws ) : int
annotationFlid int The translation or note Flid to be converted.
segment ISegment The segment the flid applies to.
ws int The writing system of the text.
return int
		internal int ConvertTranslationOrNoteFlidToSegmentFlid(int annotationFlid, ISegment segment, int ws)
		{
			int tagTextProp = -1;
			switch (annotationFlid)
			{
				case InterlinLineChoices.kflidFreeTrans:
					tagTextProp = SegmentTags.kflidFreeTranslation;
					//if (segment.FreeTranslation.StringOrNull(ws) == null)
					//    tagTextProp = kTagUserPrompt; // user prompt property for empty translation annotations
					break;
				case InterlinLineChoices.kflidLitTrans:
					tagTextProp = SegmentTags.kflidLiteralTranslation;
					//if (segment.LiteralTranslation.StringOrNull(ws) == null)
					//	tagTextProp = kTagUserPrompt; // user prompt property for empty translation annotations
					break;
				case InterlinLineChoices.kflidNote:
					tagTextProp = NoteTags.kflidContent;
					break;
				default:
					Debug.Assert(false, "An annotation flid was not converted for selection - flid = " + annotationFlid);
					break;
			}
			return tagTextProp;
		}
InterlinDocForAnalysis