private static void RenderHeadword(LexEntry entry, StringBuilder rtf, LexEntryRepository lexEntryRepository) { rtf.Append(@"{\b "); LanguageForm headword = entry.GetHeadWord(HeadWordWritingSystemId); if (null != headword) { // rtf.Append(RenderField(headword, currentItem, 2, null)); rtf.Append(SwitchToWritingSystem(headword.WritingSystemId, 2)); rtf.Append(headword.Form); // rtf.Append(" "); int homographNumber = lexEntryRepository.GetHomographNumber( entry, WeSayWordsProject.Project.DefaultViewTemplate.HeadwordWritingSystem ); if (homographNumber > 0) { rtf.Append(@"{\sub " + homographNumber + "}"); } } else { rtf.Append("??? "); } rtf.Append("}"); }
public override void Add(LexEntry entry) { IWritingSystemDefinition headWordWritingSystem = _viewTemplate.HeadwordWritingSystems[0]; int h = _lexEntryRepository.GetHomographNumber(entry, headWordWritingSystem); Add(entry, h); }
private static void RenderHeadword(LexEntry entry, StringBuilder html, LexEntryRepository lexEntryRepository) { if (StartNewSpan(html, HeadWordWritingSystemId, true, false, 0)) { LanguageForm headword = entry.GetHeadWord(HeadWordWritingSystemId); if (null != headword) { var str = MakeSafeForHtmlAndFormat(headword.Form); html.Append(str); int homographNumber = lexEntryRepository.GetHomographNumber( entry, WeSayWordsProject.Project.DefaultViewTemplate.HeadwordWritingSystem ); if (homographNumber > 0) { html.Append("<sub>" + homographNumber.ToString() + "</sub>"); } } else { html.Append("??? "); } html.Append(" </span>"); } }
private static void RenderHeadword(LexEntry entry, StringBuilder rtf, LexEntryRepository lexEntryRepository) { rtf.Append(@"{\b "); LanguageForm headword = entry.GetHeadWord(HeadWordWritingSystemId); if (null != headword) { // rtf.Append(RenderField(headword, currentItem, 2, null)); rtf.Append(SwitchToWritingSystem(headword.WritingSystemId, 2)); rtf.Append(headword.Form); // rtf.Append(" "); int homographNumber = lexEntryRepository.GetHomographNumber(entry, WeSayWordsProject. Project. DefaultViewTemplate . HeadwordWritingSystem); if (homographNumber > 0) { rtf.Append(@"{\super " + homographNumber + "}"); } } else { rtf.Append("??? "); } rtf.Append("}"); }