Exemplo n.º 1
0
        private void updateFormData()
        {
            int    userAge = 0;
            string loggedInUserBirthday = m_Facade.GetBirthday();

            if (loggedInUserBirthday != null && loggedInUserBirthday.Length == 10)
            {
                if (int.TryParse(loggedInUserBirthday.Remove(0, 6), out userAge))
                {
                    userAge = DateTime.Today.Year - userAge;
                    FriendAgeLabelCompareTab.Text = string.Format("{0}", userAge);
                }
            }
            else
            {
                FriendAgeLabelCompareTab.Text = "Unknown";
            }

            this.ProfilePictureBox.Image = this.UserPictureBoxCompareTab.Image = m_Facade.GetProfileImage();
            this.Text = this.UserNameLabelCompareTab.Text = m_Facade.GetName();
            this.UserAgeLabelCompareTab.Text  = string.Format("{0}", userAge);
            this.UserBDAYLabelCompareTab.Text = loggedInUserBirthday;

            // this.UserHomeTownLabelCompareTab.Text = m_LoggedInUser.Hometown.Name;  Throwing an exception - data cannot be retrieved.
            this.CoverPhotoPictureBox.BackgroundImage = m_Facade.GetCoverImage();
            addFriendsToListBox();
            addPostsToListBox();                                // for the General Tab.
            postBindingSource.DataSource = m_Facade.GetPosts(); // for the one way data binding - data can't be changed because theres no set property to change the value.
        }
Exemplo n.º 2
0
 private void updateFriendsRatingUsingComments(Dictionary <string, UserRating> io_FriendsRatingDictionary, FacebookFacade i_Facade)
 {
     updateUserRatingCommentsOnPosts(io_FriendsRatingDictionary, i_Facade.GetWallPosts(), i_Facade.GetID());
     updateUserRatingCommentsOnPosts(io_FriendsRatingDictionary, i_Facade.GetPosts(), i_Facade.GetID());
 }