private void goButton_Click(object sender, EventArgs e) { textResults = new TextSearchResults(); n = listBoxFinal.GetItemText(listBoxFinal.SelectedItem).ToString(); textResults.setExhibit(n); textResults.setPicture(); textResults.Show(); textResults.label2.Text = n; }
private void searchButton_Click(object sender, EventArgs e) { if (textExhibit.Text != "") { if (textExhibit.Text.Equals("Syria", StringComparison.InvariantCultureIgnoreCase)) { textResults = new TextSearchResults(); n = "Syria: A Conflict Explored"; textResults.setExhibit(n); textResults.setPicture(); textResults.Show(); textResults.label2.Text = n; } else if (textExhibit.Text.Equals("Wyndham", StringComparison.InvariantCultureIgnoreCase)) { textResults = new TextSearchResults(); n = "Wyndham: Art, Life, War"; textResults.setExhibit(n); textResults.setPicture(); textResults.Show(); textResults.label2.Text = n; } else if (textExhibit.Text.Equals("Main", StringComparison.InvariantCultureIgnoreCase)) { textResults = new TextSearchResults(); n = "Main Exhibition Space"; textResults.setExhibit(n); textResults.setPicture(); textResults.Show(); textResults.label2.Text = "Main Exhibition Space"; } else if (textExhibit.Text.Equals("Big", StringComparison.InvariantCultureIgnoreCase)) { textResults = new TextSearchResults(); n = "Big Picture Show"; textResults.setExhibit(n); textResults.setPicture(); textResults.Show(); textResults.label2.Text = "Big Picture Show"; } else if (textExhibit.Text.Equals("Mixing it", StringComparison.InvariantCultureIgnoreCase)) { textResults = new TextSearchResults(); n = "Mixing It: The Changing Faces of Wartime Britain"; textResults.setExhibit(n); textResults.setPicture(); textResults.Show(); textResults.label2.Text = "Mixing it"; } else if (textExhibit.Text.Equals("Architecture", StringComparison.InvariantCultureIgnoreCase)) { textResults = new TextSearchResults(); n = "Architecture"; textResults.setExhibit(n); textResults.setPicture(); textResults.Show(); textResults.label2.Text = "Architecture"; } else { MessageBox.Show("We cannot find the exhibit you are looking for"); } } else { MessageBox.Show("You haven't typed any search criteria"); } }