private void stopSlideShow()
 {
     UILogicHelper.MakeControlsVisible(playButton);
     UILogicHelper.MakeControlsInvisible(stopButton);
     timerForSlideShow.Enabled = false;
     m_AudioPlayer.Stop();
 }
 // Chosing album in listbox
 public void FillPanel(IAlbumOperable i_FormToFill)
 {
     UILogicHelper.MakeControlsInvisible(i_FormToFill.ListBoxAlbums);
     i_FormToFill.PhotosAlbum = i_FormToFill.UsersAlbums.ElementAt(i_FormToFill.ListBoxAlbums.SelectedIndex);
     fillPanelByPhotos(i_FormToFill);
     UILogicHelper.MakeControlsVisible(i_FormToFill.ButtonSlideshow);
 }
 public void PlaySlideShow()
 {
     UILogicHelper.MakeControlsVisible(stopButton);
     UILogicHelper.MakeControlsInvisible(playButton);
     timerForSlideShow.Enabled = true;
     m_AudioPlayer.Play();
 }
 private void onKeyDownHandler(object sender, KeyEventArgs e)
 {
     if (e.KeyCode == Keys.Enter)
     {
         FriendsFacade.PostStatus(textBoxPostFriend.Text);
         UILogicHelper.MakeControlsInvisible(textBoxPostFriend);
         MessageBox.Show("Your post was successfully post.");
     }
 }
 private void makeLocalComponentsVisible()
 {
     this.Invoke(new Action(() =>
     {
         UILogicHelper.MakeControlsInvisible(buttonLogin);
         UILogicHelper.MakeControlsVisible(labelHelloUser, buttonLogout, pictureBoxUser, buttonShowFriends,
                                           buttonMyPosts, buttonMakePost, buttonAlbums);
     }));
 }
 // Logout From Account
 private void buttonLogout_Click(object sender, EventArgs e)
 {
     // Calling method doLogout
     m_Facade.LogOut();
     closeAllComponents();
     UILogicHelper.MakeControlsVisible(buttonLogin);
     UILogicHelper.MakeControlsInvisible(buttonLogout, pictureBoxUser, buttonShowFriends,
                                         labelHelloUser, buttonMyPosts, buttonMakePost, textBoxPost, buttonAlbums);
 }
 private void closeAllComponents()
 {
     this.Invoke(new Action(() =>
     {
         UILogicHelper.MakeControlsInvisible(createdTimeLabel, createdTimeLabel1, imageAlbumLabel,
                                             imageAlbumPictureBox, nameLabel, nameLabel1, forAlbumsListBoxLabel, listBoxCommonGroups,
                                             listBoxMutualFriends, listBoxFriendAlbums, textBoxPostFriend, labelAlbumName, panelPhotos,
                                             buttonSlideshow, labelFriendInfo);
     }));
 }
 private void closeAllComponents()
 {
     this.Invoke(new Action(() =>
     {
         UILogicHelper.MakeControlsInvisible(createdTimeLabel, createdTimeLabel1, imageAlbumLabel,
                                             imageAlbumPictureBox, nameLabel, nameLabel1, forFriendsListBoxLabel, forAlbumsListBoxLabel,
                                             pictureBoxLargeFoto, buttonClosePicture, textBoxPost, listBoxAlbums, listBoxFriends,
                                             panelPhotos, labelAlbumName, buttonSlideshow);
     }));
 }
 private void fillPostPanel(FacebookObjectCollection <Post> i_Posts)
 {
     loadingLabel.Invoke(new Action(() => UILogicHelper.MakeControlsInvisible(loadingLabel)));
     foreach (Post post in i_Posts)
     {
         if (post != null)
         {
             Panel panel = generatePostPanel();
             addPostComponentsToPanel(panel, post.Comments, post.CreatedTime, post.From, post.LikedBy, post.Message,
                                      post.PictureURL, post.Place, post.TaggedUsers);
             m_CurrPostPanelLocationY += panel.Height + 15;
             this.Invoke(new Action(() => this.Controls.Add(panel)));
         }
     }
 }