Exemplo n.º 1
0
        private void btnLogin_Click(object sender, EventArgs e)
        {
            string Resultat = compteJoueurService.Authentification(txtUserName.Text, txtPwd.Text);

            if (Resultat == "SUCCESS")
            {
                mainForm.accountDetails = compteJoueurService.GetAccountInfoByUsername(txtUserName.Text);
                EstConnecte             = true;
                mainForm.SuccessfulConnection();
                this.Close();
            }
            else if (Resultat == "NETWORKERROR")
            {
                MessageBox.Show("A network error has occured!", "Error!", MessageBoxButtons.OK, MessageBoxIcon.Warning);
            }
            else
            {
                MessageBox.Show("The username or password is incorrect!", "Error!", MessageBoxButtons.OK, MessageBoxIcon.Warning);
            }
        }