Exemplo n.º 1
0
 private void buttonMostPopularPagesF_Click(object sender, EventArgs e)
 {
     if (LogicServices.GetFriendsCount() < 3)
     {
         MessageBox.Show("You have less then three friends, sorry");
     }
     else
     {
         FormTopCategories formCategory = new FormTopCategories();
         formCategory.StartPosition = FormStartPosition.CenterParent;
         formCategory.ShowDialog();
     }
 }
Exemplo n.º 2
0
        //Fetch Friends
        private void fetchFriendsList()
        {
            listBoxFriendsList.Items.Clear();

            if (LogicServices.GetFriendsCount() > 0)
            {
                enabelFriendsCommands();
                new Thread(fillListBoxFriends).Start();
            }
            else
            {
                MessageBox.Show("No Friends");
            }
        }
Exemplo n.º 3
0
        private void search()
        {
            listBoxFriendsListConditon.Items.Clear();
            listBoxFriendsListConditon.DisplayMember = "Name";

            initializeSearchParams();

            if (LogicServices.GetFriendsCount() == 0)
            {
                MessageBox.Show("Have no friends in list");
            }
            else
            {
                StrategySearchFriends searchStrategy = new StrategySearchFriends(m_friendToLookFor, m_SearchByList);
                searchStrategy.Search();

                foreach (User friend in searchStrategy.GetFilteredFriends())
                {
                    listBoxFriendsListConditon.Items.Add(friend);
                }
            }
        }