示例#1
0
文件: Page.cs 项目: andrewmaia/Atomo
        protected override void OnInit(EventArgs e)
        {
            base.OnInit(e);

            if (Master != null)
            {
                System.Web.UI.MasterPage master = Master;

                while (master.Master != null)
                {
                    master = master.Master;
                }

                if (!(master is Atomo.Web.MasterPage))
                {
                    throw new Exception("A Master Page tem que herdar de Atomo.Web.MasterPage!");
                }

                this.jsContainer  = ((Atomo.Web.MasterPage)master).JsContainer;
                this.cssContainer = ((Atomo.Web.MasterPage)master).CssContainer;
            }
            else
            {
                this.jsContainer  = new JsContainer();
                this.cssContainer = new CssContainer();
            }

            this.Create();
        }
示例#2
0
 public PageBuilder(ControlCollection controlCollection, CssContainer cssContainer, JsContainer jsContainer)
 {
     this.controlCollection = controlCollection;
     this.cssContainer      = cssContainer;
     this.jsContainer       = jsContainer;
 }