コード例 #1
0
ファイル: frmMain.cs プロジェクト: wwzhang/JCMS-root
        private void btnOk_Click(object sender, System.EventArgs e)
        {
            bool   blnProceed = false;
            string strMessage = null;

            if (true == (txtMySQLHost.Text.Length == 0))
            {
                strMessage = "Please enter MySQL host name";
            }
            else if (true == (txtMySQLPort.Text.Length == 0))
            {
                strMessage = "Please enter MySQL port number";
            }
            else if (true == (txtMySQLUserName.Text.Length == 0))
            {
                strMessage = "Please enter MySQL user name";
            }
            else
            {
                blnProceed = true;
            }
            if (blnProceed == true)
            {
                //create the dsn
                Create_DSN();
                //setup the progress form
                frmProgress frmProgressForm = new frmProgress(txtJCMSDb.Text, txtMySQLUserName.Text, txtMySQLPwd.Text, txtMySQLPort.Text, txtMySQLHost.Text, textBoxDatabaseName.Text, chkDisable.Checked);
                frmProgressForm.Show();
                this.Hide();
            }
            else
            {
                MessageBox.Show(strMessage);
            }
        }
コード例 #2
0
ファイル: frmMain.cs プロジェクト: BethSundberg/JCMS-root
        private void btnOk_Click(object sender, System.EventArgs e)
        {
            bool blnProceed = false;
            string strMessage = null;

            if (true == (txtMySQLHost.Text.Length == 0))
            {
                    strMessage = "Please enter MySQL host name";
            }
            else if (true == (txtMySQLPort.Text.Length == 0))
            {
                    strMessage = "Please enter MySQL port number";
            }
            else if (true == (txtMySQLUserName.Text.Length == 0))
            {
                    strMessage = "Please enter MySQL user name";
            }
            else
            {
                    blnProceed = true;
            }
            if (blnProceed == true)
            {

                //create the dsn
                Create_DSN();
                //setup the progress form
                frmProgress frmProgressForm = new frmProgress(txtJCMSDb.Text, txtMySQLUserName.Text, txtMySQLPwd.Text, txtMySQLPort.Text, txtMySQLHost.Text, textBoxDatabaseName.Text, chkDisable.Checked);
                frmProgressForm.Show();
                this.Hide();
            }
            else
            {
                 MessageBox.Show(strMessage);
            }
        }