public SubImageChoiceViewModel(Paper_ItemsItem paperSubItemDetail, int subIndex, int showIndexNum) : this() { _paperSubItemDetail = paperSubItemDetail; _subIndex = subIndex; _showIndexNum = showIndexNum; BindQsSubItemInfo(); }
public override void BeginExam(ExamFlowType nextFlowType) { if (!GlobalUser.DoAnswer) { CleanUp(); return; } Paper_ItemsItem itemInfo = PaperItems[0].items[_itemIndex]; switch (nextFlowType) { case ExamFlowType.TitleAudio: //1.播放大题题干 PromptCommandText = "听指令"; _NextFlowType = ExamFlowType.PromptAudio; PlayAudio(QsTitleAudio); break; case ExamFlowType.PromptAudio: //2.播放大题题干 提示音频, PromptCommandText = "听指令"; if (string.IsNullOrEmpty(PaperItems[0].source_content)) { _NextFlowType = ExamFlowType.QuestionAudio; BeginExam(_NextFlowType); break; } _NextFlowType = ExamFlowType.QuestionAudio; PlayAudio(PaperItems[0].source_content); break; case ExamFlowType.QuestionAudio: //3.播放 题目音频 PromptCommandText = "请听录音"; if (string.IsNullOrEmpty(itemInfo.source_content)) { _NextFlowType = ExamFlowType.PrepareTime; BeginExam(_NextFlowType); break; } PlayAudio(itemInfo.source_content); if (itemInfo.item_repet_times > 1 && itemInfo.item_repet_times > _item_repet_times) { _item_repet_times++; _NextFlowType = ExamFlowType.QuestionAudio; } else { _NextFlowType = ExamFlowType.PrepareTime; } break; case ExamFlowType.PrepareTime: //3.阅读题目 PromptCommandText = "请看题"; TotalTime = itemInfo.item_prepare_second; PlayTime = 0; SendProgress(); _NextFlowType = ExamFlowType.AnswerTime; _dTimer.Start(); break; case ExamFlowType.StartRecordAudio: //3.阅读题目 PromptCommandText = "准备录音"; _NextFlowType = ExamFlowType.AnswerTime; //PlayAudio(PaperItems[_itemIndex].source_content); PlaySysAudio(Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "Resources", "startrecord.mp3")); break; case ExamFlowType.AnswerTime: //3.阅读题目 //PromptCommandText = "开始录音"; //TotalTime = itemInfo.item_answer_second; //PlayTime = 0; //_NextFlowType = ExamFlowType.StopRecordAudio; //_Recording = RecordState.Recording; //PlayRecorder(); PromptCommandText = "开始答题"; TotalTime = itemInfo.item_answer_second; PlayTime = 0; _NextFlowType = ExamFlowType.StopRecordAudio; _Recording = RecordState.Recording; PlayRecorderWithSysAduio("startrecord"); break; case ExamFlowType.StopRecordAudio: //3.阅读题目 PromptCommandText = "停止录音"; _NextFlowType = ExamFlowType.NextQs; //PlayAudio(PaperItems[_itemIndex].source_content); PlaySysAudio(Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "Resources", "stoprecord.mp3")); break; //case ExamFlowType.AnswerTime: // //3.阅读题目 // PromptCommandText = "开始答题"; // TotalTime = itemInfo.item_answer_second; // PlayTime = 0; // _NextFlowType = ExamFlowType.NextQs; // _Recording = RecordState.Recording; // PlayRecorderWithSysAduio("startrecord"); // break; case ExamFlowType.NextQs: //记录答案 UpdateAnswer(); //3.下一题 _itemIndex++; _NextFlowType = ExamFlowType.PrepareTime; BindQsItemInfo(); break; } }
public override void BeginExam(ExamFlowType nextFlowType) { if (!GlobalUser.DoAnswer) { CleanUp(); return; } Paper_ItemsItem itemInfo = PaperItems[_infoIndex].items[_itemIndex]; switch (nextFlowType) { case ExamFlowType.TitleAudio: //1.播放大题题干 PromptCommandText = "听指令"; _NextFlowType = ExamFlowType.PromptAudio; PlayAudio(QsTitleAudio); break; case ExamFlowType.PromptAudio: //2.播放大题题干 提示音频, PromptCommandText = "听指令"; if (string.IsNullOrEmpty(PaperItems[_infoIndex].source_content)) { _NextFlowType = ExamFlowType.PrepareTime; BeginExam(_NextFlowType); break; } _NextFlowType = ExamFlowType.PromptAudio; PlayAudio(PaperItems[_infoIndex].source_content); break; case ExamFlowType.PrepareTime: //3.阅读题目 PromptCommandText = "请看题"; _prepareTime = TotalTime = itemInfo.item_prepare_second; PlayTime = 0; SendProgress(); _NextFlowType = ExamFlowType.QuestionAudio; _dTimer.Start(); break; case ExamFlowType.QuestionAudio: //3.播放 题目音频 PromptCommandText = "请听录音"; if (string.IsNullOrEmpty(itemInfo.source_content)) { _NextFlowType = ExamFlowType.AnswerTime; BeginExam(_NextFlowType); break; } PlayAudio(itemInfo.source_content); if (itemInfo.item_repet_times > 1 && itemInfo.item_repet_times > _item_repet_times) { _item_repet_times++; _NextFlowType = ExamFlowType.QuestionAudio; } else { _NextFlowType = ExamFlowType.AnswerTime; } break; case ExamFlowType.AnswerTime: //3.阅读题目 PromptCommandText = "开始答题"; _answerTime = itemInfo.item_answer_second; TotalTime = itemInfo.item_answer_second; PlayTime = 0; _NextFlowType = ExamFlowType.NextQs; _dTimer.Start(); break; case ExamFlowType.NextQs: //记录答案 UpdateAnswer(); //3.下一题 _itemIndex++; _NextFlowType = ExamFlowType.PrepareTime; BindQsItemInfo(); break; } }