void OnConfigureConnectionStringSettings(object sender, EventArgs notUsed)
        {
            DbConfigurationMode configMode = (CreateNewDbRadioButton.Checked) ? DbConfigurationMode.Create : DbConfigurationMode.Configure;

            Button senderButton = (Button)sender;

            if (senderButton == buttonCreateOptions)
            {
                configMode = DbConfigurationMode.Create;
            }


            using (ConnectionConfigurationDlg config = new ConnectionConfigurationDlg( ))
            {
                ConfigurationOptions     configuration = (ConfigurationOptions)senderButton.Tag;
                ConnectionStringSettings connectionSettings;

                connectionSettings = GetConnectionConfiguration(configuration);

                config.connectionConfigurationControl.DefaultSqlCeDatabaseName     = Path.ChangeExtension(Path.Combine(GetFolderPath( ), configuration.DefaultDatabaseName), "sdf");
                config.connectionConfigurationControl.DefaultSqlServerDatabaseName = configuration.DefaultDatabaseName;
                config.Title = GetDatabaseConfigHeaderMessage(configuration, configMode);

                if (!string.IsNullOrEmpty(connectionSettings.ConnectionString))
                {
                    config.connectionConfigurationControl.SetConnectionString(connectionSettings.ConnectionString, connectionSettings.ProviderName);
                }
                else
                {
                    // config.connectionConfigurationControl.ClearConnectionString ( ) ;
                    string connectionString;
                    if (DefaultSqlConnectionStringBuilder == null)
                    {
                        connectionString = GetSqlCEDatabaseConnection(configuration.DefaultDatabaseName);
                        config.connectionConfigurationControl.SetConnectionString(connectionString, ConnectionProviders.SqlCeProvider.Name);
                    }
                    else
                    {
                        connectionString = GetLocalSqlDefaultConnectionString(DefaultSqlConnectionStringBuilder, configuration.DefaultDatabaseName);
                        config.connectionConfigurationControl.SetConnectionString(connectionString, ConnectionProviders.SqlServerProvider.Name);
                    }
                }

                config.connectionConfigurationControl.Mode = configMode;

                if (DialogResult.OK == config.ShowDialog(this))
                {
                    connectionSettings.ConnectionString = config.connectionConfigurationControl.ConnectionString;
                    connectionSettings.ProviderName     = config.connectionConfigurationControl.DataProvider;
                    configuration.ConnectionSettings    = connectionSettings;
                    string configText = config.connectionConfigurationControl.ConnectionString.MaskPassword();
                    SetLabelText(configuration.ConfigurationLabel, configText);
                }
            }
        }
 public static void ChooseDefaultSqlServer()
 {
     using (ConnectionConfigurationDlg config = new ConnectionConfigurationDlg())
     {
     }
 }