public PasswordRecovery(AuthServerClient client, LoginForm form) { InitializeComponent(); this.client = client; this.loginForm = form; client.passRecovery_Successfull += OnSuccess; client.passRecovery_WrongEmail += OnWrongEmail; }
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; }
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); }