private void preferencesToolStripMenuItem_Click(object sender, EventArgs e) { var f = new PreferencesForm(); f.Data = ConfigData.Preferences; var result = f.ShowDialog(); if (result == DialogResult.OK) { ConfigData.Preferences = f.Data; Config2SYS(); } }
void LoadConfig() { if (File.Exists(ConfigFile)) { string json_data = File.ReadAllText(@ConfigFile); ConfigData = json_decode(json_data); } else { ConfigData = new JObject(); } // // Preferences // if (!isset(ConfigData, "Preferences")) { PreferencesForm pform = new PreferencesForm(); pform.Data = new JObject(); pform.DefaultConfig(); ConfigData.Preferences = pform.Data; } Config2SYS(); }