示例#1
0
 public static void Set(string fileName, Recipe recipe)
 {
     if (recipe != null)
     {
         ConfigTool <Recipe> SysCfg = new ConfigTool <Recipe>();
         SysCfg.WriteFile("recipe/" + fileName + ".json", recipe);
     }
 }
示例#2
0
        public static Recipe Get(string fileName)
        {
            Recipe Content;
            ConfigTool <Recipe> SysCfg = new ConfigTool <Recipe>();

            Content = SysCfg.ReadFile("recipe/" + fileName + ".json");
            return(Content);
        }
示例#3
0
 public static SystemConfig Get()
 {
     if (Content == null)
     {
         ConfigTool <SystemConfig> SysCfg = new ConfigTool <SystemConfig>();
         Content = SysCfg.ReadFile("config/SystemConfig.json");
     }
     return(Content);
 }
示例#4
0
        public void Save()
        {
            ConfigTool <SystemConfig> SysCfg = new ConfigTool <SystemConfig>();

            SysCfg.WriteFile("config/SystemConfig.json", this);
        }