private void lbl_g_ist_Click(object sender, EventArgs e) { minorsForm Deginfo = new minorsForm(); Label d = (Label)sender; if (d.Name == "lbl_g_ist") { Deginfo.mntitle = degrees.graduate[0].title; Deginfo.mncourses = degrees.graduate[0].concentrations; Deginfo.mndesc = degrees.graduate[0].description; } else if (d.Name == "lbl_g_hci") { Deginfo.mntitle = degrees.graduate[1].title; Deginfo.mncourses = degrees.graduate[1].concentrations; Deginfo.mndesc = degrees.graduate[1].description; } else { Deginfo.mntitle = degrees.graduate[2].title; Deginfo.mncourses = degrees.graduate[2].concentrations; Deginfo.mndesc = degrees.graduate[2].description; } Deginfo.Show(); }
//show 2nd form with details based on the click of degrees private void lbl_MDD_Click(object sender, EventArgs e) { minorsForm info = new minorsForm(); Label l = (Label)sender; if (l.Name == "lbl_MDD") { info.mntitle = minors.UgMinors[0].title; info.mncourses = minors.UgMinors[0].courses; info.mnnote = minors.UgMinors[0].note; info.mndesc = minors.UgMinors[0].description; } else if (l.Name == "lbl_MG") { info.mntitle = minors.UgMinors[1].title; info.mncourses = minors.UgMinors[1].courses; info.mnnote = minors.UgMinors[1].note; info.mndesc = minors.UgMinors[1].description; } else if (l.Name == "lbl_MH") { info.mntitle = minors.UgMinors[2].title; info.mncourses = minors.UgMinors[2].courses; info.mnnote = minors.UgMinors[2].note; info.mndesc = minors.UgMinors[2].description; } else if (l.Name == "lbl_MMD") { info.mntitle = minors.UgMinors[3].title; info.mncourses = minors.UgMinors[3].courses; info.mnnote = minors.UgMinors[3].note; info.mndesc = minors.UgMinors[3].description; } else if (l.Name == "lbl_MDev") { info.mntitle = minors.UgMinors[4].title; info.mncourses = minors.UgMinors[4].courses; info.mnnote = minors.UgMinors[4].note; info.mndesc = minors.UgMinors[4].description; } else if (l.Name == "lbl_MN") { info.mntitle = minors.UgMinors[5].title; info.mncourses = minors.UgMinors[5].courses; info.mnnote = minors.UgMinors[5].note; info.mndesc = minors.UgMinors[5].description; } else if (l.Name == "lbl_MWD") { info.mntitle = minors.UgMinors[6].title; info.mncourses = minors.UgMinors[6].courses; info.mnnote = minors.UgMinors[6].note; info.mndesc = minors.UgMinors[6].description; } else { info.mntitle = minors.UgMinors[7].title; info.mncourses = minors.UgMinors[7].courses; info.mnnote = minors.UgMinors[7].note; info.mndesc = minors.UgMinors[7].description; } info.Show(); }