protected override void RenderContents(HtmlTextWriter output) { string sJQFile = ""; output.WriteLine(); if (!this.StylesheetOnly) { _jq.JQVersion = this.JQVersion; _jq.UseJqueryMigrate = this.UseJqueryMigrate; //j2.JQUIVersion = this.JQUIVersion; _jq.RenderControl(output); _jqui.RenderControl(output); } sJQFile = ""; switch (this.SelectedSkin) { case jQueryTheme.GlossyBlack: sJQFile = GetWebResourceUrl("Carrotware.Web.UI.Controls.jquerybasic.jquery-ui-black.css"); break; case jQueryTheme.Purple: sJQFile = GetWebResourceUrl("Carrotware.Web.UI.Controls.jquerybasic.jquery-ui-purple.css"); break; case jQueryTheme.Green: sJQFile = GetWebResourceUrl("Carrotware.Web.UI.Controls.jquerybasic.jquery-ui-green.css"); break; case jQueryTheme.Blue: sJQFile = GetWebResourceUrl("Carrotware.Web.UI.Controls.jquerybasic.jquery-ui-blue.css"); break; case jQueryTheme.LightGreen: sJQFile = GetWebResourceUrl("Carrotware.Web.UI.Controls.jquerybasic.jquery-ui-lightgreen.css"); break; case jQueryTheme.Silver: default: sJQFile = GetWebResourceUrl("Carrotware.Web.UI.Controls.jquerybasic.jquery-ui-silver.css"); break; } if (this.SelectedSkin != jQueryTheme.NotUsed) { output.Write("<!-- JQuery UI CSS " + SelectedSkin.ToString() + " --> <link href=\"" + sJQFile + "\" type=\"text/css\" rel=\"stylesheet\" /> \r\n"); } }
public override string GetHtml() { string sJQFile = String.Empty; StringBuilder sb = new StringBuilder(); sb.AppendLine(String.Empty); if (!this.StylesheetOnly) { _jq.JQVersion = this.JQVersion; _jq.UseJqueryMigrate = this.UseJqueryMigrate; sb.AppendLine(_jq.GetHtml().Trim()); sb.AppendLine(_jqui.GetHtml().Trim()); } switch (this.SelectedSkin) { case jQueryTheme.GlossyBlack: sJQFile = GetWebResourceUrl("Carrotware.Web.UI.Components.jquerybasic.jquery-ui-black.css"); break; case jQueryTheme.Purple: sJQFile = GetWebResourceUrl("Carrotware.Web.UI.Components.jquerybasic.jquery-ui-purple.css"); break; case jQueryTheme.Green: sJQFile = GetWebResourceUrl("Carrotware.Web.UI.Components.jquerybasic.jquery-ui-green.css"); break; case jQueryTheme.Blue: sJQFile = GetWebResourceUrl("Carrotware.Web.UI.Components.jquerybasic.jquery-ui-blue.css"); break; case jQueryTheme.LightGreen: sJQFile = GetWebResourceUrl("Carrotware.Web.UI.Components.jquerybasic.jquery-ui-lightgreen.css"); break; case jQueryTheme.Silver: default: sJQFile = GetWebResourceUrl("Carrotware.Web.UI.Components.jquerybasic.jquery-ui-silver.css"); break; } if (this.SelectedSkin != jQueryTheme.NotUsed) { sb.AppendLine("<!-- JQuery UI CSS " + SelectedSkin.ToString() + " --> <link href=\"" + sJQFile + "\" type=\"text/css\" rel=\"stylesheet\" /> \r\n"); } return(sb.ToString().Trim()); }