public void DisplayUser(UserProfile profile)
        {
            Debug.Assert(profile != null);

            m_data = new UserDisplayData();

            if (profileDisplay != null)
            {
                profileDisplay.DisplayProfile(profile);
                m_data.profile = profileDisplay.data;
            }
            else
            {
                m_data.profile = UserProfileDisplayData.CreateFromProfile(profile);
            }

            if (avatarDisplay != null)
            {
                avatarDisplay.DisplayAvatar(profile.id, profile.avatarLocator);
                m_data.avatar = avatarDisplay.data;
            }
            else
            {
                if (profile.avatarLocator != null)
                {
                    m_data.avatar = ImageDisplayData.CreateForUserAvatar(profile.id,
                                                                         profile.avatarLocator);
                }
                else
                {
                    m_data.avatar = new ImageDisplayData();
                }
            }
        }
Beispiel #2
0
        public void DisplayUser(UserProfile profile)
        {
            Debug.Assert(profile != null);

            m_data = new UserDisplayData();

            if (profileDisplay != null)
            {
                profileDisplay.DisplayProfile(profile);
                m_data.profile = profileDisplay.data;
            }
            else
            {
                m_data.profile = UserProfileDisplayData.CreateFromProfile(profile);
            }

            if (avatarDisplay != null)
            {
                avatarDisplay.DisplayAvatar(profile.id, profile.avatarLocator);
                m_data.avatar = avatarDisplay.data;
            }
            else
            {
                m_data.avatar = new ImageDisplayData()
                {
                    userId           = profile.id,
                    mediaType        = ImageDisplayData.MediaType.UserAvatar,
                    imageId          = profile.avatarLocator.fileName,
                    originalTexture  = null,
                    thumbnailTexture = null,
                };
            }
        }
        private void SetData(UserDisplayData value)
        {
            m_data = value;

            if (profileDisplay != null)
            {
                profileDisplay.data = m_data.profile;
            }
            if (avatarDisplay != null)
            {
                avatarDisplay.data = m_data.avatar;
            }
        }