private Conf loadConfFromUI() { Conf conf = new Conf(); conf.ConnectionString = edtCN.Text; conf.DALPath = edtDALPath.Text; conf.Schema = edtSchema.Text; conf.UseCSNaming = chkUseCSNaming.Checked; conf.ServiceUrl = edtServiceUrl.Text; conf.ProxyLocation = edtProxyLocation.Text; conf.Platform = cmbLanguage.SelectedItem == null? null: ((PlatformInfo)cmbLanguage.SelectedItem).Id; return conf; }
public static void Save(Conf conf, string file) { string json = JsonConvert.SerializeObject(conf); File.WriteAllText(file, json); }