本文整理汇总了C#中Fluqi.Extension.Helpers.jStringBuilder.AppendFormatLineIf方法的典型用法代码示例。如果您正苦于以下问题:C# jStringBuilder.AppendFormatLineIf方法的具体用法?C# jStringBuilder.AppendFormatLineIf怎么用?C# jStringBuilder.AppendFormatLineIf使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Fluqi.Extension.Helpers.jStringBuilder
的用法示例。
在下文中一共展示了jStringBuilder.AppendFormatLineIf方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: GetTagHtml
/// <summary>
/// Renders the panel header and returns the HTML
/// </summary>
/// <returns></returns>
internal string GetTagHtml() {
Accordion ac = this.OnPanel.OnAccordion;
bool prettyRender = ac.Rendering.PrettyRender;
bool renderCss = ac.Rendering.RenderCSS;
int tabDepth = ac.Rendering.TabDepth;
jStringBuilder sb = new jStringBuilder(prettyRender, tabDepth + 1);
// H3 tag (or whatever if it's been overridden in the options)
sb.AppendLineIf();
sb.AppendTabsFormatIf("<{0}", ac.Options.HeadingTag);
if (renderCss) {
base.WithCss("ui-accordion-header ui-helper-reset ui-state-default");
if (this.OnPanel.IsActive)
base.WithCss("ui-state-active ui-corner-top");
else
base.WithCss("ui-corner-all");
}
// add in any attributes the user has added
base.RenderAttributes(sb);
// and close off the starting H3 tag
sb.Append(">");
sb.Append(this.OnPanel.Title);
// Closing heading (H3)
sb.AppendFormatLineIf("</{0}>", ac.Options.HeadingTag);
return sb.ToString();
}