예제 #1
0
 public Form1()
 {
     InitializeComponent();
     SidePanel.Height = button1.Height;
     SidePanel.Top    = button1.Top;
     SidePanel.BringToFront();
     login2.BringToFront();
     textUsername.BringToFront();
     textPasswors.BringToFront();
     btnIniciaSesion.BringToFront();
     alert.BringToFront();
     alert.Hide();
     Alert3.Hide();
 }
예제 #2
0
 private void button14_Click(object sender, EventArgs e)
 {
     if (!allowed)
     {
         alert.Hide();
         alert2.Hide();
         Alert3.BringToFront();
         Alert3.Show();
     }
     else
     {
         alert.Hide();
         alert2.Hide();
         Alert3.Hide();
         integrantesCustomControl11.BringToFront();
         SidePanel.Hide();
     }
 }
예제 #3
0
        private void Login(string username, string password)
        {
            for (int i = 0; i < user.Length; i++)
            {
                if (user[i].Contains(username) && contra[i].Contains(password))
                {
                    alert.Hide();
                    Alert3.Hide();
                    alert2.Hide();

                    allowed = true;
                    firstCustomControl2.BringToFront();
                }
                else
                {
                    alert.BringToFront();
                    alert.Show();
                }
            }
        }
예제 #4
0
 private void button2_Click(object sender, EventArgs e)
 {
     if (!allowed)
     {
         alert.Hide();
         alert2.Hide();
         Alert3.BringToFront();
         Alert3.Show();
     }
     else
     {
         alert.Hide();
         alert2.Hide();
         Alert3.Hide();
         SidePanel.Show();
         SidePanel.Height = button2.Height;
         SidePanel.Top    = button2.Top;
         mySecondCustmControl11.BringToFront();
     }
 }
예제 #5
0
 //Checkeando si se puede traer al frente los demas componentes
 private void button1_Click(object sender, EventArgs e)
 {
     if (!allowed)
     {
         alert.Hide();
         alert2.Hide();
         Alert3.BringToFront();
         Alert3.Show();
     }
     else
     {
         alert.Hide();
         alert2.Hide();
         Alert3.Hide();
         SidePanel.Show();
         SidePanel.Height = button1.Height;
         SidePanel.Top    = button1.Top;
         firstCustomControl2.BringToFront();
     }
 }
예제 #6
0
        //Evento de click al boton de inicio de sesion


        private void btnIniciaSesion_Click(object sender, EventArgs e)
        {
            string username = textUsername.Text.Trim();
            string password = textPasswors.Text.Trim();

            bool emptyTextBoxes = CheckIfEmpty(username, password);

            if (emptyTextBoxes)
            {
                alert.Hide();
                Alert3.Hide();
                alert2.BringToFront();
                alert2.Show();
            }
            else
            {
                alert.Hide();
                alert2.Hide();
                Alert3.Hide();

                Login(username, password);
            }
        }