示例#1
0
文件: Form1.cs 项目: cd547/Mysqldb1
        public bool test()
        {
            mysql_Db = new Mysql_db(this.Server_TxtBox.Text, this.Uid_TxtBox.Text, this.PWD_TxtBox.Text, "db");
            string testans = mysql_Db.Test_Conn();

            if (testans != "Open")
            {
                //  testans = "连接失败!";
                this.TestConnect_label.ForeColor = Color.Red;
                return(false);
            }
            else
            {
                //  testans = "连接成功!";
                this.TestConnect_label.ForeColor = Color.Green;
                return(true);
            }
        }
示例#2
0
文件: 项目.cs 项目: cd547/Mysqldb1
 public 项目(Mysql_db mysql_Db)
 {
     this.mysql_Db = mysql_Db;
 }
示例#3
0
文件: AddForm.cs 项目: cd547/Mysqldb1
 public AddForm(string server, string uid, string pwd, string db)
 {
     InitializeComponent();
     mysql_Db = new Mysql_db(server, uid, pwd, db);
 }