private void login_Click(object sender, System.EventArgs e) { string uid; bool RememberMe = this.checkBox1.Checked; if (this.comboBox1.SelectedText == "") { uid = this.comboBox1.Text; } else { uid = this.comboBox1.SelectedText; } string pwd = this.textBox2.Text; if (!Regx.isNull(uid) || !Regx.isNull(pwd)) { MessageBox.Show("请输入用户名或密码!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information); } else { if (Regx.isNumber(uid)) { UserInf.AddUser(uid, pwd, RememberMe); this.Visible = false; main Q_main = new main(uid, pwd); ShareDate.MainFormHand = Q_main.Handle.ToInt32(); Q_main.Show(); } else { MessageBox.Show("请输入合法的QQ号码!", "错误", MessageBoxButtons.OK, MessageBoxIcon.Information); } } }