public override void onHttpStatusOK(QQHttpResponse response) { BitmapImage bmp = new BitmapImage(); bmp.BeginInit(); bmp.StreamSource = new MemoryStream(response.getResponseData()); bmp.EndInit(); user.setFace(bmp); notifyActionEvent(QQActionEvent.Type.EVT_OK, user); }
/** {@inheritDoc} */ public override void onHttpStatusOK(QQHttpResponse response) { try { BitmapImage bmp = new BitmapImage(); bmp.BeginInit(); bmp.StreamSource = new MemoryStream(response.getResponseData()); bmp.EndInit(); notifyActionEvent(QQActionEvent.Type.EVT_OK, bmp); } catch (IOException e) { notifyActionEvent(QQActionEvent.Type.EVT_ERROR, new QQException(QQWpfApplication1.action.QQException.QQErrorCode.UNKNOWN_ERROR, e)); } }