//接收到获取所有附件结果 CommandCallbackType ReceiveMailGetGoodsAll(byte[] dataBuffer, int sorketID) { SEmailGetAllGoods_SC sEmailGetAllGoods_SC = SEmailGetAllGoods_SC.ParsePackage(dataBuffer); EmailDataManager.Instance.UpdateCurrentEmailAttachmentStatus(sEmailGetAllGoods_SC.mailIdList); UIEventManager.Instance.TriggerUIEvent(UIEventType.GetAllAttachment, sEmailGetAllGoods_SC); return(CommandCallbackType.Continue); }
private void GetAllAttachmentHandl(object obj) { LoadingUI.Instance.Close(); SEmailGetAllGoods_SC Attachment = (SEmailGetAllGoods_SC)obj; //List<Attachment> list= EmailDataManager.Instance.GetAttachmentFromLoacl(Attachment.mailIdList); //list.ApplyAllItem(p=>GoodsMessageManager.Instance.Show((int)p.GoodsID,(int)p.count)); StartRefreshList(true); EmailInfoPanelManager.GetInstance().UpdateEmaiBottom(); }
public static SEmailGetAllGoods_SC ParsePackage(byte[] dataBuffer) { SEmailGetAllGoods_SC sEmailGetAllGoods_SC = new SEmailGetAllGoods_SC(); int offset = 0; offset += PackageHelper.ReadData(dataBuffer.Skip(offset).ToArray(), out sEmailGetAllGoods_SC.dwActorID); offset += PackageHelper.ReadData(dataBuffer.Skip(offset).ToArray(), out sEmailGetAllGoods_SC.dwEmailNum); sEmailGetAllGoods_SC.mailIdList = new List <Int64>(); for (int i = 0; i < sEmailGetAllGoods_SC.dwEmailNum; i++) { Int64 mailId = 0; offset += PackageHelper.ReadData(dataBuffer.Skip(offset).ToArray(), out mailId); sEmailGetAllGoods_SC.mailIdList.Add(mailId); } return(sEmailGetAllGoods_SC); }