/// <summary> /// 加载CELST模块 /// </summary> private void LoadCELST() { // CELSTTempPaper tempPaper = preData.dataMemory; memoryData = preData.dataMemory; LuoHaoExamPaper lhep = preData.dataPaper; string file = File.ReadAllText(memoryData.dataPath); celstTempPaper = JsonUtility.FromJson <CELSTTempPaper>(file); if (paperCheakerCELSTACtrl.InitA( lhep.paper.path + "/" + lhep.paper.parta_video_name, celstTempPaper.partA, lhep.paper.parta_text))//初始化A { cheakingBehaviors.Add(paperCheakerCELSTACtrl); } if (paperCheakerCELSTBCtrl.InitB(lhep.paper.partb_keyword_question, celstTempPaper.partBA, lhep.paper.partb_keyword_anser, celstTempPaper.partBB )) { cheakingBehaviors.Add(paperCheakerCELSTBCtrl); } if (paperCheakerCELSTCCtrl.InitC(lhep.paper.partc_keyword_story, celstTempPaper.partC)) { cheakingBehaviors.Add(paperCheakerCELSTCCtrl); } cheakingBehaviors.Add(paperCheakerCELSTFinish);//完成界面 //Forward(); InitGlobalNav(); }
/// <summary> /// 读取 /// </summary> /// <param name="miic"></param> public void OpenWindowsToRead(MemoryInfoItemCtrl miic) { try { ctrlPanel.SetActive(true); // reportText.text = "正在加载报告..."; reportText.text = ""; tempObject = miic.common; tempObjectID = miic.memoryID; switch (miic.common.type) { case UserMemoryList.MemoryType.GD_CELST: string file = File.ReadAllText(miic.common.dataPath); CELSTTempPaper tempPaper = JsonUtility.FromJson <CELSTTempPaper>(file); LuoHaoExamPaper lhep = PaperManager.allDownloadedPaperFile[tempPaper.id]; lhep.paper.path = PaperManager.allDownloadedPath[tempPaper.id]; thisExamPaper = lhep; int totalGrade = 0; int maxGrade = 0; reportText.text += "#" + lhep.paper.id + "#" + lhep.paper.name + "-" + lhep.paper.type + "\n";//头部信息 if (!string.IsNullOrEmpty(tempPaper.partA)) { reportText.text += GetGradeDescript("PartA模仿朗读", tempPaper.gradeA) + "\n"; if (tempPaper.gradeA != -1) { totalGrade += tempPaper.gradeA; } maxGrade += 20; } string[] audioBA = tempPaper.partBA.Split('|'); for (int i = 0; i < tempPaper.gradeBA.Length; i++) { if (audioBA.Length > i && !string.IsNullOrEmpty(audioBA[i])) { reportText.text += GetGradeDescript("PartB三问第" + (i + 1).ToString() + "题", tempPaper.gradeBA[i]) + "\n"; if (tempPaper.gradeBA[i] != -1) { totalGrade += tempPaper.gradeBA[i]; } maxGrade += 2; } } string[] audioBB = tempPaper.partBB.Split('|'); for (int i = 0; i < tempPaper.gradeBB.Length; i++) { if (audioBB.Length > i && !string.IsNullOrEmpty(audioBB[i])) { reportText.text += GetGradeDescript("PartB五答第" + (i + 1).ToString() + "题", tempPaper.gradeBB[i]) + "\n"; if (tempPaper.gradeBB[i] != -1) { totalGrade += tempPaper.gradeBB[i]; } maxGrade += 2; } } if (!string.IsNullOrEmpty(tempPaper.partC)) { reportText.text += GetGradeDescript("PartC故事复述", tempPaper.gradeC) + "\n"; if (tempPaper.gradeC != -1) { totalGrade += tempPaper.gradeC; } maxGrade += 24; } reportText.text += "总分(左所得/右满分):" + totalGrade + " / " + maxGrade; break; case UserMemoryList.MemoryType.CETB4B6: GlobalUIManager.guim.CreateNewDialogBox("Sorry!该模式还在开发中!"); break; default: GlobalUIManager.guim.CreateNewSelectBox("读取本地内存记录时出现错误!是否删除?", delegate(bool ok) { if (ok) { DeleteObj(); } }); break; } reportText.text += ""; } catch { // CloseWindows(); GlobalUIManager.guim.CreateNewSelectBox("读取本地内存记录失败!可能是由于试卷已被删除导致记录丢失!是否删除?", delegate(bool ok) { if (ok) { DeleteObj(); } else { CloseWindows(); } }); } }