예제 #1
0
파일: WinMain.cs 프로젝트: FormatD/qqrobot
 public WinMain(WebQQCommon communication)
     : this()
 {
     this.webqq = communication;
     RegisteEvent(communication);
     LoadRules();
 }
예제 #2
0
파일: WinLogin.cs 프로젝트: FormatD/qqrobot
        private void CheckVerifyCode()
        {
            string userName = txtUin.Text.Trim();
            string passWord = txtPassWord.Text.Trim();

            if (string.IsNullOrWhiteSpace(userName)
                || string.IsNullOrWhiteSpace(passWord))
            {
                return;
            }

            LoginInfo loginInfo = new LoginInfo { Username = userName, PassWord = passWord };
            communication = new WebQQCommon(loginInfo);
            if (communication.IsNeedVerifyCode())
            {
                Stream stream = communication.GetVerifyCodePicStream();
                if (stream != null)
                {
                    Image image = Image.FromStream(stream);
                    this.pbVerifyCode.Image = image;
                    //image.Save(@"C:\123.bmp");

                    SetVerifyCodeVisible(true);
                }
                else
                {

                }
            }
            else
            {
                SetVerifyCodeVisible(false);
            }
        }
예제 #3
0
파일: WinMain.cs 프로젝트: FormatD/qqrobot
 private void RegisteEvent(WebQQCommon communication)
 {
     communication.OnAddFriendEvent += communication_OnAddFriendEvent;
     //communication.OnFriendMessageEvent+=communication_OnFriendMessageEvent;
     communication.OnOffLine += communication_OnOffLine;
     communication.OnGroupMessageArrivedEvent += communication_OnQunMessageEvent;
     communication.OnJoinRequested += communication_OnSystemMessageArrive;
 }