Example #1
0
        private void btnok_Click(object sender, EventArgs e)
        {
            AuthenticationServices.AuthenticationUser(tbusername.Text, tbpassword.Text);

            if (AuthenticationServices.LoggedUser != null)
            {
                DialogResult = DialogResult.OK;
                return;
            }
            else
            {
                MessageBox.Show("Invalid user",
                                "Authentication",
                                MessageBoxButtons.OK,
                                MessageBoxIcon.Asterisk,
                                MessageBoxDefaultButton.Button1);
            }
        }