Beispiel #1
0
        void GetTableItem(object msg)
        {
            Dictionary <string, object> dic = (Dictionary <string, object>)msg;

            if (dic.ContainsKey("totalCount"))
            {
                _totalCount = int.Parse(dic["totalCount"].ToString());
            }
            object        obj     = dic["data"];
            List <object> objList = (List <object>)obj;

            foreach (Dictionary <string, object> info in objList)
            {
                TeaRoomInfoItem item     = YxWindowUtils.CreateItem(InfoItem, grid.transform);
                RoomInfoData    roomInfo = new RoomInfoData();
                roomInfo.ParseData(info);
                item.UpdateView(roomInfo);
            }
            grid.Reposition();
            _request = false;
            if (ScrollView != null && _curPageNum == 2)
            {
                ScrollView.ResetPosition();
            }
        }
Beispiel #2
0
        private void BackHistoryList(object msg)
        {
            Dictionary <string, object> dic = (Dictionary <string, object>)msg;

            if (dic.ContainsKey("totalCount"))
            {
                _totalCount = int.Parse(dic["totalCount"].ToString());
            }
            object        obj     = dic["data"];
            List <object> objList = (List <object>)obj;

            foreach (Dictionary <string, object> info in objList)
            {
                TeaRoomInfoItem item = YxWindowUtils.CreateItem(InfoItem, grid.transform);
                item.SetIndex(_rowIndex++);
                item.TeaId = TeaId;
                item.JieSanBt.SetActive(false);
                RoomInfoData roomInfo = new RoomInfoData();
                roomInfo.ParseData(info, true);
                item.UpdateView(roomInfo);
            }
            grid.Reposition();
            _request = false;
            if (ScrollView != null && _curPageNum == 2)
            {
                ScrollView.ResetPosition();
            }
        }
Beispiel #3
0
        void GetTableItem(object msg)
        {
            Dictionary <string, object> dic = (Dictionary <string, object>)msg;
            object        obj     = dic["history"];
            List <object> objList = (List <object>)obj;

            foreach (Dictionary <string, object> info in objList)
            {
                TeaRoomInfoItem item     = YxWindowUtils.CreateItem(InfoItem, grid.transform);
                RoomInfoData    roomInfo = new RoomInfoData();
                roomInfo.ParseData(info);
                item.UpdateView(roomInfo);
            }
            grid.Reposition();
        }
Beispiel #4
0
        private void BackHistoryList(object msg)
        {
            int RowIndex = 1;
            Dictionary <string, object> dic = (Dictionary <string, object>)msg;
            object        obj     = dic["history"];
            List <object> objList = (List <object>)obj;

            foreach (Dictionary <string, object> info in objList)
            {
                TeaRoomInfoItem item = YxWindowUtils.CreateItem(InfoItem, grid.transform);
                item.SetIndex(RowIndex++);
                item.TeaId = TeaId;
                item.JieSanBt.SetActive(false);
                RoomInfoData roomInfo = new RoomInfoData();
                roomInfo.ParseData(info, true);
                item.UpdateView(roomInfo);
            }
            grid.Reposition();
        }