Esempio n. 1
0
 private void loginbtn_Click(object sender, EventArgs e)
 {
     int i = 0;
     bool b = false;
     while (i < memberList.membersLenght() && !b)
     {
         if (usernametxtbox.Text == memberList.find(i , 0) & PWtxtbox.Text == memberList.find(i , 1) & usernametxtbox.Text != null)
         {
             memberList.memberNrSave(usernametxtbox.Text);
             b = true; //adgang ok
             this.Hide();
             BAmenu bamenu = new BAmenu();
             bamenu.Show();
         }
         else
         {
             i++;
         }
     }
     if (i >= memberList.membersLenght())
     {
         var form = new popup();
         form.Show();
     }
 }
Esempio n. 2
0
 private void button2_Click(object sender, EventArgs e)
 {
     bArray[0] = Int32.TryParse(textBox1.Text, out membernr);
     if (textBox2.Text == textBox8.Text)
     {
         password = textBox2.Text;
         bArray[1] = true;
     }
     bArray[4] = Int32.TryParse(textBox5.Text, out age);
     bArray[5] = Int32.TryParse(textBox6.Text, out height);
     bArray[6] = Int32.TryParse(textBox7.Text, out weight);
     bool b = true;
     for (int i = 0; i < bArray.Length; i++)
     {
         if (bArray[i] == false)
         {
             b = false;
         }
     }
     if (b)
     {
         addMemberToFile();
         this.Close();
         login login = new login();
         login.Show();
     }
     else
     {
         var form = new popup();
         form.Show();
     }
 }