Exemplo n.º 1
0
 private void SearchLabel_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
 {
     SearchForm search = new SearchForm();
     search.Size = this.Size;
     search.Location = this.Location;
     search.Show();
     this.Close();
 }
Exemplo n.º 2
0
        private void loginButton_Click(object sender, EventArgs e)
        {
            Boolean successful = Program.Login(userNameText.Text.Trim(), passwordTextBox.Text.Trim());

            if( successful )
            {
                SearchForm searchForm = new SearchForm();
                searchForm.Location = this.Location;
                searchForm.Show();
                this.Visible = false;
            } else
            {
                MessageBox.Show("Password and username do not match our records");
            }

        }
Exemplo n.º 3
0
 private void AnonymousButton_Click(object sender, EventArgs e)
 {
     if (birthYearText.Text.Trim().Length == 4)
     {
         if (birthYearText.Text.Trim().All(char.IsDigit))
         {
             SearchForm searchForm = new SearchForm();
             searchForm.Location = this.Location;
             searchForm.Show();
             this.Visible = false;
         }
         else
         {
             MessageBox.Show("Birthdate must be four digits only");
         }
     }
     else
     {
         MessageBox.Show("Birthdate must be four digits only");
     }
 }