Exemplo n.º 1
0
        public static void Parse(string configFile)
        {
            using (var stream = new System.IO.FileStream(configFile, System.IO.FileMode.OpenOrCreate))
            {
                config = IniStreamConfigurationProvider.Read(stream);
            }

            Utils.Debug("Loading config...");

            Server  = ReadConfigString("remoterecord:serveraddress");
            API_key = ReadConfigString("remoterecord:apikey");

            UpdateFiles  = ReadConfigBoolean("update:updatefiles");
            UpdateServer = ReadConfigString("update:updateserver");

            Save_remote = ReadConfigBoolean("record:saveremote");
            Save_local  = ReadConfigBoolean("record:savelocal");
            Save_json   = ReadConfigBoolean("record:savejson");

            header.songInfo      = ReadConfigBoolean("localrecord:songinfo");
            header.chartDetails  = ReadConfigBoolean("localrecord:chartdetails");
            header.resultDetails = ReadConfigBoolean("localrecord:resultdetails");
            header.judge         = ReadConfigBoolean("localrecord:judge");
            header.settings      = ReadConfigBoolean("localrecord:settings");

            Stream_Playstate = ReadConfigBoolean("livestream:showplaystate");
            Stream_Marquee   = ReadConfigBoolean("livestream:enablemarquee");
            MarqueeIdleText  = ReadConfigString("livestream:marqueeidletext");

            Output_songlist = ReadConfigBoolean("debug:outputdb");
            Utils.Debug("Done\n");
        }
Exemplo n.º 2
0
        public IDictionary <string, string> Parse(string input)
        {
            using var stream = new MemoryStream();
            using var writer = new StreamWriter(stream);
            writer.Write(input);
            writer.Flush();
            stream.Position = 0;

            return(IniStreamConfigurationProvider.Read(stream));
        }