public void SwitchForms(FacebookForm i_FormToClose, FacebookForm i_FormToShow)
 {
     if (i_FormToClose != i_FormToShow)
     {
         i_FormToClose.Close();
         new Thread(() =>
                    AppManager.ShowForm(i_FormToShow)).Start();
     }
 }
Exemple #2
0
        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();
            }
        }
Exemple #3
0
 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);
     }
 }
Exemple #4
0
 public static void ShowForm(FacebookForm i_FacebookForm)
 {
     i_FacebookForm.SetSettings(m_AppSettings);
     i_FacebookForm.ShowDialog();
 }
Exemple #5
0
 public static void OnProfileButtonClicked(FacebookForm i_SenderForm)
 {
     m_SwitchFormsVisitor.SwitchForms(i_SenderForm, m_ProfileForm);
 }
Exemple #6
0
 public static void OnMatchFinderButtonClicked(FacebookForm i_SenderForm)
 {
     m_SwitchFormsVisitor.SwitchForms(i_SenderForm, m_MatchFinderForm);
 }
Exemple #7
0
 public static void OnFriendsAndAlbumsButtonClicked(FacebookForm i_SenderForm)
 {
     m_SwitchFormsVisitor.SwitchForms(i_SenderForm, m_FriendsAndAlbumsForm);
 }