public static FormStudentAttendance SetGUIPlacements() { if (instance == null || instance.IsDisposed) { instance = new FormStudentAttendance(); } else { instance.BringToFront(); } return(instance); }
private void btnAddAttendance_Click(object sender, EventArgs e) { //Set the pannel height panelLeft.Height = btnAddAttendance.Height; panelLeft.Top = btnAddAttendance.Top; //Go to student Attendance form FormStudentAttendance frm = FormStudentAttendance.SetGUIPlacements(); this.Hide(); frm.Show(); }