本文整理汇总了C#中Fluqi.Extension.Helpers.jStringBuilder.AppendTabsLineIf方法的典型用法代码示例。如果您正苦于以下问题:C# jStringBuilder.AppendTabsLineIf方法的具体用法?C# jStringBuilder.AppendTabsLineIf怎么用?C# jStringBuilder.AppendTabsLineIf使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Fluqi.Extension.Helpers.jStringBuilder
的用法示例。
在下文中一共展示了jStringBuilder.AppendTabsLineIf方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: CSharpCode
public string CSharpCode(ToolTip tip) {
jStringBuilder sb = new jStringBuilder(true/*includeWhitespace*/, 0);
sb.AppendTabsLineIf("<%");
sb.AppendTabsLineIf("Html.CreateToolTip(\"name\")");
string optionsCode = OptionsCSharpCode();
string positionOptionsCode = PositionsCSharpCode();
string showEventsCode = ShowEventsCSharpCode();
string renderCode = base.RenderCSharpCode();
bool showOptions = (optionsCode.Length > 0 || showEventsCode.Length > 0 || renderCode.Length > 0);
if (showOptions) {
sb.IncIndent();
if (optionsCode.Length > 0 || positionOptionsCode.Length > 0) {
sb.AppendTabsLineIf(".Options");
sb.IncIndent();
sb.Append(optionsCode);
sb.DecIndent();
sb.AppendTabsLineIf(".Finish()");
}
if (positionOptionsCode.Length > 0) {
sb.AppendTabsLineIf(".Options");
sb.IncIndent();
sb.Append(optionsCode);
if (positionOptionsCode.Length > 0) {
sb.AppendTabsLineIf(".Position");
sb.Append(positionOptionsCode);
sb.AppendTabsLineIf(".Finish()");
}
sb.DecIndent();
sb.AppendTabsLineIf(".Finish()");
}
if (showEventsCode.Length > 0) {
sb.AppendTabsLineIf(".Events");
sb.IncIndent();
sb.Append(showEventsCode);
sb.DecIndent();
sb.AppendTabsLineIf(".Finish()");
}
if (renderCode.Length > 0)
sb.Append(renderCode);
sb.DecIndent();
}
sb.AppendTabsLineIf(".Render();");
sb.AppendTabsLineIf("%>");
return sb.ToString();
}
示例2: RenderCSharpCode
protected string RenderCSharpCode() {
jStringBuilder sb = new jStringBuilder(true/*includeWhitespace*/, 1);
if (this.renderCSS || !this.prettyRender) {
// only add if we're using the non-default settings
sb.AppendTabsLineIf(".Rendering");
sb.IncIndent();
if (!this.prettyRender)
sb.AppendTabsLineIf(".Compress()");
if (this.renderCSS)
sb.AppendTabsLineIf(".ShowCSS()");
sb.DecIndent();
sb.AppendTabsLineIf(".Finish()");
}
return sb.ToString();
}
示例3: CSharpCode
public string CSharpCode(ProgressBar pb) {
jStringBuilder sb = new jStringBuilder(true/*includeWhitespace*/, 0);
sb.AppendTabsLineIf("<%");
sb.AppendTabsFormatLineIf("Html.CreateProgressBar(\"{0}\")", pb.ID );
string optionsCode = OptionsCSharpCode();
string showEventsCode = ShowEventsCSharpCode();
string renderCode = base.RenderCSharpCode();
bool showOptions = (optionsCode.Length > 0 || showEventsCode.Length > 0 || renderCode.Length > 0);
if (showOptions) {
sb.IncIndent();
if (optionsCode.Length > 0) {
sb.AppendTabsLineIf(".Options");
sb.IncIndent();
sb.Append(optionsCode);
sb.DecIndent();
sb.AppendTabsLineIf(".Finish()");
}
if (showEventsCode.Length > 0) {
sb.AppendTabsLineIf(".Events");
sb.IncIndent();
sb.Append(showEventsCode);
sb.DecIndent();
sb.AppendTabsLineIf(".Finish()");
}
if (renderCode.Length > 0)
sb.Append(renderCode);
sb.DecIndent();
}
sb.AppendTabsLineIf(".Render();");
sb.AppendTabsLineIf("%>");
return sb.ToString();
}
示例4: 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.AppendLineIf(">");
// now add in the hyperlink that lives inside the H3
sb.IncIndent();
sb.AppendTabsLineIf(this.Hyperlink.GetTagHtml());
sb.DecIndent();
// Closing heading (H3)
sb.AppendTabsFormatLineIf("</{0}>", ac.Options.HeadingTag);
return sb.ToString();
}
示例5: OptionsCSharpCode
protected string OptionsCSharpCode() {
jStringBuilder sb = new jStringBuilder(true/*includeWhitespace*/, 2);
if (this.disabled)
sb.AppendTabsLineIf(".SetDisabled(true)");
if (!this.text)
sb.AppendTabsLineIf(".SetText(false)");
// icons must be set as a pair
if (!string.IsNullOrEmpty(this.primaryIcon) || !string.IsNullOrEmpty(this.secondaryIcon)) {
sb.AppendTabsFormatLineIf(".SetIcons(\"{0}\", \"{1}\")", this.primaryIcon, this.secondaryIcon);
}
return sb.ToString();
}
示例6: CSharpCode
public string CSharpCode(Tabs tabs) {
jStringBuilder sb = new jStringBuilder(true/*includeWhitespace*/, 0);
sb.AppendTabsLineIf("<%");
sb.AppendTabsFormatLineIf("var tabs = Html.CreateTabs(\"{0}\")", tabs.ID);
string optionsCode = OptionsCSharpCode();
string showEventsCode = ShowEventsCSharpCode();
string renderCode = base.RenderCSharpCode();
bool showOptions = (optionsCode.Length > 0 || showEventsCode.Length > 0 || renderCode.Length > 0);
if (showOptions) {
sb.IncIndent();
if (optionsCode.Length > 0) {
sb.AppendTabsLineIf(".Options");
sb.IncIndent();
sb.Append(optionsCode);
sb.DecIndent();
sb.AppendTabsLineIf(".Finish()");
}
if (showEventsCode.Length > 0) {
sb.AppendTabsLineIf(".Events");
sb.IncIndent();
sb.Append(showEventsCode);
sb.DecIndent();
sb.AppendTabsLineIf(".Finish()");
}
if (renderCode.Length > 0)
sb.Append(renderCode);
sb.DecIndent();
}
sb.IncIndent();
sb.AppendTabsLineIf(".Panes");
sb.IncIndent();
sb.AppendTabsFormatLineIf(".Add(\"tab1\", \"Tab #1\"{0})", (this.selectedTab == 0 ? ", true" : "") );
sb.AppendTabsFormatLineIf(".Add(\"tab2\", \"Tab #2\"{0})", (this.selectedTab == 1 ? ", true" : "") );
sb.AppendTabsFormatLineIf(".Add(\"tab3\", \"Tab #3\"{0})", (this.selectedTab == 2 ? ", true" : "") );
sb.DecIndent();
sb.AppendTabsLineIf(".Finish();");
sb.DecIndent();
sb.AppendTabsLineIf("%>");
sb.AppendLineIf();
sb.AppendTabsLineIf("<%using (tabs.RenderHeader()) {%>");
sb.IncIndent();
sb.AppendTabsLineIf("<%using (tabs.Panes.RenderNextPane()) {%>");
sb.AppendTabsLineIf("\t<p>Proin ...</p>");
sb.AppendTabsLineIf("<%}%>");
sb.AppendTabsLineIf("<%using (tabs.Panes.RenderNextPane()) {%>");
sb.AppendTabsLineIf("\t<p>Morbi ...</p>");
sb.AppendTabsLineIf("<%}%>");
sb.AppendTabsLineIf("<%using (tabs.Panes.RenderNextPane()) {%>");
sb.AppendTabsLineIf("\t<p>Mauris ...</p>");
sb.AppendTabsLineIf("<%}%>");
sb.DecIndent();
sb.AppendTabsLineIf("<%}%>");
return sb.ToString();
}
示例7: OptionsCSharpCode
protected string OptionsCSharpCode() {
jStringBuilder sb = new jStringBuilder(true/*includeWhitespace*/, 2);
if (this.disabled)
sb.AppendTabsLineIf(".SetDisabled(true)");
if (!string.IsNullOrEmpty(this.downIconClass) && !string.IsNullOrEmpty(this.upIconClass))
sb.AppendTabsFormatLineIf(".SetIcons(\"{0}\", \"{1}\")", this.downIconClass, this.upIconClass);
if (!string.IsNullOrEmpty(this.min))
sb.AppendTabsFormatLineIf(".SetMin({0})", this.min);
if (!string.IsNullOrEmpty(this.max))
sb.AppendTabsFormatLineIf(".SetMax({0})", this.max);
if (!string.IsNullOrEmpty(this.step))
sb.AppendTabsFormatLineIf(".SetStep({0})", this.step);
if (this.page != Options.DEFAULT_PAGE)
sb.AppendTabsFormatLineIf(".SetPage({0})", this.page);
return sb.ToString();
}
示例8: CSharpCode
public string CSharpCode() {
Dialog dlg = BuildDialogFromModel(this.Writer, "js_dlg");
jStringBuilder sb = new jStringBuilder(true/*includeWhitespace*/, 0);
sb.AppendTabsLineIf("<%");
sb.AppendTabsLineIf("Dialog dlg = Html.CreateDialog(\"dlg\")");
string optionsCode = OptionsCSharpCode();
string showEventsCode = ShowEventsCSharpCode();
string renderCode = base.RenderCSharpCode();
bool showOptions = (optionsCode.Length > 0 || showEventsCode.Length > 0 || renderCode.Length > 0);
if (showOptions) {
sb.IncIndent();
if (optionsCode.Length > 0) {
sb.AppendTabsLineIf(".Options");
sb.IncIndent();
sb.Append(optionsCode);
sb.DecIndent();
sb.AppendTabsLineIf(".Finish()");
}
if (showEventsCode.Length > 0) {
sb.AppendTabsLineIf(".Events");
sb.IncIndent();
sb.Append(showEventsCode);
sb.DecIndent();
sb.AppendTabsLineIf(".Finish()");
}
if (renderCode.Length > 0)
sb.Append(renderCode);
sb.DecIndent();
}
sb.AppendTabsLineIf(";");
sb.AppendTabsLineIf("%>");
sb.AppendLineIf();
sb.AppendTabsLineIf("<%using (dlg.RenderDialog()) {%>");
sb.AppendTabsLineIf("\t<p>Proin ...</p>");
sb.AppendTabsLineIf("<%}%>");
return sb.ToString();
}
示例9: ShowEventsCSharpCode
protected string ShowEventsCSharpCode() {
if (!this.showEvents)
// Nothing to see here
return "";
jStringBuilder sb = new jStringBuilder(true/*includeWhitespace*/, 2);
sb.AppendTabsLineIf(".SetCreateEvent(\"return createEvent(event, ui);\")");
sb.AppendTabsLineIf(".SetBeforeActivateEvent(\"return beforeActivateEvent(event, ui);\")");
sb.AppendTabsLineIf(".SetLoadEvent(\"return loadEvent(event, ui);\")");
sb.AppendTabsLineIf(".SetActivateEvent(\"return activateEvent(event, ui);\")");
sb.AppendTabsLineIf(".SetAddEvent(\"return addEvent(event, ui);\")");
sb.AppendTabsLineIf(".SetRemoveEvent(\"return removeEvent(event, ui);\")");
sb.AppendTabsLineIf(".SetBeforeLoadEvent(\"return beforeEvent(event, ui);\")");
return sb.ToString();
}
示例10: OptionsCSharpCode
protected string OptionsCSharpCode() {
jStringBuilder sb = new jStringBuilder(true/*includeWhitespace*/, 2);
if (this.disabled)
sb.AppendTabsLineIf(".SetDisabled(true)");
if (this.collapsible)
sb.AppendTabsLineIf(".SetCollapsible(true)");
if (!string.IsNullOrEmpty(this.fx))
sb.AppendTabsFormatLineIf(".SetEffect(\"{0}\")", this.fx);
if (!Utils.IsNullEmptyOrDefault(this.evt, Options.DEFAULT_EVENT))
sb.AppendTabsFormatLineIf(".SetEvent(\"{0}\")", this.evt);
return sb.ToString();
}
示例11: OptionsCSharpCode
protected string OptionsCSharpCode() {
jStringBuilder sb = new jStringBuilder(true/*includeWhitespace*/, 2);
if (this.disabled)
sb.AppendTabsLineIf(".SetDisabled(true)");
if (!Utils.IsNullEmptyOrDefault(this.appendTo, Options.DEFAULT_APPEND_TO))
sb.AppendTabsFormatLineIf(".SetAppendTo(\"{0}\")", this.appendTo);
if (this.autoFocus)
sb.AppendTabsLineIf(".SetAutoFocus(true)");
if (this.delay != Options.DEFAULT_DELAY)
sb.AppendTabsFormatLineIf(".SetDelay({0})", this.delay);
if (this.minLength != Options.DEFAULT_MINIMUM_LENGTH)
sb.AppendTabsFormatLineIf(".SetMinimumLength({0})", this.minLength);
return sb.ToString();
}
示例12: RenderHeader
/// <summary>
/// Writes out the opening part of a jQuery UI tab (the LI)
/// </summary>
internal void RenderHeader(jStringBuilder sb) {
if (!this.Visible)
// literally nothing to see here!
return;
string selected = "";
bool prettyRender = this.Panes.Tabs.Rendering.PrettyRender;
bool renderCss = this.Panes.Tabs.Rendering.RenderCSS;
if (renderCss) {
if (this.IsActive)
selected = " ui-tabs-active ui-state-active";
sb.AppendTabsFormatLineIf("<li class=\"ui-state-default ui-corner-top{0}\">", selected);
} else {
sb.AppendTabsFormatLineIf("<li>");
}
sb.IncIndent();
if (this.Panes.Tabs._AsDynamic) {
sb.AppendTabsFormatLineIf("<a href=\"{0}\"><span>{1}</span></a>", this.IDOrLocation, HttpUtility.HtmlEncode(this.Title) );
} else {
sb.AppendTabsFormatLineIf("<a href=\"#{0}\" title=\"{1}\">{1}</a>",
HttpUtility.HtmlEncode(this.IDOrLocation), HttpUtility.HtmlEncode(this.Title)
);
}
sb.DecIndent();
sb.AppendTabsLineIf("</li>");
} // RenderHeader
示例13: CSharpCode
public string CSharpCode(Accordion ac) {
jStringBuilder sb = new jStringBuilder(true/*includeWhitespace*/, 0);
sb.AppendTabsLineIf("<%");
sb.AppendTabsFormatLineIf("var ac = Html.CreateAccordion(\"{0}\")", ac.ID);
string optionsCode = OptionsCSharpCode();
string showEventsCode = ShowEventsCSharpCode();
string renderCode = base.RenderCSharpCode();
sb.IncIndent();
if (optionsCode.Length > 0) {
sb.AppendTabsLineIf(".Options");
sb.IncIndent();
sb.Append(optionsCode);
sb.DecIndent();
sb.AppendTabsLineIf(".Finish()");
}
if (showEventsCode.Length > 0) {
sb.AppendTabsLineIf(".Events");
sb.IncIndent();
sb.Append(showEventsCode);
sb.DecIndent();
sb.AppendTabsLineIf(".Finish()");
}
if (renderCode.Length > 0)
sb.Append(renderCode);
sb.DecIndent();
sb.IncIndent();
sb.AppendTabsLineIf(".Panels");
sb.IncIndent();
sb.AppendTabsFormatLineIf(".Add(\"My Panel 1\"{0})", (this.activePanel == 0 ? ", true" : "") );
sb.AppendTabsFormatLineIf(".Add(\"My Panel 2\"{0})", (this.activePanel == 1 ? ", true" : "") );
sb.AppendTabsFormatLineIf(".Add(\"My Panel 3\"{0})", (this.activePanel == 2 ? ", true" : "") );
sb.DecIndent();
sb.AppendTabsLineIf(".Finish()");
sb.DecIndent();
sb.AppendTabsLineIf(";");
sb.AppendTabsLineIf("%>");
sb.AppendLineIf();
sb.AppendTabsLineIf("<%using (ac.RenderContainer()) {%>");
sb.IncIndent();
sb.AppendTabsLineIf("<%using (ac.Panels.RenderNextPane()) {%>");
sb.AppendTabsLineIf("\t<p>Proin ...</p>");
sb.AppendTabsLineIf("<%}%>");
sb.AppendTabsLineIf("<%using (ac.Panels.RenderNextPane()) {%>");
sb.AppendTabsLineIf("\t<p>Morbi ...</p>");
sb.AppendTabsLineIf("<%}%>");
sb.AppendTabsLineIf("<%using (ac.Panels.RenderNextPane()) {%>");
sb.AppendTabsLineIf("\t<p>Mauris ...</p>");
sb.AppendTabsLineIf("<%}%>");
sb.DecIndent();
sb.AppendTabsLineIf("<%}%>");
return sb.ToString();
}
示例14: ShowEventsCSharpCode
protected string ShowEventsCSharpCode() {
if (!this.showEvents)
// nothing to see here
return "";
jStringBuilder sb = new jStringBuilder(true/*includeWhitespace*/, 2);
sb.AppendTabsLineIf(".SetCreateEvent(\"return createEvent(event, ui);\")");
sb.AppendTabsLineIf(".SetBeforeShowEvent(\"return beforeShowEvent(input, inst);\")");
sb.AppendTabsLineIf(".SetBeforeShowDayEvent(\"return beforeShowDayEvent(date);\")");
sb.AppendTabsLineIf(".SetOnChangeMonthYearEvent(\"return onChangeMonthYear(year, month, inst);\")");
sb.AppendTabsLineIf(".SetOnCloseEvent(\"return onClose(dateText, inst);\")");
sb.AppendTabsLineIf(".SetOnSelectEvent(\"return onSelect(dateText, inst);\")");
return sb.ToString();
}
示例15: OptionsCSharpCode
protected string OptionsCSharpCode() {
jStringBuilder sb = new jStringBuilder(true/*includeWhitespace*/, 2);
if (this.disabled)
sb.AppendTabsLineIf(".SetDisabled(true)");
if (this.value != Options.DEFAULT_VALUE)
sb.AppendTabsFormatLineIf(".SetValue({0})", this.value);
return sb.ToString();
}