Beispiel #1
0
        public void SignIn(string emailTxt, string passwordTxt)
        {
            mailService.ConnectingToIMAPService(emailTxt, passwordTxt);

            if (mailService.AuthenticateIsCorrect())
            {
                InboxWindow inboxWindow = new InboxWindow(mailService);
                inboxWindow.Show();
            }
            else
            {
                throw new ArgumentException();
            }
        }
Beispiel #2
0
        public void SignIn(string emailTxt, string passwordTxt, CheckBox stayLoggedIn)
        {
            mailService.ConnectingToIMAPService(emailTxt, passwordTxt);
            if (mailService.AuthenticateIsCorrect())
            {
                if ((bool)stayLoggedIn.IsChecked)
                {
                    CredentialServiceObject.SaveCredentials(emailTxt, passwordTxt);
                }

                InboxWindow inboxWindow = new InboxWindow(mailService);
                inboxWindow.Show();
            }
            else
            {
                throw new ArgumentException();
            }
        }