Exemplo n.º 1
0
 private void submitBtn_Click(object sender, EventArgs e)
 {
     string[] arr = { firstNameBox.Text, lastNameBox.Text, usernameBox.Text, passwordBox.Text };
     bool check = true;
     for(int i = 0; i < arr.Length; i++)
     {
         if(tools.validateString(arr[i]) == false)
         {
             check = false;
             break;
         }
     }
     if (check == true)
     {
         Program.user.firstName = arr[0];
         Program.user.lastName = arr[1];
         Program.user.username = arr[2];
         Program.user.password = arr[3];
         loginForm ss = new loginForm();
         this.Close();
         ss.Show();
     }
     else
         MessageBox.Show("Error: Please don't use any spaces, special character. Limit of value cannot exceed from 10 characters");
 }
Exemplo n.º 2
0
 // exit_button Test
 private void exitBtn_Click(object sender, EventArgs e)
 {
     loginForm ss = new loginForm();
     Close();
     ss.Show();
 }