private void btnAdv_Click(object sender, EventArgs e) { //on button press you Graduate advCert = degrees.graduate.Find(x => x.degreeName.Contains("graduate advanced certificates")); AdvCertForm acf = new AdvCertForm(advCert.availableCertificates[0], advCert.availableCertificates[1]); acf.ShowDialog(); }
// this is for grad info private void tcDegrees_SelectedIndexChanged(object sender, EventArgs e) { ListViewItem item; if (gradInfo) { //ist Graduate ist = degrees.graduate.Find(x => x.degreeName.Contains("ist")); lblISTTitle.Text = ist.title; lblISTDesc.Text = ist.description; for (int i = 0; i < ist.concentrations.Count; i++) { item = new ListViewItem(new String[] { ist.concentrations[i] }); lvIST.Items.Add(item); } //hci Graduate hci = degrees.graduate.Find(x => x.degreeName.Contains("hci")); lblHCITitle.Text = hci.title; lblHCIDesc.Text = hci.description; for (int i = 0; i < hci.concentrations.Count; i++) { item = new ListViewItem(new String[] { hci.concentrations[i] }); lvHCI.Items.Add(item); } //nsa Graduate nsa = degrees.graduate.Find(x => x.degreeName.Contains("nsa")); lblNSATitle.Text = nsa.title; lblNSADesc.Text = nsa.description; for (int i = 0; i < nsa.concentrations.Count; i++) { item = new ListViewItem(new String[] { nsa.concentrations[i] }); lvNSA.Items.Add(item); } //set boolean to false so that it doesn;t keep adding info. gradInfo = false; } }