コード例 #1
0
	public void SetFriendList( body1_SC_FRIEND_LIST list)
	{
		m_MaxPage = list.nMaxPage;
		if( m_CurPage + 1 > m_MaxPage)
		{
			m_CurPage = m_MaxPage -1;
			AsCommonSender.SendSocialUiScroll( AsUserInfo.Instance.LoginUserUniqueKey, eSOCIAL_UI_TYPE.eSOCIAL_UI_FRIEND_APPLY, m_CurPage, false);
			return;
		}
		m_PageText.Text = string.Format( "{0}/{1}", m_CurPage + 1, m_MaxPage);

		m_list.ClearList( true);
		if( list.body == null) return;

		foreach( body2_SC_FRIEND_LIST data in list.body)
		{
			UIListItem item = m_list.CreateItem( m_objChoiceItem) as UIListItem;

			AsFriendInvite friendItem = item.gameObject.GetComponent<AsFriendInvite>();
			friendItem.SetFriendData( data, FriendAcceptBtnChangeDel);
		}

		noFriend.gameObject.SetActiveRecursively( 0 == list.nCnt);
	}
コード例 #2
0
ファイル: AsSocialUI.cs プロジェクト: ftcaicai/ArkClient
	public void SetSocialCloneFriendList( body1_SC_FRIEND_LIST list)
	{
		m_SocialCloneDlg.SetFriendList( list);
	}
コード例 #3
0
ファイル: AsSocialUI.cs プロジェクト: ftcaicai/ArkClient
	public void SetFriendApplyList( body1_SC_FRIEND_LIST list)
	{
		if( null != m_FindFriendDlg)
			m_FindFriendDlg.SetFriendApplyList( list);
	}
コード例 #4
0
	void FriendList( byte[] _packet)
	{
		body1_SC_FRIEND_LIST listResult = new body1_SC_FRIEND_LIST();
		listResult.PacketBytesToClass( _packet);

		#if _SOCIAL_LOG_
		Debug.Log( "FriendList nUserUniqKey : " + listResult.nUserUniqKey.ToString());
		#endif

		AsUserEntity userEntity = AsUserInfo.Instance.GetCurrentUserEntity();
		if( null == userEntity)
			return;

		if( listResult.nUserUniqKey == AsUserInfo.Instance.LoginUserUniqueKey)
			AsSocialManager.Instance.SocialUI.SetFriendList( listResult);
		else
			AsSocialManager.Instance.SocialUI.SetSocialCloneFriendList( listResult);
	}
コード例 #5
0
ファイル: AsFindFriendDlg.cs プロジェクト: ftcaicai/ArkClient
	public void SetFriendApplyList( body1_SC_FRIEND_LIST list)
	{
		if( m_TabState == eFindFriendTab.FriendInvite)
		{
			AsFriendInviteTab friendInvitePanel = m_Panels[ (int)eFindFriendTab.FriendInvite].gameObject.GetComponent<AsFriendInviteTab>();
			friendInvitePanel.SetFriendList( list);
		}
	}
コード例 #6
0
ファイル: AsSocialDlg.cs プロジェクト: ftcaicai/ArkClient
	public void SetFriendList( body1_SC_FRIEND_LIST list)
	{
		if( m_TabState == eSocialTab.Friend)
		{
			AsFriendTab friendPanel = m_Panels[ (int)eSocialTab.Friend ].gameObject.GetComponent<AsFriendTab>();
			friendPanel.SetFriendList( list);
		}
	}
コード例 #7
0
ファイル: AsFriendTab.cs プロジェクト: ftcaicai/ArkClient
	public void SetFriendList( body1_SC_FRIEND_LIST list)
	{
		ConditionProcess(list);

		m_MaxPage =  list.nMaxPage;
		if( m_MaxPage < m_CurPage + 1)
			m_CurPage = m_MaxPage - 1; //OnlineFilter

		m_PageText.Text = string.Format( "{0}/{1}", m_CurPage + 1, m_MaxPage);

		//public SpriteText m_HelloCount;

		m_list.ClearList( true);
		if( list.body == null)
			return;

		foreach( body2_SC_FRIEND_LIST data in list.body)
		{
			UIListItem item = m_list.CreateItem( m_objChoiceItem) as UIListItem;

			AsFriendItem friendItem = item.gameObject.GetComponent<AsFriendItem>();
			friendItem.SetFriendData( data, IsClone);
		}

		noFriend.gameObject.SetActiveRecursively( 0 == list.nCnt);
	}
コード例 #8
0
ファイル: AsFriendTab.cs プロジェクト: ftcaicai/ArkClient
	private void ConditionProcess(body1_SC_FRIEND_LIST data)
	{
		m_HelloCount.Text = string.Format( AsTableManager.Instance.GetTbl_String(1388), data.nHelloCount, data.nMaxHelloCount);
		#if _USE_CONDITION_	
		string conditionCount = string.Format(":{0}/{1}",data.nChargeConditionCount ,data.nMaxChargeConditionCount);
		m_ConditionText.Text = string.Format( AsTableManager.Instance.GetTbl_String(1906), conditionCount);
		m_nRateProgress.Value = (float)( data.nChargeConditionPointRate * 0.01f);

		if(data.nChargeConditionCount == 0)
		{
			AsUtil.SetButtonState( m_ConditionBtn , UIButton.CONTROL_STATE.DISABLED );
		}
		else
		{
			AsUtil.SetButtonState( m_ConditionBtn , UIButton.CONTROL_STATE.NORMAL );
		}
		#endif
	}
コード例 #9
0
	public new void PacketBytesToClass( byte[] data)
	{
		FieldInfo headerinfo = null;
		Type infotype = this.GetType();
		int index = ParsePacketHeader( data);

		// eType
		byte[] type = new byte[ sizeof( Int32)];
		Buffer.BlockCopy( data, index, type, 0, sizeof( Int32));
		headerinfo = infotype.GetField( "eType", BINDING_FLAGS_PIG);
		headerinfo.SetValue( this, BitConverter.ToInt32( type, 0));
		index += sizeof( Int32);

		switch( ( eSOCIAL_UI_TYPE)eType)
		{
		case eSOCIAL_UI_TYPE.eSOCIAL_UI_HISTORY:
			{
				socialHistory = new body1_SC_SOCIAL_HISTORY();
				socialHistory.PacketBytesToClass( data, index);
			}
			break;
		case eSOCIAL_UI_TYPE.eSOCIAL_UI_FRIEND:
			{
				friendList = new body1_SC_FRIEND_LIST();
				friendList.PacketBytesToClass( data, index);
			}
			break;
		case eSOCIAL_UI_TYPE.eSOCIAL_UI_FRIEND_RANDOM:
			{
				randomList = new body1_SC_FRIEND_RANDOM();
				randomList.PacketBytesToClass( data, index);
			}
			break;
		case eSOCIAL_UI_TYPE.eSOCIAL_UI_BLOCK:
			{
				blockOutList = new body1_SC_BLOCKOUT_LIST();
				blockOutList.PacketBytesToClass( data, index);
			}
			break;
		case eSOCIAL_UI_TYPE.eSOCIAL_UI_FRIEND_APPLY:
			{
				friendApplyList = new body1_SC_FRIEND_LIST();
				friendApplyList.PacketBytesToClass( data, index);
			}
			break;
		case eSOCIAL_UI_TYPE.eSOCIAL_UI_RECOMMEND:
			{
				recommendList = new body_SC_SOCIAL_RECOMMEND();
				recommendList.PacketBytesToClass( data, index);
			}
			break;
		}
	}