当前位置: 首页>>代码示例>>C#>>正文


C# jStringBuilder.AppendTabsFormatIf方法代码示例

本文整理汇总了C#中Fluqi.Extension.Helpers.jStringBuilder.AppendTabsFormatIf方法的典型用法代码示例。如果您正苦于以下问题:C# jStringBuilder.AppendTabsFormatIf方法的具体用法?C# jStringBuilder.AppendTabsFormatIf怎么用?C# jStringBuilder.AppendTabsFormatIf使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Fluqi.Extension.Helpers.jStringBuilder的用法示例。


在下文中一共展示了jStringBuilder.AppendTabsFormatIf方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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();
		}
开发者ID:akhuang,项目名称:Fluqi,代码行数:37,代码来源:Header.cs

示例2: GetTagHtml

		/// <summary>
		/// Renders the HTML for the hyperlink.
		/// </summary>
		/// <returns>String of HTML</returns>
		public string GetTagHtml() {
			Accordion ac = this._Header.OnPanel.OnAccordion;
			bool prettyRender = ac.Rendering.PrettyRender;
			bool renderCss = ac.Rendering.RenderCSS;
			int tabDepth = ac.Rendering.TabDepth;
			jStringBuilder sb = new jStringBuilder(prettyRender, tabDepth); 

			sb.AppendTabsFormatIf("<a href=\"{0}\">", this.URL);
			base.RenderAttributes(sb);
			sb.Append(this.Title);
			sb.Append("</a>");

			return sb.ToString();
		}
开发者ID:codeinpeace,项目名称:Fluqi,代码行数:18,代码来源:Hyperlink.cs

示例3: GetControlScript

		} // Render


		/// <summary>
		/// Writes out the calling script for the jQuery Tabs plugin, adding options that have been
		/// a defined.
		/// </summary>
		/// <param name="tabDepth">
		/// How far to indent the script code setting.
		/// </param>
		/// <returns>
		/// Returns rendered initialisation script
		/// </returns>
		protected internal string GetControlScript(int tabDepth) {
			jStringBuilder sb = new jStringBuilder(this.Rendering.PrettyRender, this.Rendering.TabDepth);
			
			sb.IncIndent();
			sb.AppendTabsFormatIf("$(\"#{0}\").autocomplete(", this.ID);
			Core.ScriptOptions options = new Core.ScriptOptions();
			this.Options.DiscoverOptions(options);
			this.Events.DiscoverOptions(options);
			options.Render(sb);
			sb.Append(");");
			sb.DecIndent();
			
			return sb.ToString();
		}
开发者ID:xuanvu,项目名称:Fluqi,代码行数:27,代码来源:AutoComplete.cs

示例4: RenderBody

		/// <summary>
		/// Renders the body of the accordion panel.
		/// </summary>
		/// <param name="sb">StringBuilder to render the object to</param>
		internal void RenderBody(jStringBuilder sb) {
			bool renderCss = this.OnAccordion.Rendering.RenderCSS;

			// Opening pane container div
			sb.AppendTabsFormatIf("<{0}", this.OnAccordion.Options.ContentTag);

			base.RenderAttributes(sb);
			if (renderCss) {
				sb.Append(" class=\"ui-accordion-content ui-helper-reset ui-widget-content ui-corner-bottom");

				// may seem strange, but when renderCss is on, we always need the "ui-accordion-content-active"
				// presented otherwise the panel will be collapsed (hidden) and if JavaScript isn't on, the user
				// will have no way of seeing the content !
				sb.Append(" ui-accordion-content-active");

				sb.Append("\"");
			}
			sb.Append(">");
			sb.AppendLineIf();
		}
开发者ID:xuanvu,项目名称:Fluqi,代码行数:24,代码来源:Panel.cs

示例5: GetControlScript

		/// <summary>
		/// Writes out the calling script for the jQuery Tabs plugin, adding options that have been
		/// a defined.
		/// </summary>
		/// <param name="tabDepth">
		/// How far to indent the script code setting.
		/// </param>
		/// <returns>
		/// Returns rendered initialisation script
		/// </returns>
		protected internal string GetControlScript(int tabDepth) {
			jStringBuilder sb = new jStringBuilder(this.Rendering.PrettyRender, this.Rendering.TabDepth);
			string selector = "";
	
			if (IsGlobal())
				selector = Options.DEFAULT_TARGET;
			else 
				selector = string.Format("\"#{0}\"", this.ID);
			
			sb.IncIndent();
			sb.AppendTabsFormatIf("$({0}).tooltip(", selector);
			Core.ScriptOptions options = new Core.ScriptOptions();
			this.Options.DiscoverOptions(options);
			this.Events.DiscoverOptions(options);
			options.Render(sb);
			sb.Append(");");
			sb.DecIndent();
			
			return sb.ToString();
		}
开发者ID:toepoke,项目名称:Fluqi,代码行数:30,代码来源:ToolTip.cs

示例6: RenderBody

		/// <summary>
		/// Renders the body of the accordion panel.
		/// </summary>
		/// <param name="sb">StringBuilder to render the object to</param>
		internal void RenderBody(jStringBuilder sb) {
			bool renderCss = this.OnAccordion.Rendering.RenderCSS;

			// Opening pane container div
			sb.AppendTabsFormatIf("<{0}", this.OnAccordion.Options.ContentTag);

			base.RenderAttributes(sb);
			if (renderCss) {
				sb.Append(" class=\"ui-accordion-content ui-helper-reset ui-widget-content ui-corner-bottom");

				if (this.IsActive)
					sb.Append(" ui-accordion-content-active");

				sb.Append("\"");
			}
			sb.Append(">");
			sb.AppendLineIf();
		}
开发者ID:codeinpeace,项目名称:Fluqi,代码行数:22,代码来源:Panel.cs

示例7: GetControlScript

		/// <summary>
		/// Writes out the calling script for the jQuery Tabs plugin, adding options that have been
		/// a defined.
		/// </summary>
		/// <param name="tabDepth">
		/// How far to indent the script code (see <see cref="Core.Rendering.PrettyRender"/> setting.
		/// </param>
		/// <returns>
		/// Returns rendered initialisation script
		/// </returns>
		public string GetControlScript(int tabDepth) {
			jStringBuilder sb = new jStringBuilder(this.Rendering.PrettyRender, this.Rendering.TabDepth);
			
			sb.IncIndent();
			sb.AppendTabsFormatIf("$.ajax(", this.ID);
			Core.ScriptOptions options = new Core.ScriptOptions();
			this.Options.DiscoverOptions(options);
			options.Render(sb);
			sb.Append(");");
			sb.DecIndent();
			
			return sb.ToString();
		}
开发者ID:xuanvu,项目名称:Fluqi,代码行数:23,代码来源:Ajax.cs

示例8: GetControlScript

		/// <summary>
		/// Writes out the calling script for the jQuery Tabs plugin, adding options that have been
		/// a defined.
		/// </summary>
		/// <param name="tabDepth">
		/// How far to indent the script code setting.
		/// </param>
		/// <returns>
		/// Returns rendered initialisation script
		/// </returns>
		protected internal string GetControlScript(int tabDepth) {
			jStringBuilder sb = new jStringBuilder(this.Rendering.PrettyRender, this.Rendering.TabDepth);
			
			sb.IncIndent();
			sb.AppendTabsFormatIf("$(\"#{0}\").button(", this.ID);
			Core.ScriptOptions options = new Core.ScriptOptions();
			this.Options.DiscoverOptions(options);
			this.Events.DiscoverOptions(options);
			options.Render(sb);
			sb.Append(");");
			if (!string.IsNullOrEmpty(this.Events.ClickEvent)) {
				// as ClickEvent isn't a "real" jQuery UI button event, it has to be wired up separately
				sb.AppendLineIf();
				sb.AppendTabsFormatLineIf("$(\"#{0}\").click(function() {{", this.ID);
				sb.Append(this.Events.ClickEvent);
				sb.AppendLineIf();
				sb.AppendTabsLineIf("});");
			}
			sb.DecIndent();
						
			return sb.ToString();
		}
开发者ID:xuanvu,项目名称:Fluqi,代码行数:32,代码来源:PushButton.cs


注:本文中的Fluqi.Extension.Helpers.jStringBuilder.AppendTabsFormatIf方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。