Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- private void loginbutton_Click(object sender, EventArgs e)
- {
- string[] username = new string[8];
- string[] password = new string[8];
- username[0] = "user1"; password[0] = "pass1";
- username[1] = "user2"; password[1] = "pass2";
- username[2] = "user3"; password[2] = "pass3";
- username[3] = "user4"; password[3] = "pass4";
- username[4] = "user5"; password[4] = "pass5";
- username[5] = "user6"; password[5] = "pass6";
- username[6] = "user7"; password[6] = "pass7";
- username[7] = "glararan"; password[7] = "glararan";
- for (int i = 0; i < 8; i++)
- {
- if (usernamebox.Text == username[i])
- {
- if (passwordbox.Text == password[i])
- {
- MessageBox.Show("Login successful.");
- this.Hide();
- MainForm form1 = new MainForm();
- form1.Show();
- }
- else
- {
- //if(Script_generator___NPC_AI.Properties.Settings.Default.language.GetType == english)
- //{
- MessageBox.Show("Wrong password.");
- //}
- /*if(Script_generator___NPC_AI.Properties.Settings.Default.language.GetType == czech)
- {
- MessageBox.Show("Špatné heslo.");
- }*/
- Application.Exit();
- }
- }
- else
- {
- MessageBox.Show("Wrong username.Try again.");
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement