Ejemplo n.º 1
0
        public void SetDetails(DataUserDetails details)
        {
            mDetails             = details;
            mDetails.OnGetImage += OnGetImage;

            SetPhoto(mDetails.Image);

            if (mDetails.Image == null)
            {
                mDetails.FetchImage();
            }
        }
        private void RefreshMailContent()
        {
            DataUserDetails userDetails = DataManager.Me.Data[0].UserDetails;

            if (mHasUpdateEmail)
            {
                mMailSave.interactable = userDetails.Email != mMailField.text;
            }
            else
            {
                mMailField.text        = userDetails.Email;
                mMailSave.interactable = false;
            }
        }
Ejemplo n.º 3
0
        }                                // Only DataUser.GetUser should call this

        public override void SetData(Dictionary <string, object> data)
        {
            base.SetData(data);

            IsMe = Get <bool>(data, KEY_IS_ME);
            PersonalIdentityNumber = Get <string>(data, KEY_PERSONAL_ID);
            ContactCount           = GetInt(data, KEY_CONTACT_COUNT);
            AdolescentCount        = GetInt(data, KEY_ADOLESCENT_COUNT);

            if (data.ContainsKey(KEY_USER_DETAILS))
            {
                UserDetails = DataUserDetails.GetDetails(GetDict(data, KEY_USER_DETAILS));
            }
        }
Ejemplo n.º 4
0
        public static DataUserDetails GetDetails(Dictionary <string, object> data)
        {
            int id = GetInt(data, KEY_ID);

            if (mUserDetails.ContainsKey(id))
            {
                DataUserDetails details = mUserDetails[id];
                details.SetData(data);
                return(details);
            }

            DataUserDetails newDetails = new DataUserDetails();

            newDetails.SetData(data);
            mUserDetails[id] = newDetails;
            return(newDetails);
        }
        private void RefreshPhotoContent()
        {
            DataUserDetails userDetails = DataManager.Me.Data[0].UserDetails;
            Sprite          userPhoto   = userDetails.Image;

            mPhotoSave.interactable   = mHasUpdatedPhoto && mSelectedPhoto != userPhoto;
            mPhotoRemove.interactable = (!mHasUpdatedPhoto && userPhoto != null) ||
                                        (mHasUpdatedPhoto && mSelectedPhoto != null);

            if (!mHasUpdatedPhoto && userPhoto != null)
            {
                SetPlaceholderState(false);
                mPhotoDisplay.texture = userPhoto.texture;
            }
            else if (mHasUpdatedPhoto && mSelectedPhoto != null)
            {
                SetPlaceholderState(false);
                mPhotoDisplay.texture = mSelectedPhoto;
            }
            else
            {
                SetPlaceholderState(true);
            }
        }