Пример #1
0
        private void pictureBox4_Click(object sender, EventArgs e)
        {
            Korisnici_ k = new Korisnici_();

            if (k.login(user_name.Text, password.Text))
            {
                Naslovna n = new Naslovna(user_name.Text);
                this.Hide();
                n.ShowDialog();
            }
            else
            {
                MessageBox.Show("Pogresno korisnicko ime ili sifra!");
            }

            user_name.Clear();
            password.Clear();
        }
Пример #2
0
 private void password_KeyDown(object sender, KeyEventArgs e)
 {
     if (e.KeyCode == Keys.Enter)
     {
         Korisnici_ k = new Korisnici_();
         if (k.login(user_name.Text, password.Text))
         {
             Naslovna n = new Naslovna(user_name.Text);
             this.Hide();
             n.ShowDialog();
         }
         else
         {
             MessageBox.Show("Pogresno korisnicko ime ili sifra!");
             user_name.Clear();
             password.Clear();
         }
     }
     panel8.BackColor = Color.DeepSkyBlue;
 }