示例#1
0
        /** {@inheritDoc} */
        public override void onHttpStatusOK(QQHttpResponse response)
        {
            JSONObject json = new JSONObject(response.getResponseString());

            if (json.getInt("retcode") == 0)
            {
                JSONObject result = json.getJSONObject("result");
                QQLevel    level  = user.getLevel();
                level.setLevel(result.getInt("level"));
                level.setDays(result.getInt("days"));
                level.setHours(result.getInt("hours"));
                level.setRemainDays(result.getInt("remainDays"));
                notifyActionEvent(QQActionEvent.Type.EVT_OK, user);
            }
            else
            {
                notifyActionEvent(QQActionEvent.Type.EVT_ERROR,
                                  new QQException(QQWpfApplication1.action.QQException.QQErrorCode.UNEXPECTED_RESPONSE, response.getResponseString()));
            }
        }
示例#2
0
文件: QQUser.cs 项目: cansou/sharpQQ
        private BitmapImage face;  // 头像,不能被序列化


        /**
         * <p>Constructor for QQUser.</p>
         */
        public QQUser()
        {
            status = QQStatus.OFFLINE;
            level  = new QQLevel();
        }
示例#3
0
文件: QQUser.cs 项目: cansou/sharpQQ
 /**
  * <p>Setter for the field <code>level</code>.</p>
  *
  * @param level a {@link iqq.im.bean.QQLevel} object.
  */
 public void setLevel(QQLevel level)
 {
     this.level = level;
 }