예제 #1
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!this.Page.IsPostBack)
     {
         SiteConfigInfo info = SiteConfig.ConfigInfo();
         this.ViewState["siteConfigInfo"] = info;
         string str = HttpContext.Current.Request.PhysicalApplicationPath + SiteConfig.SiteOption.TemplateDir;
         foreach (FrontTemplate template in info.FrontTemplateList)
         {
             TemplateSelectControl control = (TemplateSelectControl)((ContentPlaceHolder)base.Master.FindControl("CphContent")).FindControl("Template" + template.Key);
             if (control != null)
             {
                 control.Text = template.Value;
                 if (!string.IsNullOrEmpty(template.Value) && !File.Exists(str + template.Value))
                 {
                     Label label = (Label)((ContentPlaceHolder)base.Master.FindControl("CphContent")).FindControl("Label" + template.Key);
                     if (label != null)
                     {
                         label.Text = "当前指定的模板页不存在!";
                     }
                 }
             }
         }
         if (!SiteConfig.ConfigInfo().SiteOption.EnablePointMoneyExp)
         {
             this.TabTitle4.Style.Add("display", "none");
         }
     }
 }
예제 #2
0
        private void DoControl(Control c)
        {
            TemplateSelectControl control = c as TemplateSelectControl;

            if (control != null)
            {
                this.m_InfoList.Add(this.SetInfoValue(control.ID.ToString().Replace("Template", ""), control.Text));
            }
            foreach (Control control2 in c.Controls)
            {
                this.DoControl(control2);
            }
        }