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")); WindowId = int.Parse(props.get("WindowId", "0")); }
public void SaveSettings() { PropertiesFile props = new PropertiesFile(AppDomain.CurrentDomain.BaseDirectory + "properties.properties"); props.set("Host", Host); props.set("Port", Port.ToString()); props.set("WindowId", WindowId.ToString()); props.Save(); }