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(); } }
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(); } }