private void SearchLabel_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e) { SearchForm search = new SearchForm(); search.Size = this.Size; search.Location = this.Location; search.Show(); this.Close(); }
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"); } }
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"); } }