public ConnectionWizardDialog()
        {
            InitializeComponent();

            // Add any initialization after the InitializeComponent() call.
            cp = new SqlConnectionProperties();
            cp["Timeout"] = 10;
            cp.Remove("User Instance");
            uic.Initialize(cp);
        }
Exemple #2
0
    ///////////////////////////////////////////////////////////////////////////////
    // Construction and Initializing methods                                     //
    ///////////////////////////////////////////////////////////////////////////////
    #region CONSTRUCTION

    /// <summary>
    /// Initializes a new instance of the SQLConnectionDialog class.
    /// </summary>
    public SQLConnectionDialog()
    {
      this.InitializeComponent();
      this.connectionProperties = new SqlConnectionProperties();
      this.sqlConnectionUIControl.Initialize(this.connectionProperties);
    }
Exemple #3
0
 /// <summary>
 /// The <see cref="Control.Click"/> event handler for the
 /// <see cref="Button"/> <see cref="btnAdvanced"/>.
 /// Opens a property dialog for the <see cref="SqlConnectionProperties"/>.
 /// </summary>
 /// <param name="sender">Source of the event.</param>
 /// <param name="e">An empty <see cref="EventArgs"/></param>
 private void btnAdvanced_Click(object sender, EventArgs e)
 {
   PropertyDialog dialog = new PropertyDialog();
   dialog.SelectedObject = this.connectionProperties;
   if (dialog.ShowDialog() == DialogResult.OK)
   {
     this.connectionProperties = (SqlConnectionProperties)dialog.SelectedObject;
   }
 }