예제 #1
0
        /// <summary>
        /// Select the second object to compare.
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void objectBrowse2Button_Click(object sender, EventArgs e)
        {
            if (serverTextBox2.Text == null || serverTextBox2.Text.Length == 0)
            {
                ExceptionMessageBox emb = new ExceptionMessageBox();
                emb.Text = Properties.Resources.SecondServerMustBeSpecified;
                emb.Show(this);

                return;
            }

            if (serverChanged2)
            {
                this.serverConn2 = new ServerConnection(this.serverTextBox2.Text);
                this.serverConn2.NonPooledConnection = false;
                this.serverConn2.LoginSecure         = loginTextBox2.Text.Trim().Length
                                                       == 0 ? true : false;
                if (!this.serverConn2.LoginSecure)
                {
                    this.serverConn2.Login    = loginTextBox2.Text;
                    this.serverConn2.Password = passwordTextBox2.Text;
                }

                serverChanged2 = false;
            }

            this.objectBrowser = new SqlObjectBrowser(this.serverConn2);
            if (this.objectBrowser.Connected == true)
            {
                if (DialogResult.OK == this.objectBrowser.ShowDialog(this))
                {
                    this.urnTextBox2.Text = this.objectBrowser.Urn;
                }
            }
        }
예제 #2
0
        /// <summary>
        /// Select the second object to compare.
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void objectBrowse2Button_Click(object sender, EventArgs e)
        {
            if (serverTextBox2.Text == null || serverTextBox2.Text.Length == 0)
            {
                ExceptionMessageBox emb = new ExceptionMessageBox();
                emb.Text = Properties.Resources.SecondServerMustBeSpecified;
                emb.Show(this);

                return;
            }

            if (serverChanged2)
            {
                this.serverConn2 = new ServerConnection(this.serverTextBox2.Text);
                this.serverConn2.NonPooledConnection = false;
                this.serverConn2.LoginSecure = loginTextBox2.Text.Trim().Length
                    == 0 ? true : false;
                if (!this.serverConn2.LoginSecure)
                {
                    this.serverConn2.Login = loginTextBox2.Text;
                    this.serverConn2.Password = passwordTextBox2.Text;
                }

                serverChanged2 = false;
            }

            this.objectBrowser = new SqlObjectBrowser(this.serverConn2);
            if (this.objectBrowser.Connected == true)
            {
                if (DialogResult.OK == this.objectBrowser.ShowDialog(this))
                {
                    this.urnTextBox2.Text = this.objectBrowser.Urn;
                }
            }
        }