Ejemplo n.º 1
0
 public void Load(string map)
 {
     if (cfg == null)
     {
         cfg = ConfigElement.GetAll(typeof(TWMapConfig));
     }
     ConfigElement.ParseFile(cfg, Path(map), this);
 }
Ejemplo n.º 2
0
 public virtual void Load()
 {
     if (cfg == null)
     {
         cfg = ConfigElement.GetAll(GetType());
     }
     ConfigElement.ParseFile(cfg, PropsPath, this);
 }
Ejemplo n.º 3
0
 public void Load(string effectName)
 {
     if (cfg == null)
     {
         cfg = ConfigElement.GetAll(typeof(EffectConfig));
     }
     ConfigElement.ParseFile(cfg, "effects/" + effectName + ".properties", this);
 }
Ejemplo n.º 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);
        }
Ejemplo n.º 5
0
        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;
        }
Ejemplo n.º 6
0
        protected void LoadFrom(ConfigElement[] cfg, string propsDir, string map)
        {
            string path = propsDir + map + ".properties";

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