Beispiel #1
0
 private void ConnectServer_Load(object sender, System.EventArgs e)
 {
     this.serverName.Text = RegisterAccess.ReadKey("serverName");
     this.dataBase.Text   = RegisterAccess.ReadKey("dataBase");
     this.userID.Text     = RegisterAccess.ReadKey("userID");
     this.passWord.Text   = RegisterAccess.ReadKey("passWord");
     this.port.Text       = RegisterAccess.ReadKey("port");
     if (this.port.Text.Trim() == "")
     {
         this.port.Text = "3306";
     }
     if (RegisterAccess.ReadKey("DBType").Equals("SQLSERVER2005"))
     {
         rdbSQL2005.Checked = true;
         rdbSql2000.Checked = false;
         rdbMySQL.Checked   = false;
         rdbOracle.Checked  = false;
     }
     else if (RegisterAccess.ReadKey("DBType").Equals("SQLSERVER2000"))
     {
         rdbSQL2005.Checked = false;
         rdbSql2000.Checked = true;
         rdbMySQL.Checked   = false;
         rdbOracle.Checked  = false;
     }
     else if (RegisterAccess.ReadKey("DBType").Equals("MYSQL"))
     {
         rdbSQL2005.Checked = false;
         rdbSql2000.Checked = false;
         rdbMySQL.Checked   = true;
         rdbOracle.Checked  = false;
     }
     else if (RegisterAccess.ReadKey("DBType").Equals("ORACLE11G"))
     {
         rdbSQL2005.Checked = false;
         rdbSql2000.Checked = false;
         rdbMySQL.Checked   = false;
         rdbOracle.Checked  = true;
     }
 }
Beispiel #2
0
 /// <summary>
 /// 从注册表读取信息 天如窗口中
 /// </summary>
 private void FillForm()
 {
     this.corpName.Text = RegisterAccess.ReadKey("corpName");
     this.userName.Text = RegisterAccess.ReadKey("userName");
     this.eMail.Text    = RegisterAccess.ReadKey("email");
 }