Ejemplo n.º 1
0
        private void frmDictionaryLogin_Load(object sender, EventArgs e)
        {
            for (int i = 0; i < LoadTypeAry.Length; i++)
            {
                CCBoxItem item = new CCBoxItem(LoadTypeAry[i], i);
                chkAllowType.Items.Add(item);
            }
            chkAllowType.MaxDropDownItems = 3;
            chkAllowType.DisplayMember    = @"Name";
            chkAllowType.ValueSeparator   = @",";
            chkAllowType.SetItemChecked(0, true);
            m_dt      = new DataTable();
            m_dalConn = new DbConnectDAL();
            if (this.dbType == SqlType.MySql)
            {
                label2.Text = @"端口号:";
                cboLogin.Items.Clear();
                cboLogin.Text = @"3306";
            }
            else if (this.dbType == SqlType.SqlServer)
            {
                cboLogin.SelectedIndex = 0;
            }
            BindComboBox();
            this.cboServer.SelectedIndexChanged += cboServer_SelectedIndexChanged;

            if (cboServer.Items.Count > 0)
            {
                cboServer_SelectedIndexChanged(null, null);
            }
            else
            {
                this.cboServer.Select();
            }

#if DEBUG
            btnOK_Click(null, null);
#endif
        }