Exemple #1
0
        public virtual void Save()
        {
            if (cfg == null)
            {
                cfg = ConfigElement.GetAll(GetType());
            }

            using (StreamWriter w = new StreamWriter(PropsPath)) {
                w.WriteLine("#" + GameName + " configuration");
                ConfigElement.SerialiseElements(cfg, w, this);
            }
        }
Exemple #2
0
        public void Save()
        {
            if (cfg == null)
            {
                cfg = ConfigElement.GetAll(typeof(DiscordConfig));
            }

            using (StreamWriter w = new StreamWriter(PROPS_PATH)) {
                w.WriteLine("# Discord relay bot configuration");
                w.WriteLine("# See " + Updater.SourceURL + "/wiki/Discord-relay-bot/");
                w.WriteLine();
                ConfigElement.SerialiseElements(cfg, w, this);
            }
        }