Beispiel #1
0
 private void horoscopeButton_Click(object sender, EventArgs e)
 {
     UIRunner.HideCurrentForm();
     UIRunner.OpenForm <HoroscopeForm>();
     //After previous screen is closed
     UIRunner.OpenForm <MainForm>();
 }
Beispiel #2
0
 private void uploadStatisticsButton_Click(object sender, EventArgs e)
 {
     UIRunner.HideCurrentForm();
     UIRunner.OpenForm <LikesDistributionForm>();
     //After previous screen is closed
     UIRunner.OpenForm <MainForm>();
 }
Beispiel #3
0
        private void loginAndInit()
        {
            bool   isLoginSucceeded = false;
            string accessToken      = null;

            try
            {
                isLoginSucceeded = FBAgent.LoginAndInit(out accessToken);
                if (isLoginSucceeded)
                {
                    isLoginSucceeded = true;
                    UIRunner.HideCurrentForm();
                    UIRunner.OpenForm <MainForm>();
                    setRememberMeChoise(accessToken);
                }
                else
                {
                    throw new Exception();
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show("Something occur, please try again!");
            }
        }
Beispiel #4
0
 private void logoutButton_Click(object sender, EventArgs e)
 {
     AppSettings.Instance.RememberUser    = false;
     AppSettings.Instance.LastAccessToken = null;
     AppSettings.Instance.SaveToFile();
     UIRunner.HideCurrentForm();
     UIRunner.OpenForm <LoginForm>();
 }