コード例 #1
0
        private void lblBack_Click(object sender, EventArgs e)
        {
            this.Hide();
            frmHome h = new frmHome();

            h.Show();
        }
コード例 #2
0
ファイル: frmLogin.cs プロジェクト: ZambrOvosky/3INFO-JV
        private void btnLogIn_Click(object sender, EventArgs e)
        {
            string usuario = txtUser.Text;
            string senha   = txtPass.Text;

            if (usuario == "leleo" && senha == "leleo123")
            {
                this.Close();
                frmHome Menu = new frmHome();
                Menu.Show();
                Menu.lblConnectedUser.Text = Strings.ConnectedUser + " Leonardo Nogueira";
            }
            else if (usuario == "jailson" && senha == "jailson123")
            {
                this.Close();
                frmHome Menu = new frmHome();
                Menu.Show();
                Menu.lblConnectedUser.Text = Strings.ConnectedUser + " Jailson Mendes";
            }
            else
            {
                lblErro.Visible       = true;
                pbxBasePass.BackColor = Color.FromArgb(220, 0, 0);
                pbxBaseUser.BackColor = Color.FromArgb(220, 0, 0);
                txtPass.Clear();
                txtPass.UseSystemPasswordChar = false;
                txtPass.ForeColor             = Color.FromArgb(120, 120, 120);
                txtPass.Text = "Password";
                if (txtUser.Text == "Username")
                {
                    txtUser.Focus();
                }
                else
                {
                    txtPass.Focus();
                }
            }
        }