You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
83 lines
2.4 KiB
83 lines
2.4 KiB
using UnityEngine; |
|
using System.Collections.Generic; |
|
using System; |
|
using AX.MessageSystem; |
|
using AX.NetworkSystem; |
|
|
|
public class MakeScoreManager : BaseExamManager { |
|
public override void GetData(IMessage message) |
|
{ |
|
//从服务端获取待评分的考试信息 |
|
//ToDo... |
|
ExamList.Clear(); |
|
var data = (PagingReplyInfo<ExaminationInfo>)message.Data; |
|
ExamList = data.Items; |
|
if (ExamList.Count == 0) |
|
{ |
|
transform.parent.Find("bulletin").gameObject.SetActive(true);//没有考试信息的告示 |
|
return; |
|
} |
|
GenerateExamItem(); |
|
NetworkManager.Default.SendRequestAsync("GET_SERVER_TIME_REQUEST");//请求服务端时间 |
|
|
|
if (TimeManager.CurExam != null && TimeManager.CurQues != null) |
|
{ |
|
MessageDispatcher.SendMessage(TimeManager.CurExam.ID, "ToggleTrue", (object)TimeManager.CurQues.ID); |
|
} |
|
|
|
} |
|
public override void GetExamInfoFromServer() |
|
{ |
|
//连接服务器,获取考试信息数据,准备评分 |
|
//ToDo... |
|
|
|
|
|
|
|
//test: 1 exam,1 question |
|
//ExamInfo exam = new ExamInfo(); |
|
//exam.ExamName = "exam1"; |
|
//exam.ExamID = "1"; |
|
//exam.StartTime = "start"; |
|
//exam.DurationTime = "2"; |
|
//exam.EndTime = "end"; |
|
//exam.QuestionList = new List<QuestionInfo>(); |
|
|
|
//QuestionInfo question = new QuestionInfo(); |
|
//question.QuestionName = "油罐考题"; |
|
//question.QuestionXMLPath = "question/" + "8.xml"; |
|
//question.QuestionID = "1"; |
|
//question.SceneID = "5"; |
|
//exam.QuestionList.Add(question); |
|
|
|
//QuestionInfo question1 = new QuestionInfo(); |
|
//question1.QuestionName = "油罐考题2"; |
|
//question1.QuestionXMLPath = "question/" + "8.xml"; |
|
//question1.QuestionID = "2"; |
|
//question1.SceneID = "5"; |
|
//exam.QuestionList.Add(question1); |
|
|
|
//ExamList.Add(exam); |
|
//ExamList.Add(exam); |
|
//ExamList.Add(exam); |
|
//ExamList.Add(exam); |
|
//ExamList.Add(exam); |
|
//ExamList.Add(exam); |
|
|
|
//下载答案文件到本地 |
|
//ToDo... |
|
|
|
|
|
} |
|
public override void InitMessageType() |
|
{ |
|
MESSAGETYPE = "GET_NON_MARKING_EXAMINATION_INFOS_REFRESH"; |
|
} |
|
public override void InitInfo() |
|
{ |
|
|
|
//给预制体赋值 |
|
ItemPrefab = Resources.Load<GameObject>("UIPrefab/Examination/ExamInfoScore"); |
|
|
|
} |
|
|
|
}
|
|
|