// SocketMsg msg = new SocketMsg(); public override bool OnReceive(int subCode, object value) { switch (subCode) { case ReqEventType.init: return(initResponse(value.ToString())); case ReqEventType.login: return(loginResponse(value.ToString())); case ReqEventType.regist: return(registResponse(value.ToString())); case ReqEventType.identy: return(getCodeResponse(value.ToString())); case ReqEventType.transfer: MessageData <Dictionary <string, object> > msg = value as MessageData <Dictionary <string, object> >; return(transferResponse(msg)); case ReqEventType.property: propertyResonse(value as PropertyInfo); break; case ReqEventType.pwforget: forgetpwReponse(value.ToString()); break; case ReqEventType.checkMoney: checkMoneyResponse(value); break; case ReqEventType.confirmPass: checkPassResponse(value.ToString()); break; case ReqEventType.checkLogin: tokenReponse(value.ToString()); break; case ReqEventType.GetTradeCord: TradeRecordList tradeRecordList = value as TradeRecordList; GetRecordResponse(tradeRecordList); break; case ReqEventType.ReadState: CacheData.Instance().RedState = (bool)value; Dispatch(AreaCode.UI, UIEvent.MENU_UPDATE_VIEW, true); break; default: break; } return(false); }
private bool GetRecordResponse(TradeRecordList msg) { if (msg == null) { return(false); } Dispatch(AreaCode.UI, UIEvent.TRADERECORD_VIEW, msg); return(true); }