private void performLogin() { bool reLogin = false; if (ConnectFB == null) { ConnectFB = ConnectFB.Instance; reLogin = true; } ConnectFB.OpenNewConnection(); if (checkBoxRememberMe.Checked == true) { saveSettings(); } this.DialogResult = DialogResult.OK; this.Dispose(); if (reLogin == true) { FormMainPage mainPage = new FormMainPage(ConnectFB.LoggedInUser); StartApp.MainPage = mainPage; mainPage.ShowDialog(); } }
public void StartRun() { m_AppSettings.LoadFromFile(); if (m_AppSettings.RememberMe == true) { try { m_ConnectFB.OpenExistingConnection(m_AppSettings.LastAccessToken); } catch (Exception) { m_FormLogin.ConnectFB = m_ConnectFB; m_FormLogin.ShowDialog(); } } else { m_FormLogin.ConnectFB = m_ConnectFB; m_FormLogin.ShowDialog(); } if (m_ConnectFB.LoggedInUser != null) { MainPage = new FormMainPage(m_ConnectFB.LoggedInUser); MainPage.ShowDialog(); } }