Example #1
0
        public void LoadSettings()
        {
            PropertiesFile props = new PropertiesFile(AppDomain.CurrentDomain.BaseDirectory + "properties.properties");

            Host = props.get("Host", "127.0.0.1");
            Port = int.Parse(props.get("Port", "25565"));
        }
Example #2
0
        public void SaveSettings()
        {
            PropertiesFile props = new PropertiesFile(AppDomain.CurrentDomain.BaseDirectory + "properties.properties");

            props.set("Host", Host);
            props.set("Port", Port.ToString());
            props.Save();
        }