/// <summary> /// 9 April 2014 /// Jonathan Sanborn /// /// Constructor for an Assignment Session /// </summary> /// <param name="mmControl">The Control Object</param> /// <param name="assign">The Assignment for this session</param> internal CtrlMathDrill(CtrlStudent mmControl, Student currentStudent) { init(); parentControl = mmControl; //loggedInStudent = new Student(); loggedInStudent = currentStudent; assignmentAttempt = new AssignmentAttempt(); studentDrillForm = new frmStudentDrill(this); studentResultForm = new frmDrillResult(this); }
/// <summary> /// Jonathan Sanborn & Harvey Mercado /// Displays the Results form to the user /// </summary> /// <param name="sender">The object that raised this event</param> /// <param name="e">The event arguments</param> public void DisplayResults(object sender, EventArgs e) { Button btn = sender as Button; TextBox txt = sender as TextBox; if (btn != null) { Form myForm = btn.FindForm(); myForm.Hide(); myForm.Close(); StudentResultForm = new frmDrillResult(this); StudentResultForm.ShowDialog(); } else if (txt != null) { Form myForm = txt.FindForm(); myForm.Hide(); myForm.Close(); StudentResultForm = new frmDrillResult(this); StudentResultForm.ShowDialog(); } }