Exemple #1
0
        /// <summary>初始化界面</summary>
        /// <param name="xconfig"></param>
        /// <returns></returns>
        public static FrmItems Create(XConfig xconfig)
        {
            FrmItems item = new FrmItems();

            if (xconfig == null) throw new Exception("配置信息异常");

            item.XConfig = xconfig;

            if (xconfig.Items == null) item.CreatDic();
            else
                item.Dic = xconfig.Items;

            return item;
        }
Exemple #2
0
        static XConfig Create()
        {
            XConfig config = new XConfig();

            StringBuilder sb = new StringBuilder();

            sb.AppendLine("/*");
            sb.AppendLine(" * XCoder v<#=Version#>");
            sb.AppendLine(" * 作者:<#=Environment.UserName + \"/\" + Environment.MachineName#>");
            sb.AppendLine(" * 时间:<#=DateTime.Now.ToString(\"yyyy-MM-dd HH:mm:ss\")#>");
            sb.AppendLine(" * 版权:版权所有 (C) 新生命开发团队 <#=DateTime.Now.ToString(\"yyyy\")#>");
            sb.AppendLine("*/");
            config.HeadTemplate = sb.ToString();


            return(config);
        }
Exemple #3
0
        /// <summary>初始化界面</summary>
        /// <param name="xconfig"></param>
        /// <returns></returns>
        public static FrmItems Create(XConfig xconfig)
        {
            FrmItems item = new FrmItems();

            if (xconfig == null)
            {
                throw new Exception("配置信息异常");
            }

            item.XConfig = xconfig;

            if (xconfig.Items == null)
            {
                item.CreatDic();
            }
            else
            {
                item.Dic = xconfig.Items;
            }

            return(item);
        }
Exemple #4
0
 public Engine(XConfig config)
 {
     Config = config;
 }
Exemple #5
0
        static XConfig Create()
        {
            XConfig config = new XConfig();

            StringBuilder sb = new StringBuilder();
            sb.AppendLine("/*");
            sb.AppendLine(" * XCoder v<#=Version#>");
            sb.AppendLine(" * 作者:<#=Environment.UserName + \"/\" + Environment.MachineName#>");
            sb.AppendLine(" * 时间:<#=DateTime.Now.ToString(\"yyyy-MM-dd HH:mm:ss\")#>");
            sb.AppendLine(" * 版权:版权所有 (C) 新生命开发团队 <#=DateTime.Now.ToString(\"yyyy\")#>");
            sb.AppendLine("*/");
            config.HeadTemplate = sb.ToString();


            return config;
        }
Exemple #6
0
 public Engine(XConfig config)
 {
     Config = config;
 }