public override string ToHTML(XmlPart xmlpart) { string title = "<b>例</b> "; if (this.Part != "") { title += xmlpart.GetElemPart(this.Part).IcoHTML; } title += " <span class=\"zh\">" + Hanyu.statics.EscapeHTML(this.elem.InnerText) + "</span>"; string div = ""; div += this.elem.GetAttribute("ja"); div += this.attrClass.ToHTML(xmlpart); div += this.htmlDesc; //TODO:level //TODO:en if (div == "") { return("<p class=\"exm\">" + title + "</p>"); } else { return("<p class=\"exmt\">" + title + "</p><div class=\"exm\">" + div + "</div>"); } }
public override string ToHTML(XmlPart xmlpart) { string r = "<h2 class=\"mean\">" + ((this.Part == "")?"[?]":xmlpart.GetElemPart(this.Part).IcoHTML) + " " + Hanyu.statics.EscapeHTML(this.attrJa) + "</h2>"; r += this.attrClass.ToHTML(xmlpart); r += this.htmlDesc; //TODO:level //TODO:en //TODO:quant(名詞の場合) r += this.htmlChilds(xmlpart); return(r); }
//METHODS public override string ToHTML(XmlPart xmlpart) { string r = "<h2 class=\"mean\"><span class=\"itemtype\">" + Word.Const.NameOfType(this.type) + "</span>"; if (this.Part != "") { r += xmlpart.GetElemPart(this.Part).IcoHTML + ": "; } if (this.type == Word.ContentType.Construct || this.type == Word.ContentType.Idiom) { r += " " + this.htmlName + " " + this.htmlPinyin; } r += "</h2>"; r += "<p>" + this.elem.GetAttribute("ja") + "</p>"; r += this.attrClass.ToHTML(xmlpart); r += this.htmlTarget; r += this.htmlDesc; //TODO:level //TODO:en //TODO:quant(名詞の場合) r += this.htmlChilds(xmlpart); return(r); }