private void updateListBoxByLikes(FacebookObjectCollection <Post> i_PostsToFilter, int i_LikesThreshold) { FacebookObjectCollection <Post> filteredPosts; clearCollectionsItemsTabControlListBoxes(); filteredPosts = FacebookLogic.FilterPostsByLikesCount(i_PostsToFilter, i_LikesThreshold); addItemsToPostListBox <Post>(filteredPosts); }
private void updateListBoxByDate(FacebookObjectCollection <Post> i_PostsToFilter, DateTime i_SelectedDate) { FacebookObjectCollection <Post> filteredPosts; clearCollectionsItemsTabControlListBoxes(); filteredPosts = FacebookLogic.FilterPostsByDate(i_PostsToFilter, i_SelectedDate); addItemsToPostListBox <Post>(filteredPosts); }
private void postsListBox_SelectedIndexChanged(object sender, EventArgs e) { try { m_SelectedItem = FacebookLogic.ConvertItemToSelectedItem((PostedItem)postsListBox.SelectedItem); new Thread(bindSelectedItem).Start(); } catch (Exception ex) { MessageBox.Show("A problem occured while trying to display the post."); } }
private void logInUser() { string loginError = string.Empty; try { loginError = FacebookLogic.LogInUser(); } catch (Exception e) { MessageBox.Show("Could not log in to the facebook server."); } InitiateFormInfo(loginError); new Thread(fetchUserInfo).Start(); }
private void updateLikeButtonName() { try { if (FacebookLogic.IsSelectedItemLikedByUser(m_SelectedItem)) { likeButton.Text = "Dislike"; } else { likeButton.Text = "Like"; } } catch (Exception e) { MessageBox.Show("There was a problem determining user post like."); } }
private void likeButton_Click(object sender, EventArgs e) { try { if (m_SelectedItem != null) { if (FacebookLogic.IsSelectedItemLikedByUser(m_SelectedItem)) { m_SelectedItem.DislikePost(); } else { m_SelectedItem.LikePost(); } } } catch (Exception ex) { MessageBox.Show("There was a problem liking the post."); } }
private void logOutUser() { FacebookLogic.LogOutUser(); clearAllData(); connectionButton.Text = "Log In"; }
private void dateFilterComboBox_SelectedIndexChanged(object sender, EventArgs e) { FacebookLogic.setDateFilterComparison(dateFilterComboBox.SelectedItem as string); }