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; settings.FixBrokenPolygons = fixBrokenPolygons.IsChecked.Value; SettingsPersister.Persist(settings); }
private void RestoreSettings() { var settings = new SettingsPersister().Retrieve(); if (settings != null) { geographyMode.IsChecked = settings.Geography; sridCheckBox.IsChecked = settings.SRIDEnabled; sridBox.Text = settings.SRID; userNameBox.Text = settings.Login; columnNameBox.Text = settings.ShapeColumnName; tableBox.Text = settings.TableName; KMLFileLocationBox.Text = settings.KMLFileName; serverNameBox.Text = settings.ServerName; databaseNameBox.Text = settings.DatabaseName; } }
private void RestoreSettings() { var settings = SettingsPersister.Retrieve(); if (settings != null) { geographyMode.IsChecked = settings.Geography; sridCheckBox.IsChecked = settings.SRIDEnabled; sridBox.Text = settings.SRID; userNameBox.Text = settings.Login; columnNameBox.Text = settings.ShapeColumnName; tableBox.Text = settings.TableName; KMLFileLocationBox.Text = settings.KMLFileName; serverNameBox.Text = settings.ServerName; databaseNameBox.Text = settings.DatabaseName; integratedSecurityCheckbox.IsChecked = settings.UseIntegratedSecurity; fixBrokenPolygons.IsChecked = settings.FixBrokenPolygons; } }
private void SaveSettings() { Settings settings = new Settings { DatabaseName = databaseNameBox.Text, ServerName = serverNameBox.Text, KMLFileName = KMLFileLocationBox.Text, TableName = tableBox.Text, ShapeColumnName = columnNameBox.Text, Login = userNameBox.Text, SRID = sridBox.Text, SRIDEnabled = sridCheckBox.IsChecked.Value, Geography = geographyMode.IsChecked.Value, UseIntegratedSecurity = integratedSecurityCheckbox.IsChecked.Value, FixBrokenPolygons = fixBrokenPolygons.IsChecked.Value }; SettingsPersister.Persist(settings); }
private void RestoreSettings() { var settings = new SettingsPersister().Retrieve(); if (settings != null) { geographyMode.IsChecked = settings.Geography; sridCheckBox.IsChecked = settings.SRIDEnabled; sridBox.Text = settings.SRID; userNameBox.Text = settings.Login; columnNameBox.Text = settings.ShapeColumnName; tableBox.Text = settings.TableName; KMLFileLocationBox.Text = settings.KMLFileName; serverNameBox.Text = settings.ServerName; databaseNameBox.Text = settings.DatabaseName; integratedSecurityCheckbox.IsChecked = settings.UseIntegratedSecurity; } }