Hidistro.UI.Common.Controls/TemplatedWebControl.cs

(开头部分) 2KB

这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。

namespace Hidistro.UI.Common.Controls
{
    using System;
    using System.ComponentModel;
    using System.Web;
    using System.Web.UI;
    using System.Web.UI.WebControls;

    [ParseChildren(true), PersistChildren(false)]
    public abstract class TemplatedWebControl : WebControl, INamingContainer
    {
        private ITemplate _skinTemplate;
        private SmallStatusMessage smallStatus;

        protected TemplatedWebControl()
        {
        }

        protected abstract void AttachChildControls();
        protected override void CreateChildControls()
        {
            this.Controls.Clear();
            if (this.LoadSkinTemplate())
            {
                this.AttachChildControls();
            }
        }

        public override void DataBind()
        {
            this.EnsureChildControls();
        }

        public override Control FindControl(string id)
        {
            Control control = base.FindControl(id);
            if ((control == null) && (this.Controls.Count == 1))
            {
                control = this.Controls[0].FindControl(id);
            }
            return control;
        }

        protected virtual bool LoadSkinTemplate()
        {
            if (this.SkinTemplate != null)
            {
                this.SkinTemplate.InstantiateIn(this);
                return true;
            }
            return false;
        }

        public override void RenderBeginTag(HtmlTextWriter writer)
        {
        }

        public override void RenderEndTag(HtmlTextWriter writer)
        {
        }
后面还有 53 行代码,购买后查看完整代码

24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明

AI 解读 AI

登录后可用,每次 10 算力,解读结果公开显示在下面。

还没有人解读过这个文件。