private void doForgetMe()
        {
            DialogResult shouldLogout = MessageBoxHandler.ShowUserMessageBoxWithResponse("Are you sure you want to be forgoten? \n next time you use the app you will need to connect again", "WARNING", MessageBoxButtons.YesNo, MessageBoxIcon.Warning);

            if (shouldLogout == DialogResult.Yes)
            {
                m_AppSettings.DeleteAppSettingsFile();
                m_AppSettings.RememberUser = false;
            }

            MessageBoxHandler.ShowUserInformationMessageBox("You where forrgoten!", "Success!");
        }
        private void LogOutButton_Click(object sender, EventArgs e)
        {
            DialogResult shouldLogout = MessageBoxHandler.ShowUserMessageBoxWithResponse("Are you sure you want to log out?", "WARNING", MessageBoxButtons.YesNo, MessageBoxIcon.Warning);

            if (shouldLogout == DialogResult.Yes)
            {
                m_AppSettings.DeleteAppSettingsFile();
                m_AppSettings.RememberUser = false;
                m_TryingToLogout           = true;
                this.Hide();
                LoginForm loginForm = new LoginForm();
                loginForm.Show();
            }
        }
 private void uploadPost()
 {
     if (!string.IsNullOrEmpty(textBoxPostDetails.Text))
     {
         try
         {
             r_FacebookManager.UploadPost(textBoxPostDetails.Text);
         }
         catch (Exception)
         {
             MessageBoxHandler.ShowUserErrorMessageBox("Unable to upload post, Exception caught", "Error");
         }
     }
     else
     {
         MessageBoxHandler.ShowUserInformationMessageBox("Please fill in your post status", "Missing Details");
     }
 }
        protected override void OnFormClosing(FormClosingEventArgs e)
        {
            base.OnFormClosing(e);
            if (!m_TryingToLogout && !e.CloseReason.Equals(CloseReason.ApplicationExitCall))
            {
                DialogResult userWantToExit = MessageBoxHandler.ShowUserMessageBoxWithResponse("Are you sure you want to exit?", "WARNING", MessageBoxButtons.YesNo, MessageBoxIcon.Warning);
                if (userWantToExit == DialogResult.Yes)
                {
                    if (m_AppSettings.RememberUser)
                    {
                        saveUserSettings();
                    }

                    Application.Exit();
                }
                else
                {
                    e.Cancel = true;
                }
            }
        }
 private void checkIfBirthdayIsCorrect()
 {
     if (m_GeneratedFriend != null)
     {
         DateTime myDate = DateTime.ParseExact(m_GeneratedFriend.Birthday, "MM/dd/yyyy", null);
         if (birthDatePickTime.Value.Year == myDate.Year &&
             birthDatePickTime.Value.Month == myDate.Month &&
             birthDatePickTime.Value.Day == myDate.Day)
         {
             MessageBoxHandler.ShowUserInformationMessageBox("You are right, you really know your friends!!", "Success");
         }
         else if (birthDatePickTime.Value.Year == myDate.Year &&
                  birthDatePickTime.Value.Month == myDate.Month)
         {
             MessageBoxHandler.ShowUserInformationMessageBox("You were close, you got the year and month correctly..", "Almost");
         }
         else
         {
             MessageBoxHandler.ShowUserInformationMessageBox("You are wrong...", "Wrong answer");
         }
     }
 }
Exemple #6
0
 private void showUnableToFetchMessage()
 {
     MessageBoxHandler.ShowUnableToFetchMessageBox();
 }
Exemple #7
0
 private void showUnableToFetchMessage(string i_Title)
 {
     MessageBoxHandler.ShowUnableToFetchMessageBox(i_Title);
 }
        private void showAllLikes()
        {
            int totalLikes = r_FacebookManager.GetAmountOfLikes();

            MessageBoxHandler.ShowUserInformationMessageBox("Total Likes:\n" + totalLikes, "Your Likes");
        }