Exemple #1
0
 public void File()
 {
     try
     {
         Config = ShopConfing.Read(ConfigPath).Write(ConfigPath);
     }
     catch (Exception ex)
     {
         Config = new ShopConfing();
         TShock.Log.ConsoleError("[POBC.Shop] 读取配置文件发生错误!\n{0}".SFormat(ex.ToString()));
     }
 }
Exemple #2
0
        public static void WriteExample(string file)
        {
            var Ex = new _Shop()
            {
                id     = 1,
                name   = "itemname",
                itemid = 1,
                C      = 1
            };
            var Conf = new ShopConfing()
            {
                ShopC = new _Shop[] { Ex }
            };

            Conf.Write(file);
        }