Example #1
0
        private void LoadTemplate(hitbl_WidgetTemplates_WTP template)
        {
            RcbTemplates.SelectedValue = template.WTP_ID.ToString();

            string styleRules = ".widget .top { } .widget .cnt { } .widget .cnt a { } .widget .bottom { }";

            if (!string.IsNullOrEmpty(template.WTP_XMLTemplate))
            {
                _4screen.CSB.DataAccess.Business.StyleSettingsWidget styleSettingsWidget = DataAccess.Business.StyleSettingsWidget.ParseXml(template.WTP_XMLTemplate);

                var           panelItems  = this.Rpb.GetAllItems();
                StyleSettings headerStyle = (StyleSettings)panelItems.ToList().Find(x => x.Value == "Header").FindControl("SP");
                headerStyle.SetStyleSettings(styleSettingsWidget.Header);

                StyleSettings contentStyle = (StyleSettings)panelItems.ToList().Find(x => x.Value == "Content").FindControl("SP");
                contentStyle.SetStyleSettings(styleSettingsWidget.Content);

                StyleSettings footerStyle = (StyleSettings)panelItems.ToList().Find(x => x.Value == "Footer").FindControl("SP");
                footerStyle.SetStyleSettings(styleSettingsWidget.Footer);

                TextBox customStyle = (TextBox)panelItems.ToList().Find(x => x.Value == "CustomStyle").FindControl("TxtStyle");
                customStyle.Text = styleSettingsWidget.CustomStyle;

                styleRules = styleSettingsWidget.CustomStyle;
            }

            this.LitStyles.Text = "<style type=\"text/css\" title=\"styles\">" + styleRules + "</style>";
        }
Example #2
0
        private _4screen.CSB.DataAccess.Business.StyleSettingsWidget GetStyleSettings()
        {
            _4screen.CSB.DataAccess.Business.StyleSettingsWidget styleSettingsWidget = new DataAccess.Business.StyleSettingsWidget();

            var           panelItems  = this.Rpb.GetAllItems();
            StyleSettings headerStyle = (StyleSettings)panelItems.ToList().Find(x => x.Value == "Header").FindControl("SP");

            styleSettingsWidget.Header = headerStyle.GetStyleSettings();

            StyleSettings contentStyle = (StyleSettings)panelItems.ToList().Find(x => x.Value == "Content").FindControl("SP");

            styleSettingsWidget.Content = contentStyle.GetStyleSettings();

            StyleSettings footerStyle = (StyleSettings)panelItems.ToList().Find(x => x.Value == "Footer").FindControl("SP");

            styleSettingsWidget.Footer = footerStyle.GetStyleSettings();

            TextBox customStyle = (TextBox)panelItems.ToList().Find(x => x.Value == "CustomStyle").FindControl("TxtStyle");

            styleSettingsWidget.CustomStyle = customStyle.Text;

            return(styleSettingsWidget);
        }