예제 #1
0
	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);
	}
예제 #2
0
	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);
		}
	}
예제 #3
0
	public void SetSMSFriendData( AsSMSFriend friend)
	{
		m_friendData = friend;
		desc.Text = friend.name;
	}
예제 #4
0
	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;
	}