예제 #1
0
 private void SaveSettings()
 {
     var settings = new Settings();
     settings.DatabaseName = databaseNameBox.Text;
     settings.ServerName = serverNameBox.Text;
     settings.KMLFileName = KMLFileLocationBox.Text;
     settings.TableName = tableBox.Text;
     settings.ShapeColumnName = columnNameBox.Text;
     settings.Login = userNameBox.Text;
     settings.SRID = sridBox.Text;
     settings.SRIDEnabled = sridCheckBox.IsChecked.Value;
     settings.Geography = geographyMode.IsChecked.Value;
     settings.UseIntegratedSecurity = integratedSecurityCheckbox.IsChecked.Value;
     new SettingsPersister().Persist(settings);
 }
예제 #2
0
 public void Persist(Settings settings)
 {
     var settingsText = Newtonsoft.Json.JsonConvert.SerializeObject(settings);
     File.WriteAllText(FileName, settingsText);
 }