public FrmExam(ExamineeTake examineeTake) { InitializeComponent(); _examineeTakeInfo = examineeTake; _examBLL = new ExamBLL(); _examList = _examBLL.GetActiveExamList(); _minutes = _examList.Sum(e => e.TimeLimit); _timeSpan = new TimeSpan(0, _minutes, 0); //_oneSecond = new TimeSpan(0, 0, 1); _subjectScoreList = new List <SubjectScore>(); _questionBankList = new List <QuestionBank>(); foreach (var question in _examList) { _questionBankList.AddRange(question.QuestionBank); } _examScore = 0; _index = 0; _questionNumber = 0; _counter = 0; _millisecond = 0; _doLoop = true; _examineeExamList = _examineeTakeInfo.ExamineeExam.ToList(); _examId = _examineeExamList[_index].ExamId; SetQuestion(); // set the first question }