Пример #1
0
        Task ProfileData(ProfileDataResultEvent arg)
        {
            if (arg.AccountId == _accountId && _profileType == StatusAccountProfileType.Big)
            {
                var profileData = arg.ProfileData;
                if (profileData.ProfileInfoResult == ProfileDownloadResult.Available)
                {
                    if (ProfilePageSections.HasProfileSections(this))
                    {
                        if (ProfilePageSections.UpdateProfileSections(this, arg.ProfileData))
                        {
                            UpdateSuspendedLayout();
                        }
                    }
                    else
                    {
                        AddIndex = GetRow("Title");
                        ProfilePageSections.AddProfileSections(this, arg.ProfileData, "Profile", _profileType == StatusAccountProfileType.Big);
                        UpdateSuspendedLayout();
                    }
                }
            }

            return(Task.CompletedTask);
        }
Пример #2
0
        Task ProfileAvailable(ProfileDataResultEvent profileEvent)
        {
            if (profileEvent.AccountId == WalletApp.CurrentAccountId)
            {
                switch (profileEvent.ProfileData.ProfileJsonResult)
                {
                case ProfileDownloadResult.Available:
                    ProfilePageSections.UpdateProfileSections(this, profileEvent.ProfileData);
                    UpdateSuspendedLayout();
                    _hasDownloaded = true;
                    break;

                case ProfileDownloadResult.NotAvailable:
                    _hasDownloaded = true;
                    break;

                case ProfileDownloadResult.NetworkError:
                    break;
                }
            }

            return(Task.CompletedTask);
        }