public void InsertSMSFriend( AsSMSFriend listData) { UIListItem item = m_list.CreateItem( m_objChoiceItem) as UIListItem; AsSMSItem baseFriendItem = item.gameObject.GetComponent<AsSMSItem>(); if( null == baseFriendItem) return; baseFriendItem.SetSMSFriendData( listData); }
public void SMSFriendInsert( string name, double id, string phonenumber) { Debug.Log( "data name: " + name + "id: " + id +"phonenumber: "+ phonenumber); if( m_SMSFrinedList.ContainsKey( id) != true) { AsSMSFriend smsfriend = new AsSMSFriend(); smsfriend.id = id; smsfriend.name = name; smsfriend.phonenumber = phonenumber; m_SMSFrinedList.Add( id, smsfriend); } }
public void SetSMSFriendData( AsSMSFriend friend) { m_friendData = friend; desc.Text = friend.name; }
public AsSMSFriend[] GetSMSFriendByPage( int page) { int index = 0; int pageIndex = page * SMSFRIEND_LIST_PER_PAGE; int id = 0; AsSMSFriend[] arraySMS = new AsSMSFriend[SMSFRIEND_LIST_PER_PAGE]; foreach( KeyValuePair<double, AsSMSFriend> pair in m_SMSFrinedList) { //Start if( index >= pageIndex && index < pageIndex + SMSFRIEND_LIST_PER_PAGE) { arraySMS[id] = pair.Value; ++id; } ++index; if( index > pageIndex + SMSFRIEND_LIST_PER_PAGE) break; } return arraySMS; }