Ejemplo n.º 1
0
        private void Btn_Login_Click(object sender, EventArgs e)
        {
            var username = Tb_UserName.Text;
            var password = Tb_Password.Text;

            var user        = new RegisterUser();
            var currentUser = user.GetCurrentUser(username);
            var pswd        = user.encodePassword(password);

            if (currentUser.Username.Equals(username) && currentUser.Password.Equals(pswd))
            {
                var main = new Main(username, Configuration);
                main.ShowDialog();
            }
            else
            {
                MessageBox.Show("Benutzername oder Password falsch!", "", MessageBoxButtons.OK, MessageBoxIcon.Hand);
            }
        }