Beispiel #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);
     }
 }
Beispiel #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);
            }
        }
Beispiel #3
0
 public static void Save(MysqlSettings instance)
 {
     string settingFile = GetSettingFile();
     DataContractSerializationHelper.Serialize(instance, settingFile);
 }
Beispiel #4
0
        public static void Save(MysqlSettings instance)
        {
            string settingFile = GetSettingFile();

            DataContractSerializationHelper.Serialize(instance, settingFile);
        }