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