Example #1
0
 private void gradeSection(int sectionCode, Bitmap stretched, Sectionizer testSections, ExamSpecifics exam, double avRadius)
 {
     if (sectionCode == 0)
     {
         LineScannerSC    prelines = new LineScannerSC(testSections.studentCondition, avRadius);
         StudentCondition section1 = new StudentCondition(prelines.lineX, prelines.lineY, stretched, exam, avRadius);
         section1.scoreSection(stretched); // should be in a worker thread
         scannedScores[sectionCode] = (section1);
     }
     if (sectionCode == 1)
     {
         LineScannerMC   prelines = new LineScannerMC(testSections.multipleChoice, avRadius);
         Multiple_Choice section1 = new Multiple_Choice(prelines.lineX, prelines.lineY, stretched, exam, avRadius);
         section1.scoreSection(stretched); // should be in a worker thread
         scannedScores[sectionCode] = (section1);
     }
     else if (sectionCode == 2)
     {
         LineScannerPairing prelines = new LineScannerPairing(testSections.pairing, avRadius);
         Pairing            section2 = new Pairing(prelines.lineX, prelines.lineY, stretched, exam, avRadius);
         section2.scoreSection(stretched); // should be in a worker thread
         scannedScores[sectionCode] = (section2);
     }
     else if (sectionCode == 3)
     {
         LineScannerTF prelines = new LineScannerTF(testSections.trueFalse, avRadius);
         True_False    section3 = new True_False(prelines.lineX, prelines.lineY, stretched, exam, avRadius);
         section3.scoreSection(stretched); // should be in a worker thread
         scannedScores[sectionCode] = (section3);
     }
     else if (sectionCode == 4)
     {
         LineScannerCompletion prelines = new LineScannerCompletion(testSections.completion, avRadius);
         Completion            section4 = new Completion(prelines.lineX, prelines.lineY, stretched, exam, avRadius);
         section4.scoreSection(stretched); // should be in a worker thread
         scannedScores[sectionCode] = (section4);
     }
     else if (sectionCode == 5)
     {
         LineScannerSubjective prelines = new LineScannerSubjective(testSections.subjective, avRadius);
         Subjective            section4 = new Subjective(prelines.lineX, prelines.lineY, stretched, exam, avRadius);
         section4.scoreSection(stretched); // should be in a worker thread
         scannedScores[sectionCode] = (section4);
     }
 }