public void Open(  GameObject parent , body2_SC_GUILD_SEARCH_RESULT data )
	{
		m_parent = parent;
		m_data = data;

		m_txtMaster.Text = m_data.szMasterName;

		if( null != AsUserInfo.Instance.GuildData && null != m_btnJoin )
		{
			m_btnJoin.SetControlState( UIButton.CONTROL_STATE.DISABLED );
			m_btnJoin.spriteText.Color = Color.gray;
		}
	}
	public void Open( body2_SC_GUILD_SEARCH_RESULT data, GameObject parent)
	{
		this.data = data;
		this.parent = parent;
		
		guildName.Text = data.szGuildName;
		guildLevel.Text = data.nLevel.ToString();
		guildMaster.Text = data.szMasterName;
		pr.Text = data.szGuildPublicize;
		
		if( null != AsUserInfo.Instance.GuildData && null != subscribeBtn )
		{
			subscribeBtn.SetControlState( UIButton.CONTROL_STATE.DISABLED );
			subscribeBtn.spriteText.Color = Color.gray;
		}
	}
示例#3
0
	public void PacketBytesToClass2( byte[] data, int index)
	{
		Type infotype = this.GetType();
		// nCnt
		FieldInfo headerinfo = infotype.GetField ( "nCnt", BINDING_FLAGS_PIG);
		headerinfo.SetValue( this, data[ index++]);

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

		search = new body2_SC_GUILD_SEARCH_RESULT[ nCnt];
		for( int i = 0; i < nCnt; i++)
		{
			search[i] = new body2_SC_GUILD_SEARCH_RESULT();
			index = search[i].PacketBytesToClass( data, index);
		}
	}