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