private void btnMahasiswa_Click(object sender, EventArgs e) { if (selected != 4) { closeCurrentForm(); mhsForm = new MhsForm(); selected = 4; mhsForm.MdiParent = this; mhsForm.Show(); } }
/* * Variable 'selected' is used to give each menu an index * Profile = 1 * Absensi = 2 * Nilai = 3 * Mahasiswa = 4 * Dosen = 5 * Mata Kuliah = 6 * */ public BaseForm(int role) { InitializeComponent(); mhsForm = new MhsForm(); BaseForm.role = role; }