/// <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; }
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); }
/// <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); }
public Engine(XConfig config) { Config = config; }
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; }