/// <summary> /// 初始化培训场景UI /// </summary> public void initTrainUI(string equipName, string flow, TrainMode trainMode) { //tabStrip.init(1, tabStripClick); //tabStrip.setTabActiveState(1); currentEquipName = equipName; this.currentTrainFlow = flow; this.currentTrainMode = trainMode; index = (int)currentTrainMode; dynamiclistUI.reset(); dynamiclistUI.resetPostion(); flowOperateMenu.initFlowMenu(flowOperateMenuClick, currentTrainMode); initToolMenu(); toolMenu.canelHindTool(); uitool.setPauseBtnClick(pauseMovie); uitool.setReturnBtnClick(backMenu); uitool.setRatateBtnClick(afreshTrain); uitool.setNextBtnClick(setNextClick); uitool.setPreBtnClick(setBackClick); nextProcess.setNoSwitchClick(noBtnClick); nextProcess.setYesSwitchClick(yesBtnClick); count = flowOperateMenu.getflows().Count; if (gradeManager == null) { gradeManager = new TLGradeManager(); } ExamSubject subject = gradeManager.getExamSubject(flow); if (!subject.IsExam) { tabStrip.setTabDisableState(2); } //isExam = false; //initTrainMode(trainMode); popwindow.init(); }
public void initUI(TrainUI.TrainMode mode) { if (gradeManager == null) { gradeManager = new TLGradeManager(); } examCountDown.setTotalSeconds((int)gradeManager.getExamTimeById(2)); examCountDown.setTimeEndEvent(timeOver); if (topicDB == null) { topicDB = new TopicCircuitDBHelper(); readXml(Application.streamingAssetsPath + "/XFTrain/MovieTime.xml"); } initCircuitFlows(mode); flowOperateMenu.initFlowMenu(circuitFlows, flowOperateMenuClick, mode); currentTrainMode = mode; popWindow.setYesSwitchClick(changeMode); popWindow.setNoSwitchClick(noClick); circuitUIStart.SetActive(true); info.text = "学员" + H5Camera.GetComponent <UICommunicationsScript>().getUsetName() + ",欢迎来到S700K的学习模式"; circuitUIIsStart = false; tempMode = mode; changeMode(); toolMenu.initToolMenu(toolMenuItemClick); if (circuitTopics[circuitFlows[0]].StudyMode == CircuitStudyMode.Image) { studyImage.gameObject.SetActive(true); } else if (circuitTopics[circuitFlows[0]].StudyMode == CircuitStudyMode.Movie) { studyMovie.movie.SetActive(true); studyMovie.init(); } else if (circuitTopics[circuitFlows[0]].StudyMode == CircuitStudyMode.ImageMovie) { studyMovieText.uiPanel.SetActive(true); studyMovieText.init(); } else if (circuitTopics[circuitFlows[0]].StudyMode == CircuitStudyMode.Training) { if (mode == TrainUI.TrainMode.Training) { traningMovie.movie.SetActive(true); traningMovie.init(); } else if (mode == TrainUI.TrainMode.Exam) { examMovie.movie.SetActive(true); examMovie.init(); } } }
public void initUI(TrainUI.TrainMode mode) { if (gradeManager == null) { gradeManager = new TLGradeManager(); } examCountDown.setTotalSeconds((int)gradeManager.getExamTimeById(2)); examCountDown.setTimeEndEvent(timeOver); if (mode == TrainUI.TrainMode.Training) { mode = TrainUI.TrainMode.Study; } if (topicDB == null) { topicDB = new TopicCircuitDBHelper(); readXml(Application.streamingAssetsPath + "/XFTrain/MovieTime.xml"); } initCircuitFlows(); uitool.setReturnBtnClick(backMenu); uitool.setPreBtnClick(OnPreClick); uitool.setNextBtnClick(OnNextClick); uitool.setPauseBtnClick(pauseMovie); uitool.setRatateBtnClick(rotateClick); //uitool.setSkipBtnClick(onSkipBtnClick); flowOperateMenu.initFlowMenu(circuitFlows, flowOperateMenuClick, mode); currentTrainMode = mode; popWindow.setYesSwitchClick(changeMode); popWindow.setNoSwitchClick(noClick); circuitUIStart.SetActive(true); info.text = "学员" + H5Camera.GetComponent <UICommunicationsScript>().getUsetName() + ",欢迎来到S700K的学习模式"; circuitUIIsStart = false; tempMode = mode; changeMode(); toolMenu.initToolMenu(toolMenuItemClick); hintBtn.SetActive(false); multimeter.gameObject.SetActive(false); uitool.setShiwaiSliderValue(1.0f / (float)circuitFlows.Count, 1, circuitFlows.Count); ////test //UICommunicationsScript t = examGrade.GetComponent<UICommunicationsScript>(); ////t.ReceiveWeb("{\"Action\":\"updateAllTopic3DScore\",\"param1\":\"20\",\"param2\":\"1\",\"param3\":\"3\"}"); ////t.ReceiveWeb("{\"Action\":\"updateAllTopic2DScore\",\"param1\":\"20\",\"param2\":\"1\",\"param3\":\"7\"}"); //t.ReceiveWeb("{\"Action\":\"GetStuInfo\",\"param1\":\"1\",\"param2\":\"4\"}"); //t.ReceiveWeb("{\"Action\":\"DeleteBackup\",\"param1\":\"0\"}"); //t.ReceiveWeb("{\"Action\":\"SubmitReportDate\",\"param1\":\"3\"}"); }