private void loadMainAppFeatures() { try { if (m_LoggedInUser != null) { m_FormMainAppFacade = new FormMainAppFacade(m_LoggedInUser); this.Text = string.Format("Logged in as {0}", m_LoggedInUser.Name); pictureBoxUserProfile.LoadAsync(m_LoggedInUser.PictureLargeURL); new Thread(fetchBasicUserInfoAndFillLabels).Start(); new Thread(fetchTimelinePosts).Start(); new Thread(fetchUserAlbums).Start(); } } catch (Exception e) { MessageBox.Show(string.Format("Unable to load application features\n{0}", e.Message)); // force cookies deletion, restore default settings and killing the app FacebookService.Logout(null); m_AppSettings.RestoreDefault(); m_AppSettings.SaveToFile(); Process.GetCurrentProcess().Kill(); } }
private void clearAllData() { labelFullName.Text = "Name N/A"; labelBirthday.Text = "Birthday N/A"; labelGender.Text = "Gender N/A"; labelEmail.Text = "Email N/A"; pictureBoxUserProfile.Image = null; listBoxPosts.Items.Clear(); textBoxStatusSearch.Clear(); listBoxStatusSearch.Items.Clear(); richTextBoxStatusAnalyzer.Clear(); buttonThankTheUserWhoLikedYouTheMost.Enabled = false; tabControl.SelectedIndex = 0; m_FormMainAppFacade = null; m_LoggedInUser = null; }