Exemplo n.º 1
0
 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;
 }
Exemplo n.º 2
0
 public static void Save(Conf conf, string file)
 {
     string json = JsonConvert.SerializeObject(conf);
     File.WriteAllText(file, json);
 }