Example #1
0
 private void IsSuccessfulLogin(LoginWindow loginWindow)
 {
     if (loginWindow.Successful)
     {
         SetUserName(loginWindow.UserName);
         SetUserStatus(UserStatuses.Online);
         RememberLoginAndPassword(loginWindow.GetPassword());
         Update();
     }
 }
Example #2
0
 private void Login()
 {
     LoginWindow loginWindow = new LoginWindow();
     loginWindow.Owner = this;
     loginWindow.ShowDialog();
     IsSuccessfulLogin(loginWindow);
 }
Example #3
0
 private void AutoLogin()
 {
     if (Properties.Settings.Default.RememberLogin)
     {
         LoginWindow loginWindow = new LoginWindow();
         loginWindow.TryLogin(Properties.Settings.Default.Login, Properties.Settings.Default.Password);
         IsSuccessfulLogin(loginWindow);
     }
 }