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("}"); }
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>"); } }