public void LoadSettings(string path) { string jsondata = string.Empty; jsondata = File.ReadAllText(path); Settings = JsonConvert.DeserializeObject<Setting>(jsondata); this.txtBoxDota2Folder.Text = Settings.DotaPath; this.checkDragDrop.Checked = Settings.DragAndDrop; this.checkDotaFolder.Checked = Settings.SaveInDota; this.checkBox1.Checked = Settings.DotaPathOverride; }
public static void LoadSettings(string path, object n = null) { string jsondata = string.Empty; jsondata = File.ReadAllText(path); Settings = JsonConvert.DeserializeObject<Setting>(jsondata); }