public static SystemConfig Get()
 {
     if (Content == null)
     {
         ConfigTool <SystemConfig> SysCfg = new ConfigTool <SystemConfig>();
         Content = SysCfg.ReadFile("config/SystemConfig.json");
     }
     return(Content);
 }
Beispiel #2
0
 public static void Set(string fileName, Recipe recipe)
 {
     if (recipe != null)
     {
         ConfigTool <Recipe> SysCfg = new ConfigTool <Recipe>();
         SysCfg.WriteFile("recipe/" + fileName + ".json", recipe);
         tmp.Remove(fileName);
         tmp.Add(fileName, (Recipe)recipe.MemberwiseClone());
     }
 }
Beispiel #3
0
        public void Reload()
        {
            Recipe Content;

            tmp.Remove(this.recipe_id);

            ConfigTool <Recipe> SysCfg = new ConfigTool <Recipe>();

            Content = SysCfg.ReadFile("recipe/" + this.recipe_id + ".json");
            if (Content != null)
            {
                //Content.is_use_burnin = false;
                tmp.Add(this.recipe_id, Content);
            }
        }
Beispiel #4
0
        public static Recipe Get(string fileName)
        {
            Recipe Content;

            if (!tmp.TryGetValue(fileName, out Content))
            {
                ConfigTool <Recipe> SysCfg = new ConfigTool <Recipe>();
                Content = SysCfg.ReadFile("recipe/" + fileName + ".json");
                if (Content != null)
                {
                    //Content.is_use_burnin = false;
                    tmp.Add(fileName, Content);
                }
            }
            return(Content);
        }
        public void Save()
        {
            ConfigTool <SystemConfig> SysCfg = new ConfigTool <SystemConfig>();

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