private void _login_Done(object sender, AuthorizeResponse e) { _authorizeResponse = e; _login.Done -= _login_Done; _login.Close(); LoginDone?.Invoke(sender, e); }
public UserLoginResult Login() { LoginDate = DateTime.Now; IsLogged = true; UpdateLoginDate(Id, LoginDate); LoginDone?.Invoke(LoginName); return(UserLoginResult.Failed); }
private void OnLogin(object sender, LoginEventArgs args) { var user = _manager.GetUser(args.Lastname, args.Degree); if (user != null) { LoginDone?.Invoke(this, new EventArgs()); CurrentUser = user; CreateMainForm(); } else { MessageBox.Show("Lastname or degree is incorrect.", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); } }
//функция логина private void LoginHandler(string InputMessage) { DataStorage.Instance.Login = JsonConvert.DeserializeObject <ResponseLoginClass>(InputMessage); LoginDone?.Invoke(this, JsonConvert.DeserializeObject <ResponseLoginClass>(InputMessage)); }