public void LoadFromPanelView(PanelView pv) { Name = pv.Name; isPartOfTheme = pv.isPartOfTheme; Components = pv.Components; PageId = pv.PageId; }
public string Render() { string htm = ""; inner.ID = "inner"; inner.Classes.Add("inner-panel inner" + ID); if (Width > 0) { inner.Style.Add("width", Width.ToString() + "px"); } if (Height > 0) { inner.Style.Add("height", Height.ToString() + "px"); } inner.Attributes.Add("resizeh", HeightType.ToString()); inner.Attributes.Add("resize", ResizeType.ToString()); if (Overflow == true) { inner.Style.Add("overflow", "hidden"); } List <string> comps = new List <string>(); for (int x = 0; x < Components.Count; x++) { comps.Add(Components[x].Render()); } inner.innerHTML = InnerHead + (isEmpty == true ? "" : string.Join("\n", comps.ToArray())) + InnerFoot; htm = StackHead + "<div id=\"" + ID + "\" class=\"panel" + Name + " ispanel" + (isPartOfTheme == true ? " istheme" : "") + "\">" + DesignHead + inner.Render() + DesignFoot + "</div>" + StackFoot; PanelView pv = GetPanelView(); bool addpv = true; if (R.Page.PanelViews.Count > 0) { foreach (PanelView p in R.Page.PanelViews) { if (p.ClassName == pv.ClassName) { addpv = false; break; } } } if (addpv == true) { R.Page.PanelViews.Add(pv); } return(htm); }
public PanelView GetPanelView() { PanelView pv = new PanelView(); pv.Name = Name; pv.ClassName = inner.ID; pv.isPartOfTheme = isPartOfTheme; pv.Components = Components; pv.PageId = PageId; pv.Height = Height; return(pv); }
public PanelView GetPanelView() { PanelView pv = new PanelView(); pv.Name = Name; pv.ClassName = inner.ID; pv.isPartOfTheme = isPartOfTheme; pv.Components = Components; pv.PageId = PageId; pv.Height = Height; return pv; }