public void SwitchForms(FacebookForm i_FormToClose, FacebookForm i_FormToShow) { if (i_FormToClose != i_FormToShow) { i_FormToClose.Close(); new Thread(() => AppManager.ShowForm(i_FormToShow)).Start(); } }
public static void OnFormClosing(object sender, FormClosingEventArgs e) { FacebookForm senderForm = sender as FacebookForm; senderForm.GetSettings(ref m_AppSettings); if (senderForm.DialogResult == DialogResult.Cancel) { m_AppSettings.SaveToFile(); } }
public static void OnLoginLogoutButtonClicked(FacebookForm i_SenderForm) { if (!v_LoggedIn) { login(); loggedIn(); } else { m_AppSettings.LastAccessToken = null; m_AppSettings.SaveToFile(); MessageBox.Show("Good Bye...", "Logged Out", MessageBoxButtons.OK, MessageBoxIcon.Information); System.Environment.Exit(1); } }
public static void ShowForm(FacebookForm i_FacebookForm) { i_FacebookForm.SetSettings(m_AppSettings); i_FacebookForm.ShowDialog(); }
public static void OnProfileButtonClicked(FacebookForm i_SenderForm) { m_SwitchFormsVisitor.SwitchForms(i_SenderForm, m_ProfileForm); }
public static void OnMatchFinderButtonClicked(FacebookForm i_SenderForm) { m_SwitchFormsVisitor.SwitchForms(i_SenderForm, m_MatchFinderForm); }
public static void OnFriendsAndAlbumsButtonClicked(FacebookForm i_SenderForm) { m_SwitchFormsVisitor.SwitchForms(i_SenderForm, m_FriendsAndAlbumsForm); }