Exemple #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;
            settings.FixBrokenPolygons     = fixBrokenPolygons.IsChecked.Value;
            SettingsPersister.Persist(settings);
        }
Exemple #2
0
        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;
            }
        }
Exemple #3
0
        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;
            }
        }
Exemple #4
0
        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);
        }
Exemple #5
0
 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;
     }
 }