Esempio n. 1
0
        public string Render()
        {
            //render panel, its cells, and all components within each cell
            var div = new Utility.DOM.Element("div");
            var htm = new StringBuilder();
            var comps = new StringBuilder();
            foreach(var cell in cells)
            {
                //render all components for a cell
                comps = new StringBuilder();
                foreach(var component in cell.components)
                {
                    comps.Append(component.Render());
                }

                //render cell
                var divcell = new Utility.DOM.Element("div");
                divcell.Classes.Add("cell cell-" + cell.id);
                divcell.innerHTML = cell.head + comps.ToString() + cell.foot;
                htm.Append(divcell.Render());
            }

            div.Classes.Add("panel-" + id + " is-panel");
            div.innerHTML = head + htm.ToString() + foot;

            return div.Render();
        }
Esempio n. 2
0
 /// <summary>
 /// Executing after creating a new instance of the Component class
 /// </summary>
 public void Initialize(Core WebsilkCore, Page page)
 {
     S = WebsilkCore;
     Page = page;
     div = new Utility.DOM.Element("div");
     scaffold = new Scaffold(S, Path + "component.html");
 }