Exemplo n.º 1
0
 public PasswordRecovery(AuthServerClient client, LoginForm form)
 {
     InitializeComponent();
     this.client    = client;
     this.loginForm = form;
     client.passRecovery_Successfull += OnSuccess;
     client.passRecovery_WrongEmail  += OnWrongEmail;
 }
Exemplo n.º 2
0
 public RegisterForm(AuthServerClient client, LoginForm form)
 {
     InitializeComponent();
     this.client                     = client;
     this.loginForm                  = form;
     client.reg_OK                  += OnSuccess;
     client.reg_EmailExists         += OnWrongEmail;
     client.reg_UsernameExists      += OnWrongUsername;
     client.reg_EmailUsernameExists += OnWrongEmailUsername;
 }
Exemplo n.º 3
0
        public LoginForm()
        {
            InitializeComponent();
            authClient = new AuthServerClient();
            authClient.login_Successfull   += OnLoginSuccessfull;
            authClient.login_WrongPassword += OnWrongPassword;
            authClient.login_WrongUsername += OnWrongUsername;


            ResponseHandler.loginSuccessfull += (login) => this.Invoke(new Action <string>(On_LoginUser), login);
            ResponseHandler.loggedAsAdmin    += (login) => this.Invoke(new Action <string>(On_LoginAdmin), login);
            ResponseHandler.loggedBanned     += (login) => this.Invoke(new Action <string>(On_LoginBanned), login);
            ResponseHandler.loginFail        += (msg) => this.Invoke(new Action <string>(On_LoginError), msg);

            Client.ConnectionOpened += () => RequestManager.Login(this.key);
        }