private void doWebLogin(String verifyCode, AbstractActionFuture future) { LoginModule login = (LoginModule)getContext().getModule(AbstractModule.Type.LOGIN); QQAccount account = (QQAccount)getContext().getAccount(); login.webLogin(account.getUsername(), account.getPassword(), account.getUin(), verifyCode, delegate(QQActionEvent evt) { if (evt.getType() == QQActionEvent.Type.EVT_OK) { doCheckLoginSig((String)evt.getTarget(), future); } else if (evt.getType() == QQActionEvent.Type.EVT_ERROR) { QQException ex = (QQException)(evt.getTarget()); if (ex.getError() == QQWpfApplication1.action.QQException.QQErrorCode.WRONG_CAPTCHA) { doGetVerify(ex.Message, future); } else { future.notifyActionEvent( QQActionEvent.Type.EVT_ERROR, (QQException)evt.getTarget()); } } }); }