public void InsertBlockOutData( body2_SC_BLOCKOUT_LIST listData) { UIListItem item = m_list.CreateItem( m_objChoiceItem) as UIListItem; AsBlockOutItem baseFriendItem = item.gameObject.GetComponent<AsBlockOutItem>(); if( null == baseFriendItem) return; baseFriendItem.SetBlockOutData( listData); }
public void SetBlockOutData( body2_SC_BLOCKOUT_LIST Data) { m_nUserUniqKey = Data.nUserUniqKey; if( Data.szUserId.Length != 0) m_NickName.Text = Data.szUserId; }
public void ReceiveBlockOutInsert( body_SC_BLOCKOUT_INSERT blockOutInsert) { if( m_BlockOutList.ContainsKey( blockOutInsert.nUserUniqKey) != true) { body2_SC_BLOCKOUT_LIST data = new body2_SC_BLOCKOUT_LIST(); data.nUserUniqKey = blockOutInsert.nUserUniqKey; data.szUserId = AsUtil.GetRealString( System.Text.UTF8Encoding.UTF8.GetString( blockOutInsert.szUserId)); m_BlockOutList.Add( blockOutInsert.nUserUniqKey, data); } }
public void ReceiveBlockOutList( body2_SC_BLOCKOUT_LIST[] list) { m_BlockOutList.Clear(); if( null == list) return; foreach( body2_SC_BLOCKOUT_LIST data in list) m_BlockOutList.Add( data.nUserUniqKey, data); }
public body2_SC_BLOCKOUT_LIST[] GetBlockByPage( int page) { int index = 0; int pageIndex = page * BLOCK_LIST_PER_PAGE; int id = 0; body2_SC_BLOCKOUT_LIST[] arrayBlock = new body2_SC_BLOCKOUT_LIST[BLOCK_LIST_PER_PAGE]; foreach( KeyValuePair<uint, body2_SC_BLOCKOUT_LIST> pair in m_BlockOutList) { //Start if( index >= pageIndex && index < pageIndex + BLOCK_LIST_PER_PAGE) { arrayBlock[id] = pair.Value; ++id; } ++index; if( index > pageIndex + BLOCK_LIST_PER_PAGE) break; } return arrayBlock; }
public void PacketBytesToClass( byte[] data, int index) { Type infotype = this.GetType(); FieldInfo headerinfo; headerinfo = infotype.GetField ( "nCnt", BINDING_FLAGS_PIG); headerinfo.SetValue( this, data[ index++]); if( 0 < nCnt) { body = new body2_SC_BLOCKOUT_LIST[nCnt]; for ( int i = 0; i < nCnt; i++) { body[i] = new body2_SC_BLOCKOUT_LIST(); index = body[i].PacketBytesToClass( data, index); } } }