Exemplo n.º 1
0
        public void Login(string verifyCode)
        {
            Console.WriteLine("正在登录:{0},{1},{2},{3}", QQ, Password, verifyCode, CFun.Status.online);
            int ret = cw.Login(QQ, Password, verifyCode, CFun.Status.online);

            switch (ret)
            {
            case 0:
                Console.WriteLine("登录成功");
                LoadGroupName();
                break;

            case 1:
                Console.WriteLine("密码错误");
                break;

            case 2:
                Console.WriteLine("验证码错误");
                ShowVCImage(QQ);
                break;

            default:
                Console.WriteLine("输入有误");
                break;
            }
        }
Exemplo n.º 2
0
    public Model.JsonResult login(string QQnumber, string password, string verifyCode, string status)
    {
        getSession();
        //登陆QQ

        /**
         *
         * -1:输入账号位数或密码位数错误。0:登陆成功1:账号或密码错误2:验证码错误3:未知的失败
         *
         * */
        int    ret    = cw.Login(QQnumber, password, verifyCode, status, false);
        string result = "";

        switch (ret)
        {
        case -1: result = "输入账号位数或密码位数错误"; break;

        case 0: result = "登陆成功"; break;

        case 1: result = "账号或密码错误"; break;

        case 2: result = "验证码错误"; break;

        default: result = "未知错误"; break;
        }

        return(new Model.JsonResult()
        {
            retcode = ret,
            result = result
        });
    }