public void show(RecordBackObj obj) { gameObject.SetActive(true); ProcessYonghuming(); FillYonghuming(); ProcessGameObjs(0); dataObjs.Clear(); _RecordBackObj = obj; shaixuanpanel.gameObject.SetActive(false); //隐藏筛选 string[] labelstrs = obj.chData.Split('~'); int col = _RecordBackObj.byColumn; int length = labelstrs.Length / col; for (int i = 0; i < length; ++i) { //Debug.Log (length+" "+i); RecordLookItemObj dataObj = new RecordLookItemObj(); for (int j = 0; j < col; j++) { //Debug.Log (col+" "+i); dataObj.data.Add(labelstrs[col * i + j]); } dataObjs.Add(dataObj); } if (length > 0) { norecord.SetActive(false); } else { norecord.SetActive(true); } ProcessGameObjs(dataObjs.Count); for (int i = 0; i < itemGameObjs.Count; ++i) { XiaJiYouXiYingKuiItem script = itemGameObjs[i].GetComponent <XiaJiYouXiYingKuiItem>(); script.FillData(dataObjs[i]); } grid.transform.parent.GetComponent <UIScrollView>().ResetPosition(); int totalRecord = _RecordBackObj.iCountRecord; int pageSize = (int)_RecordBackObj.byPages; int totalPages = totalRecord % pageSize > 0 ? 1 + (totalRecord / pageSize) : 0 + (totalRecord / pageSize); if (totalPages == 0) { totalPages = 1; } pageLabel.text = string.Format("第{0}页 共{1}页", _RecordBackObj.iCuePage, totalPages); }
public void OnReceive(NetMessageHead head, MSG_GP_USER_ResultRecord para) { if (para.byMainType != Global.AppQueryMainType || Global.AppQuerySubType != para.byZiType) { return; //子标识 主标识不符 丢弃 } if (para.byCueData == 0 || para.byCueData == para.byCountData) { model.SetRecordchData(para.byCueData, para.GetChData()); RecordBackObj obj = new RecordBackObj(); obj.byMainType = para.byMainType; obj.byZiType = para.byZiType; obj.byColumn = para.byColumn; obj.byLine = para.byLine; obj.iCountRecord = para.iCountRecord; obj.byPages = para.byPages; obj.iCuePage = para.iCuePage; string chData = ""; SortedList <int, string> sortedList = model.GetRecordchData(); foreach (var item in sortedList) { chData += item.Value; } obj.chData = chData; model.recordBackObj = obj; model.ClearRecordBackSlist(); Signal.Dispatch(obj); } else { model.SetRecordchData(para.byCueData, para.GetChData()); } }
public void OnRecordBack(RecordBackObj obj) { byte mainId = obj.byMainType; switch (mainId) { case TouZhuRecordPanel.byRord: if (touzhuRecordpanel == null) { touzhuRecordpanel = LoadPanel("TouZhuRecordPanel").GetComponent <TouZhuRecordPanel>(); touzhuRecordpanel.msgSignal.AddListener(OnMsg); } touzhuRecordpanel.show(obj); break; case QuKuanRecordbkPanel.byRord: if (qukuanRecordPanel == null) { qukuanRecordPanel = LoadPanel("QuKuanRecordPanel").GetComponent <QuKuanRecordbkPanel>(); qukuanRecordPanel.msgSignal.AddListener(OnMsg); } qukuanRecordPanel.show(obj); break; case ChongZhiRecordPanel.byRord: if (chongzhiRecordpanel == null) { chongzhiRecordpanel = LoadPanel("ChongZhiRecordPanel").GetComponent <ChongZhiRecordPanel>(); chongzhiRecordpanel.msgSignal.AddListener(OnMsg); } chongzhiRecordpanel.show(obj); break; case YingKuiRecordPanel.byRord: if (yingkuiRecordPanel == null) { yingkuiRecordPanel = LoadPanel("YingKuiRecordPanel").GetComponent <YingKuiRecordPanel>(); yingkuiRecordPanel.msgSignal.AddListener(OnMsg); } yingkuiRecordPanel.show(obj); break; case YouXiRecordPanel.byRord: if (youxiRecordPanel == null) { youxiRecordPanel = LoadPanel("YouXiRecordPanel").GetComponent <YouXiRecordPanel>(); youxiRecordPanel.msgSignal.AddListener(OnMsg); } youxiRecordPanel.show(obj); break; } }
public void OnRecordBack(RecordBackObj obj) { byte mainId = obj.byMainType; switch (mainId) { case TouZhuRecordPanel.byRord: if (touzhuRecordpanel == null) { touzhuRecordpanel = LoadPanel("TouZhuRecordPanel").GetComponent <TouZhuRecordPanel>(); touzhuRecordpanel.msgSignal.AddListener(OnMsg); touzhuRecordpanel.GetComponent <UIPanel>().depth = 13; } touzhuRecordpanel.show(obj); break; } }
void OnRecordBack(RecordBackObj obj) { view.OnRecordBack(obj); }
public void OnRecordBack(RecordBackObj obj) { byte mainId = obj.byMainType; switch (mainId) { case HuiYuanZiLiaoPanel.byRord: if (huiyuanziliaoPanel == null) { huiyuanziliaoPanel = LoadPanel("HuiYuanZiLiaoPanel").GetComponent <HuiYuanZiLiaoPanel>(); huiyuanziliaoPanel.msgSignal.AddListener(OnMsg); } huiyuanziliaoPanel.show(obj); break; case XiajiTouZhuMingXiPanel.byRord: if (xiajitouzhumingxiPanel == null) { xiajitouzhumingxiPanel = LoadPanel("XiaJiTouZhuMingXiPanel").GetComponent <XiajiTouZhuMingXiPanel>(); xiajitouzhumingxiPanel.msgSignal.AddListener(OnMsg); } xiajitouzhumingxiPanel.show(obj); break; case XiaJiTouZhuTongJiPanel.byRord: if (xiajitouzhutongjiPanel == null) { xiajitouzhutongjiPanel = LoadPanel("XiaJiTouZhuTongJiPanel").GetComponent <XiaJiTouZhuTongJiPanel>(); xiajitouzhutongjiPanel.msgSignal.AddListener(OnMsg); } xiajitouzhutongjiPanel.show(obj); break; case XiaJiYingKuiMingXIPanel.byRord: if (xiajiyingkuimingxiPanel == null) { xiajiyingkuimingxiPanel = LoadPanel("XiaJiYingKuiMingXIPanel").GetComponent <XiaJiYingKuiMingXIPanel>(); xiajiyingkuimingxiPanel.msgSignal.AddListener(OnMsg); } xiajiyingkuimingxiPanel.show(obj); break; case XiaJiYingKuiTongjiPanel.byRord: if (xiajiyingkuitongjiPanel == null) { xiajiyingkuitongjiPanel = LoadPanel("XiaJiYingKuiTongjiPanel").GetComponent <XiaJiYingKuiTongjiPanel>(); xiajiyingkuitongjiPanel.msgSignal.AddListener(OnMsg); } xiajiyingkuitongjiPanel.show(obj); break; case XiaJiChongZhiPanel.byRord: if (xiajichongzhiPanel == null) { xiajichongzhiPanel = LoadPanel("XiaJiChongZhiPanel").GetComponent <XiaJiChongZhiPanel>(); xiajichongzhiPanel.msgSignal.AddListener(OnMsg); } xiajichongzhiPanel.show(obj); break; case XiaJiTiXianPanel.byRord: if (xiajitixianPanel == null) { xiajitixianPanel = LoadPanel("XiaJiTiXianPanel").GetComponent <XiaJiTiXianPanel>(); xiajitixianPanel.msgSignal.AddListener(OnMsg); } xiajitixianPanel.show(obj); break; case ZhuanZhangJiLuPanel.byRord: if (zhuanzhangjilupanel == null) { zhuanzhangjilupanel = LoadPanel("ZhuanZhangJiLuPanel").GetComponent <ZhuanZhangJiLuPanel>(); zhuanzhangjilupanel.msgSignal.AddListener(OnMsg); } zhuanzhangjilupanel.show(obj); break; case XiaJiYouXiYingKuiPanel.byRord: if (xiajiyouxiyingkuiPanel == null) { xiajiyouxiyingkuiPanel = LoadPanel("XiaJiYouXiYingKuiPanel").GetComponent <XiaJiYouXiYingKuiPanel>(); xiajiyouxiyingkuiPanel.msgSignal.AddListener(OnMsg); } xiajiyouxiyingkuiPanel.show(obj); break; case XiaJiYouXiJiLuPanel.byRord: if (xiajiyouxijiluPanel == null) { xiajiyouxijiluPanel = LoadPanel("XiaJiYouXiJiLuPanel").GetComponent <XiaJiYouXiJiLuPanel>(); xiajiyouxijiluPanel.msgSignal.AddListener(OnMsg); } xiajiyouxijiluPanel.show(obj); break; } }
public void OnRecordBack(RecordBackObj obj) { panelScript.OnRecordBack(obj); }