Exemplo n.º 1
0
        public void FetchUserFriends()
        {
            FriendsListBox.Invoke(new Action(() => FriendsListBox.DisplayMember = "Name"));
            FriendsListBox.Invoke(new Action(() => FriendsListBox.Items.Clear()));
            foreach (User friend in User.Friends)
            {
                FriendsListBox.Invoke(new Action(() => FriendsListBox.Items.Add(friend)));
            }

            FriendsListBox.Invoke(new Action(() => FriendsListBox.Sorted = true));
        }
Exemplo n.º 2
0
        public void ClearhAllInfo()
        {
            BirthdaysTable.Clear();
            r_BirthdayDataKeeper.Birthdays.Clear();
            VideoPostListBox.Invoke(new Action(() => VideoPostListBox.Items.Clear()));
            FriendsListBox.Invoke(new Action(() =>
            {
                FriendsListBox.Items.Clear();
                FriendProfilePicture.ImageLocation = null;
            }));

            AlbumsListBox.Invoke(new Action(() =>
            {
                AlbumsListBox.Items.Clear();
                FacebookAlbum.PhotosDataGridView.Columns.Clear();
            }));
        }
Exemplo n.º 3
0
        public void DisplayFriends()
        {
            FriendsListBox.Invoke(new Action(
                                      () =>
            {
                FriendsListBox.Items.Clear();
                FriendsListBox.DisplayMember = "Name";
                foreach (User friend in m_LoggedInUser.Friends)
                {
                    FriendsListBox.Items.Add(friend);
                    friend.ReFetch(DynamicWrapper.eLoadOptions.Full);
                }

                if (m_LoggedInUser.Friends.Count == 0)
                {
                    MessageBox.Show("No Friends to retrieve");
                }
            }));
        }
Exemplo n.º 4
0
        private void fetchFriendList()
        {
            if (checkIfUserLoggedIn())
            {
                List <User> userFriends = r_FriendsFacade.GetUserFrinedsByOrderChoice((int)m_CurrentChoice, m_LoggedInUser);

                if (userFriends != null)
                {
                    if (!FriendsListBox.InvokeRequired)
                    {
                        showFrinedsOnListBox(userFriends);
                    }
                    else
                    {
                        FriendsListBox.Invoke(new Action(() => showFrinedsOnListBox(userFriends)));
                    }
                }
                else
                {
                    MessageBox.Show("There isn't friends to show.");
                }
            }
        }