예제 #1
0
 /// <summary>
 /// 序列化配置信息为XML
 /// </summary>
 /// <param name="configinfo">配置信息</param>
 /// <param name="configFilePath">配置文件完整路径</param>
 public static void Save(BaseConfigInfo configinfo)
 {
     lock (lockHelper)
     {
         SerializationHelper.SaveXml(configinfo, configpath);
     }
 }
예제 #2
0
 /// <summary>
 /// 静态构造函数初始化相应实例和定时器
 /// </summary>
 static BaseConfigs()
 {
     if (m_configinfo == null)
     {
         m_configinfo = Load();
     }
 }
예제 #3
0
 protected void Button1_Click(object sender, EventArgs e)
 {
     BaseConfigInfo info = new BaseConfigInfo();
     info.Dbconnectstring = @"Data Source=F:\Doctments\Works\Mine\iTCAWeb\trunk\LiteCMS.Web\config\db.config";
     info.Dbtype = "Sqlite";
     info.Tableprefix = "wy_";
     info.ApplictionPath = "/";
     BaseConfigs.Save(info);
 }
예제 #4
0
 /// <summary>
 /// 重设配置类实例
 /// </summary>
 public static void ResetConfig()
 {
     m_configinfo = Load();
 }
예제 #5
0
 /// <summary>
 /// 重设配置类实例
 /// </summary>
 public static void ResetConfig()
 {
     m_configinfo = Load();
 }