Exemplo n.º 1
0
        private void button_logout_Click(object sender, EventArgs e)
        {
            this.Hide();
            Form_Login FLOGIN = new Form_Login();

            FLOGIN.Show();
        }
Exemplo n.º 2
0
        private void label_logout_Click(object sender, EventArgs e)
        {
            this.Close();
            Form_Login F1 = new Form_Login();

            F1.Show();
        }
Exemplo n.º 3
0
        private void label_entrar_login_Click(object sender, EventArgs e)
        {
            Form_Login FL = new Form_Login();

            FL.Show();
            this.Close();
        }
Exemplo n.º 4
0
        private void label_logout_Click(object sender, EventArgs e)
        {
            Owner.Close();
            this.Close();
            Form_Login FLOGIN = new Form_Login();

            FLOGIN.Show();
        }
Exemplo n.º 5
0
 private void button_criar_Click(object sender, EventArgs e)
 {
     if (textBox_Username.Text.Length >= 3 && textBox_Username.Text.Length <= 10)
     {
         if (textBox_Password.Text.Length >= 3 && textBox_Password.Text.Length <= 10)
         {
             if (textBox_Password.Text == textBox_ConfPassword.Text)
             {
                 if (User.Utilizador_Existe(textBox_Username.Text) == true)
                 {
                     MessageBox.Show("Username já está a ser usado.");
                 }
                 else
                 {
                     User.Criar_Utilizador(textBox_Username.Text, textBox_Password.Text);
                     MessageBox.Show("A conta foi criada.");
                     this.Close();
                     Form_Login FL = new Form_Login();
                     FL.Show();
                 }
             }
             else
             {
                 MessageBox.Show("As passwords não coincidem.");
             }
         }
         else
         {
             MessageBox.Show("O seu Username e/ou Password não tem os requesitos.");
         }
     }
     else
     {
         MessageBox.Show("O seu Username e/ou Password não tem os requesitos.");
     }
 }