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.
41 lines
1.4 KiB
41 lines
1.4 KiB
3 years ago
|
using UnityEngine;
|
||
|
using System.Collections;
|
||
|
using AX.NetworkSystem;
|
||
|
using AX.Network.Protocols;
|
||
|
using System;
|
||
|
using AX.TrackRecord;
|
||
|
using System.IO;
|
||
|
|
||
|
public class QUESTION_SAVE_REPLY : NetworkMessageBehaviour
|
||
|
{
|
||
|
protected override void Execute(BinaryMessage message)
|
||
|
{
|
||
|
var question= message.Body.Deserialize<ExaminationQuestionObject>();
|
||
|
ExaminationQuestionDetail.question = question;
|
||
|
//调用函数,创建考题xml文件
|
||
|
|
||
|
string file = "Questions/" + question.ID + "/" + question.FilePath;//这是文件在本地的完整路径
|
||
|
|
||
|
RecordManager.Instance.CreatAndSaveQuestion(file);
|
||
|
|
||
|
//上传文件
|
||
|
string[] files = { file };
|
||
|
if (files.Length > 0)
|
||
|
{
|
||
|
if (GameObject.Find("FileTransTipWindow"))//如果已经存在文件传输窗口,不再相应
|
||
|
return;
|
||
|
GameObject FileTransTipWin = Instantiate(Resources.Load<GameObject>("UIPrefab/FileTransTipWin"));
|
||
|
FileTransTipWin.GetComponent<FileTransTipWinManager>().SetWindow(
|
||
|
"UpLoad", files, TransferType.Upload);
|
||
|
FileTransTipWinManager.task.TransferTaskCompleted += Task_TransferTaskCompleted;
|
||
|
}
|
||
|
|
||
|
}
|
||
|
|
||
|
private void Task_TransferTaskCompleted()
|
||
|
{
|
||
|
FileTransTipWinManager.task.TransferTaskCompleted -= Task_TransferTaskCompleted;
|
||
|
MySceneManager.BackToLastScene();
|
||
|
}
|
||
|
}
|