Hidistro.UI.Common.Controls/VshopTemplatedRepeater.cs

(完整代码) 1KB

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

    public class VshopTemplatedRepeater : Repeater
    {
        private string skinName = string.Empty;

        protected override void CreateChildControls()
        {
            if ((this.ItemTemplate == null) && !string.IsNullOrEmpty(this.TemplateFile))
            {
                this.ItemTemplate = this.Page.LoadTemplate(this.TemplateFile);
            }
        }

        public string TemplateFile
        {
            get
            {
                if (!string.IsNullOrEmpty(this.skinName) && !Utils.IsUrlAbsolute(this.skinName.ToLower()))
                {
                    return (Utils.ApplicationPath + this.skinName);
                }
                return this.skinName;
            }
            set
            {
                if (!string.IsNullOrEmpty(value))
                {
                    if (value.StartsWith("/"))
                    {
                        this.skinName = Globals.GetVshopSkinPath(null) + value;
                    }
                    else
                    {
                        this.skinName = Globals.GetVshopSkinPath(null) + "/" + value;
                    }
                }
                if (!this.skinName.StartsWith("/templates"))
                {
                    this.skinName = this.skinName.Substring(this.skinName.IndexOf("/templates"));
                }
            }
        }
    }
}

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

AI 解读 AI

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

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