示例#1
0
        private void _login_Done(object sender, AuthorizeResponse e)
        {
            _authorizeResponse = e;
            _login.Done       -= _login_Done;
            _login.Close();

            LoginDone?.Invoke(sender, e);
        }
示例#2
0
文件: User.cs 项目: nozilg/TraMaAuth
 public UserLoginResult Login()
 {
     LoginDate = DateTime.Now;
     IsLogged  = true;
     UpdateLoginDate(Id, LoginDate);
     LoginDone?.Invoke(LoginName);
     return(UserLoginResult.Failed);
 }
示例#3
0
        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);
            }
        }
示例#4
0
 //функция логина
 private void LoginHandler(string InputMessage)
 {
     DataStorage.Instance.Login = JsonConvert.DeserializeObject <ResponseLoginClass>(InputMessage);
     LoginDone?.Invoke(this, JsonConvert.DeserializeObject <ResponseLoginClass>(InputMessage));
 }