예제 #1
0
 private void buttonLogin_Click(object sender, EventArgs e)
 {
     if (PasswordBox.Text == DataBase.getPassword(LoginBox.Text))
     {
         this.Hide();
         GlobalVariables.login = LoginBox.Text;
         OknoProgramu oknoProgramu = new OknoProgramu();
         oknoProgramu.Show();
     }
     else
     {
         if (GlobalVariables.loginCounter == 0)
         {
             Application.Exit();
         }
         MessageBox.Show("Logowanie nieudane!\nPozostałe próby: " + GlobalVariables.loginCounter, "Błąd logowania");
         GlobalVariables.loginCounter--;
     }
 }
예제 #2
0
 public OknoSzukajKontaktu(OknoProgramu obj)
 {
     this.objj = obj;
     InitializeComponent();
     userView.MouseDoubleClick += new MouseEventHandler(userView_MouseDoubleClick);
 }