Example #1
0
 public void Load(string map)
 {
     if (cfg == null)
     {
         cfg = ConfigElement.GetAll(typeof(TWMapConfig));
     }
     ConfigElement.ParseFile(cfg, Path(map), this);
 }
Example #2
0
 public virtual void Load()
 {
     if (cfg == null)
     {
         cfg = ConfigElement.GetAll(GetType());
     }
     ConfigElement.ParseFile(cfg, PropsPath, this);
 }
 public void Load(string effectName)
 {
     if (cfg == null)
     {
         cfg = ConfigElement.GetAll(typeof(EffectConfig));
     }
     ConfigElement.ParseFile(cfg, "effects/" + effectName + ".properties", this);
 }
Example #4
0
        public void Load()
        {
            // create default config file
            if (!File.Exists(file))
            {
                Save();
            }

            if (cfg == null)
            {
                cfg = ConfigElement.GetAll(typeof(DiscordConfig));
            }
            ConfigElement.ParseFile(cfg, file, this);
        }
        public override void Load(bool startup)
        {
            if (!File.Exists(SETTINGS_FILE))
            {
                SaveDefault();
            }

            SSLConfig settings = new SSLConfig();

            ConfigElement[] cfg = ConfigElement.GetAll(typeof(SSLConfig));
            ConfigElement.ParseFile(cfg, SETTINGS_FILE, settings);

            // UGLY HACK I don't know what this file should even contain??? seems you need public and private key
            Cert = new X509Certificate2(settings.CertPath, settings.CertPath);
            INetSocket.Protocols[0x16] = ConstructSecureWebsocket;
        }
Example #6
0
        protected void LoadFrom(ConfigElement[] cfg, string propsDir, string map)
        {
            string path = propsDir + map + ".properties";

            ConfigElement.ParseFile(cfg, path, this);
        }