private void btnlogin_Click(object sender, EventArgs e) { int state = qq.loginQQ(txtpwd.Text.Trim(), txtVerify.Text.Trim(), out string nick); switch (state) { case 1: MessageBox.Show("登录成功!欢迎你:" + nick, "恭喜!"); break; case 2: MessageBox.Show("账号或密码错误!", "提示:"); txtuser_Leave(null, null); break; case 3: MessageBox.Show("验证码错误!", "提示:"); pic_verify.Image = qq.getCapture(); break; default: MessageBox.Show("出现致命错误!导致无法正常访问!", "提示:"); break; } }