Пример #1
0
 public void Save()
 {
     if (cfg == null)
     {
         cfg = ConfigElement.GetAll(typeof(DiscordConfig));
     }
     ConfigElement.SerialiseSimple(cfg, file, this);
 }
Пример #2
0
 public void Save(string map)
 {
     if (cfg == null)
     {
         cfg = ConfigElement.GetAll(typeof(NOGMapConfig));
     }
     ConfigElement.SerialiseSimple(cfg, Path(map), this);
 }
Пример #3
0
 public virtual void Save()
 {
     if (cfg == null)
     {
         cfg = ConfigElement.GetAll(GetType());
     }
     ConfigElement.SerialiseSimple(cfg, PropsPath, this);
 }
Пример #4
0
 public void Save(string effectName)
 {
     if (cfg == null)
     {
         cfg = ConfigElement.GetAll(typeof(EffectConfig));
     }
     ConfigElement.SerialiseSimple(cfg, "effects/" + effectName + ".properties", this);
 }
Пример #5
0
        protected void SaveTo(ConfigElement[] cfg, string propsDir, string map)
        {
            string path = propsDir + map + ".properties";

            if (!Directory.Exists(propsDir))
            {
                Directory.CreateDirectory(propsDir);
            }
            ConfigElement.SerialiseSimple(cfg, path, this);
        }
Пример #6
0
        public void Save(string map)
        {
            if (!Directory.Exists(propsDir))
            {
                Directory.CreateDirectory(propsDir);
            }

            if (cfg == null)
            {
                cfg = ConfigElement.GetAll(typeof(TWMapConfig));
            }
            ConfigElement.SerialiseSimple(cfg, Path(map), this);
        }