Esempio n. 1
0
 static MysqlSettings()
 {
     string settingFile = GetSettingFile();
     if (File.Exists(settingFile))
     {
         instance = DataContractSerializationHelper.Deserialize<MysqlSettings>(settingFile);
     }
     else
     {
         instance = new MysqlSettings()
         {
             DEFAULT_CHARSET = "utf8",
             ConnectionString = "Server=127.0.0.1;Database=Kooboo_CMS;Uid=root;Pwd=;"
         };
         Save(instance);
     }
 }
Esempio n. 2
0
        static MysqlSettings()
        {
            string settingFile = GetSettingFile();

            if (File.Exists(settingFile))
            {
                instance = DataContractSerializationHelper.Deserialize <MysqlSettings>(settingFile);
            }
            else
            {
                instance = new MysqlSettings()
                {
                    DEFAULT_CHARSET  = "utf8",
                    ConnectionString = "Server=127.0.0.1;Database=Kooboo_CMS;Uid=root;Pwd=;"
                };
                Save(instance);
            }
        }
Esempio n. 3
0
 public static void Save(MysqlSettings instance)
 {
     string settingFile = GetSettingFile();
     DataContractSerializationHelper.Serialize(instance, settingFile);
 }
Esempio n. 4
0
        public static void Save(MysqlSettings instance)
        {
            string settingFile = GetSettingFile();

            DataContractSerializationHelper.Serialize(instance, settingFile);
        }