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(); } }
//Fetch Friends private void fetchFriendsList() { listBoxFriendsList.Items.Clear(); if (LogicServices.GetFriendsCount() > 0) { enabelFriendsCommands(); new Thread(fillListBoxFriends).Start(); } else { MessageBox.Show("No Friends"); } }
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); } } }