|
|
@@ -183,6 +183,8 @@ public class OperateSetting : MonoSingleton<OperateSetting>
|
|
|
m_CurrentOperationMode = GlobalData.m_CurrentOperationMode;
|
|
|
}
|
|
|
|
|
|
+ ParseParameters();
|
|
|
+
|
|
|
#region 本地化语言
|
|
|
if (useLocalization)
|
|
|
{
|
|
|
@@ -198,13 +200,82 @@ public class OperateSetting : MonoSingleton<OperateSetting>
|
|
|
|
|
|
}
|
|
|
|
|
|
-
|
|
|
-
|
|
|
InitQuestionInfo();
|
|
|
InitOperationMode();
|
|
|
ProcessManagement.Instance.awakePlay = false;
|
|
|
}
|
|
|
|
|
|
+ private void ParseParameters()
|
|
|
+ {
|
|
|
+ string[] args = System.Environment.GetCommandLineArgs();
|
|
|
+
|
|
|
+ ///临时测试数据
|
|
|
+ string para = "b0e6098c7b65e46928b38e09a506234abb0b9a0/闭式水泵整体拆装/访客/40008013900/127.0.0.1:15157/Exam/测试参数/这是第条参数/这是总平台参数";
|
|
|
+
|
|
|
+
|
|
|
+ string[] tmpArgs = para.Split('/');
|
|
|
+
|
|
|
+ // 文件各种:手机号/课程名/模式/地址
|
|
|
+ string tmpPhoneNumber = "";
|
|
|
+ string tmpCourseName = "";
|
|
|
+ string tmpMode = "";
|
|
|
+
|
|
|
+ UserProxy userProxy = DAL.Instance.Get<UserProxy>();
|
|
|
+ userProxy.userInfo.userName = tmpArgs[2];
|
|
|
+ userProxy.userInfo.phoneNumber = tmpArgs[3];
|
|
|
+
|
|
|
+ Debug.Log(tmpArgs.Length + "-asd-" + args[1]);
|
|
|
+ if (tmpArgs.Length < 4)
|
|
|
+ {
|
|
|
+ #region 电专平台接口解析
|
|
|
+
|
|
|
+ // 文件各种:手机号/课程名/模式/地址
|
|
|
+ tmpPhoneNumber = tmpArgs[0];
|
|
|
+ tmpCourseName = tmpArgs[1];
|
|
|
+ tmpMode = tmpArgs[2];
|
|
|
+ //if (tmpArgs.Length > 3)
|
|
|
+ //{
|
|
|
+ // string tmpAddress = tmpArgs[3];
|
|
|
+ // //GrpcChannelContronller.Instance.StartClient(tmpAddress);
|
|
|
+
|
|
|
+ // GetInfoaboutSpecifiedUser(tmpPhoneNumber);
|
|
|
+ //}
|
|
|
+ #endregion
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ #region 通用平台接口解析
|
|
|
+
|
|
|
+ tmpPhoneNumber = tmpArgs[5];
|
|
|
+ tmpCourseName = tmpArgs[1];
|
|
|
+ tmpMode = tmpArgs[2];
|
|
|
+
|
|
|
+ GrpcChannelContronller.Instance.StartClient(tmpArgs[4]);
|
|
|
+ tmpCourseName = tmpArgs[1];
|
|
|
+
|
|
|
+ GlobalConfig.m_SelectDevice = tmpCourseName;
|
|
|
+
|
|
|
+ switch (tmpArgs[5])
|
|
|
+ {
|
|
|
+ case "Learn":
|
|
|
+ m_CurrentOperationMode = OperationMode.Learn;
|
|
|
+ break;
|
|
|
+ case "Practice":
|
|
|
+ m_CurrentOperationMode = OperationMode.Practice;
|
|
|
+ break;
|
|
|
+ case "Exam":
|
|
|
+ m_CurrentOperationMode = OperationMode.Exam;
|
|
|
+ break;
|
|
|
+ default:
|
|
|
+ tmpMode = "学习";
|
|
|
+ break;
|
|
|
+ }
|
|
|
+
|
|
|
+ Debug.Log(tmpCourseName + " --" + tmpMode);
|
|
|
+ #endregion
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
/// <summary>
|
|
|
/// 初始化游戏设置
|
|
|
/// </summary>
|
|
|
@@ -323,8 +394,11 @@ public class OperateSetting : MonoSingleton<OperateSetting>
|
|
|
|
|
|
ExamSetInfo tmpExamInfo = tmpProxy.GetExamSetInfoByCourseName(name);
|
|
|
|
|
|
- maxErrorCount = int.Parse(tmpExamInfo.maxErrorCount);
|
|
|
- examTime = int.Parse(tmpExamInfo.examTime);
|
|
|
+ if (tmpExamInfo != null)
|
|
|
+ {
|
|
|
+ maxErrorCount = int.Parse(tmpExamInfo.maxErrorCount);
|
|
|
+ examTime = int.Parse(tmpExamInfo.examTime);
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
UIKit.OpenPanel<ToolDisplayForm>();
|