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


C# jStringBuilder.AppendTabsIf方法代码示例

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


在下文中一共展示了jStringBuilder.AppendTabsIf方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: GetTagHtml

		/// <summary>
		/// Builds up the HTML for the AutoComplete control and options (and returns the generated HTML).
		/// </summary>
		/// <returns>Generated HTML for the control.</returns>
		protected internal string GetTagHtml() {
			// ID property is _mandatory_
			if (string.IsNullOrEmpty(this.ID))
				throw new ArgumentException("AutoComplete ID property _must_ be supplied.");

			bool prettyRender = this.Rendering.PrettyRender;
			bool renderCss = this.Rendering.RenderCSS;
			int tabDepth = this.Rendering.TabDepth;
			jStringBuilder sb = new jStringBuilder(prettyRender, tabDepth);

			if (renderCss)
			  this.WithCss("ui-autocomplete-input");
			// turn off autocomplete, so it doesn't compete with dropdown menu
			this.WithAttribute("autocomplete", "off");

			sb.AppendTabsIf();
			sb.AppendFormat("<input id=\"{0}\"", this.ID);
			this.RenderAttributes(sb);
			sb.Append(" />");

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

示例2: GetTagHtml

		/// <summary>
		/// Builds and returns the HTML for the Slider control (basically the DIV).
		/// JavaScript initialisation for the control is also added to the response stream if the
		/// AutoScript rendering option is true.
		/// </summary>
		/// <returns>HTML for the Slider control.</returns>
		protected internal string GetTagHtml() {
			// ID property is _mandatory_
			if (string.IsNullOrEmpty(this.ID))
				throw new ArgumentException("Slider ID property _must_ be supplied.");

			bool prettyRender = this.Rendering.PrettyRender;
			bool renderCss = this.Rendering.RenderCSS;
			int tabDepth = this.Rendering.TabDepth;
			jStringBuilder sb = new jStringBuilder(prettyRender, tabDepth);

			this.WithID(this.ID);
			if (renderCss) {
				this.WithCss("ui-slider ui-widget ui-widget-content ui-corner-all");
				this.WithCss("ui-slider-{0}", Core.Orientation.OrientationToString(this.Options.Orientation));
			}

			if (this.Options.Orientation == Core.Orientation.eOrientation.Horizontal) {
				if (this.Options.Size != Options.DEFAULT_SIZE)
					this.WithStyle("width", this.Options.Size);
			} else {
				// vertical always has to be output otherwise the slider won't work, so no default
				// check here
				this.WithStyle("height", this.Options.Size);
			}

			sb.AppendTabsIf();
			sb.Append("<div");

			base.RenderAttributes(sb);

			sb.AppendLineIf("></div>");

			if (this.Rendering.AutoScript) {
				this.RenderStartUpScript();
			}

			return sb.ToString();

		} // GetTagHtml
开发者ID:xuanvu,项目名称:Fluqi,代码行数:45,代码来源:Slider.cs

示例3: GetTagHtml

		/// <summary>
		/// Builds and returns the HTML for the Spinner control (basically the DIV).
		/// JavaScript initialisation for the control is also added to the response stream if the
		/// AutoScript rendering option is true.
		/// </summary>
		/// <returns>HTML for the Spinner control.</returns>
		protected internal string GetTagHtml() {
			// ID property is _mandatory_
			if (string.IsNullOrEmpty(this.ID))
				throw new ArgumentException("Spinner ID property _must_ be supplied.");

			bool prettyRender = this.Rendering.PrettyRender;
			bool renderCss = this.Rendering.RenderCSS;
			int tabDepth = this.Rendering.TabDepth;
			jStringBuilder sb = new jStringBuilder(prettyRender, tabDepth);

			this.WithID(this.ID);
			if (renderCss) {
				this.WithCss("ui-spinner-input");
			}

			sb.AppendTabsIf();
			if (renderCss) {
				sb.Append("<span class=\"ui-spinner ui-widget ui-widget-content ui-corner-all\"");
			}
			sb.Append("<input");
			base.RenderAttributes(sb);
			sb.AppendLineIf(">");
			if (renderCss) {
				// close the containing span
				sb.Append("</span>");
			}

			// Note we don't render the Up/Down CSS even if RenderCSS is "true" as basically it doesn't make any
			// sense to render them as they won't do anything without the JavaScript to intercept the behaviour

			if (this.Rendering.AutoScript) {
				this.RenderStartUpScript();
			}

			return sb.ToString();

		} // GetTagHtml
开发者ID:akhuang,项目名称:Fluqi,代码行数:43,代码来源:Spinner.cs

示例4: GetTagHtml

		/// <summary>
		/// Builds the HTML required for the DatePicker control.
		/// JavaScript initialisation for the control is also added to the response stream if the
		/// AutoScript rendering option is true.
		/// </summary>
		/// <returns></returns>
		protected internal string GetTagHtml() {
			// ID property is _mandatory_
			if (string.IsNullOrEmpty(this.ID))
				throw new ArgumentException("DatePicker ID property _must_ be supplied.");

			bool prettyRender = this.Rendering.PrettyRender;
			bool renderCss = this.Rendering.RenderCSS;
			int tabDepth = this.Rendering.TabDepth;
			jStringBuilder sb = new jStringBuilder(prettyRender, tabDepth);

			this.WithID(this.ID);

			sb.AppendTabsIf();
			if (this.Options.ShowInline) {
				sb.Append("<div");
			} else {
				this.WithAttribute("type", "text");
				sb.Append("<input");
			}
				
			this.RenderAttributes(sb);

			if (this.Options.ShowInline) 
				sb.Append("></div>");
			else 
				sb.Append(" />");

			if (this.Rendering.AutoScript) {
				this.RenderStartUpScript();
			}

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

示例5: RenderBody

		} // RenderHeader

		
		/// <summary>
		/// Writes out the opening part of the content part of the jQuery UI tab (the DIV just after the LI header)
		/// that belongs to this particular tab.  So basically this marries up the LI and the content for the LI.
		/// </summary>
		/// <param name="sb"></param>
		private void RenderBody(jStringBuilder sb) {
			bool renderCss = this.Panes.Tabs.Rendering.RenderCSS;
			bool prettyRender = this.Panes.Tabs.Rendering.PrettyRender;
			
			this.WithID(this.IDOrLocation);
			if (renderCss)
				this.WithCss("ui-tabs-panel ui-widget-content ui-corner-bottom");

			sb.IncIndent();
			sb.AppendTabsIf("<div");
			base.RenderAttributes(sb);
			sb.AppendLineIf(">");
			sb.DecIndent();
		}
开发者ID:akhuang,项目名称:Fluqi,代码行数:22,代码来源:Pane.cs

示例6: GetTagHtml

		/// <summary>
		/// Builds and returns the HTML for the opening part of the Dialog control (opening as we have
		/// to separate the closing so we can have the Dialog conten written to the response stream).
		/// </summary>
		/// <returns>Opening HTML for the dialog</returns>
		protected internal string GetTagHtml() {
			// ID property is _mandatory_
			if (string.IsNullOrEmpty(this.ID))
				throw new ArgumentException("Dialog ID property _must_ be supplied.");

			bool prettyRender = this.Rendering.PrettyRender;
			bool renderCss = this.Rendering.RenderCSS;
			int tabDepth = this.Rendering.TabDepth;
			jStringBuilder sb = new jStringBuilder(prettyRender, tabDepth);

			sb.AppendTabsIf();
			sb.Append("<div");
			this.WithID(this.ID);

			if (renderCss) 
				this.WithCss("ui-dialog-content ui-widget-content");

			this.RenderAttributes(sb);
							
			sb.Append(">"); //</div>");

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

示例7: OptionsCSharpCode

		protected string OptionsCSharpCode() {
			jStringBuilder sb = new jStringBuilder(true/*includeWhitespace*/, 2);

			if (this.Disabled) sb.AppendTabsLineIf(".SetDisabled(true)");
			if (!this.AutoOpen) sb.AppendTabsLineIf(".SetAutoOpen(false)");
			if (!this.CloseOnEscape) sb.AppendTabsLineIf(".SetCloseOnEscape(false)");
			if (!Utils.IsNullEmptyOrDefault(this.CloseText, Options.DEFAULT_CLOSE_TEXT)) sb.AppendTabsFormatLineIf(".SetCloseText(\"{0}\")", this.CloseText);
			if (!string.IsNullOrEmpty(this.DialogClass)) sb.AppendTabsFormatLineIf(".SetDialogClass(\"{0}\")", this.DialogClass);
			if (!this.Draggable) sb.AppendTabsLineIf(".SetDraggable(false)");
			if (!Utils.IsNullEmptyOrDefault(this.Height, Options.DEFAULT_HEIGHT)) {
				if (Utils.IsNumeric(this.Height))
					sb.AppendTabsFormatLineIf(".SetHeight({0})", this.Height);
				else 
					sb.AppendTabsFormatLineIf(".SetHeight(\"{0}\")", this.Height);
			}
			if (!string.IsNullOrEmpty(this.HideEffect)) sb.AppendTabsFormatLineIf(".SetHideEffect(\"{0}\")", this.HideEffect);
			if (this.MinWidth != Options.DEFAULT_MIN_WIDTH) sb.AppendTabsFormatLineIf(".SetMinWidth({0})", this.MinWidth);
			if (!Utils.IsNullEmptyOrDefault(this.MaxWidth, Options.DEFAULT_MAX_WIDTH)) {
				if (Utils.IsNumeric(this.MaxWidth))
					sb.AppendTabsFormatLineIf(".SetMaxWidth({0})", this.MaxWidth);
				else 
					sb.AppendTabsFormatLineIf(".SetMaxWidth(\"{0}\")", this.MaxWidth);
			}
			if (this.MinHeight != Options.DEFAULT_MIN_HEIGHT) sb.AppendTabsFormatLineIf(".SetMinHeight({0})", this.MinHeight);
			if (!Utils.IsNullEmptyOrDefault(this.MaxHeight, Options.DEFAULT_MAX_HEIGHT)) {
				if (Utils.IsNumeric(this.MaxHeight))
					sb.AppendTabsFormatLineIf(".SetMaxHeight({0})", this.MaxHeight);
				else 
					sb.AppendTabsFormatLineIf(".SetMaxHeight(\"{0}\")", this.MaxHeight);
			}
			if (this.Modal) sb.AppendTabsFormatLineIf(".SetModal(true)");

			if (!Utils.IsNullEmptyOrDefault(this.Position1, Options.DEFAULT_POSITION)) {
				// first one is populated, so there's something of interest here
				sb.AppendTabsIf(".SetPosition(");
				if (Utils.IsNumeric(this.Position1)) 
					sb.Append(this.Position1);
				else 
					sb.AppendFormat("\"{0}\"", this.Position1);

				if (!string.IsNullOrEmpty(this.Position2)) {
					// second one is populated too
					if (Utils.IsNumeric(this.Position2))
						sb.AppendFormat(", {0}", this.Position2);
					else 
						sb.AppendFormat(", \"{0}\"", this.Position2);
				}
					
				// and close
				sb.AppendLineIf(")");
			}

			if (!this.Resizable) sb.AppendTabsFormatLineIf(".SetResizable(false)");
			if (!string.IsNullOrEmpty(this.ShowEffect)) sb.AppendTabsFormatLineIf(".SetShowEffect(\"{0}\")", this.ShowEffect);
			if (!this.Stack) sb.AppendTabsLineIf(".SetStack(true)");
			if (!string.IsNullOrEmpty(this.Title)) sb.AppendTabsFormatLineIf(".SetTitle(\"{0}\")", this.Title);
			if (this.Width != Options.DEFAULT_WIDTH) sb.AppendTabsFormatLineIf(".SetWidth({0})", this.Width);
			if (this.ZIndex != Options.DEFAULT_ZINDEX) sb.AppendTabsFormatLineIf(".SetZIndex({0})", this.ZIndex);

			// buttons are always added in the demo
			sb.AppendTabsLineIf(".AddButton(\"OK\", \"return OKClicked();\")");
			sb.AppendTabsLineIf(".AddButton(\"Cancel\", \"return CancelClicked();\")");

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

示例8: GetTagHtml

		/// <summary>
		/// Builds up the HTML for the Button control and options (and returns the generated HTML).
		/// </summary>
		/// <returns>Generated HTML for the control.</returns>
		protected internal string GetTagHtml() {
			// ID/text properties are _mandatory_
			if (string.IsNullOrEmpty(this.ID))
				throw new ArgumentException("Button ID property _must_ be supplied.");
			if (string.IsNullOrEmpty(this.Label))
				throw new ArgumentException("Button Label property _must_ be supplied.");

			bool prettyRender = this.Rendering.PrettyRender;
			bool renderCss = this.Rendering.RenderCSS;
			int tabDepth = this.Rendering.TabDepth;
			jStringBuilder sb = new jStringBuilder(prettyRender, tabDepth);
			
			this.WithID(this.ID);
			if (renderCss) 
				this.WithCss("ui-button ui-widget ui-state-default ui-corner-all ui-button-text-only ui-state-hover");
			
			sb.AppendTabsIf();
			RenderOpeningTag(sb);

			this.RenderAttributes(sb);
			
			RenderTagContent(sb);

			RenderClosingTag(sb);			

			if (this.Rendering.AutoScript) {
				sb.AppendLineIf();
				sb.Append(this.GetStartUpScript());
			}

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


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