Example #1
0
        public void initTrainMode(TrainMode trainMode)
        {
            string topNavigateStr = "";

            switch (trainMode)
            {
            case TrainMode.Study:
                topNavigateStr += "学习模式 > ";
                topNavigateBackground.spriteName = "xitongshijianlan-xuexii-bj";
                break;

            case TrainMode.Training:
                topNavigateStr += "练习模式 > ";
                topNavigateBackground.spriteName = "xitongshijianlan-lianxi-bj";
                break;

            case TrainMode.Exam:
                topNavigateStr += "考试模式 > ";
                topNavigateBackground.spriteName = "xitongshijianlan-kaoshi-bj";
                break;
            }
            topNavigateStr       += "室外模式 > ";
            topNavigateStr       += currentEquipName + currentTrainFlow;
            topNavigateLabel.text = topNavigateStr;
        }
Example #2
0
 public void initUI(string equipName, string flow, TrainMode trainMode)
 {
     currentEquipName      = equipName;
     this.currentTrainFlow = flow;
     this.currentTrainMode = trainMode;
     flowOperateMenu.initFlowMenu(flowOperateMenuClick, currentTrainMode);
 }
Example #3
0
        /// <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();
        }
Example #4
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="index">步骤的序号</param>
 public void cause(int subject, int index)
 {
     examGrade.GetComponent <Camera>().depth = -50;
     CoherentUISystem.Instance.UIViews.Remove(examGrade);
     currentTrainMode = TrainMode.Study;
     coverTabs[(int)currentTrainMode].gameObject.SetActive(true);
     switchTabs(0);
     //showTrainStart();
     hideTrainStart();
     index = int.Parse(index.ToString().Substring(index.ToString().Length - 3));
     flowOperateMenuClick(index);
     //examCountDown.onRestart();
     //TrainingManager.resetGradeDetails();
 }
Example #5
0
        public object Train(object owner, IContextLookup globalVars)
        {
            object              theNetwork            = Network.EvaluateTyped(owner, globalVars);
            IEnumerable         theData               = Data.EvaluateTyped(owner, globalVars);
            ILearningMethodInfo theLearningMethodInfo = LearningMethod.EvaluateTyped(owner, globalVars);

            ILearningMethod learningMethod = theLearningMethodInfo.GetLearningMethod(owner, globalVars, theNetwork,
                                                                                     theData);
            IEnumerable theValidationData = ValidationData.EvaluateTyped(owner, globalVars);

            ITrainingInfo theTrainMode = TrainMode.EvaluateTyped(owner, globalVars);

            theTrainMode.PerformTraining(learningMethod, theNetwork, theValidationData);
            return(theNetwork);
        }
Example #6
0
        /// <summary>
        /// 将接受来的TrainModeType转化为int 设备训练模式 0康复模式,1主被动模式,2被动模式
        /// </summary>
        /// <param name="trainMode"></param>
        /// <returns></returns>
        public int TrainModeTypeConvertToInt(TrainMode trainMode)
        {
            switch (trainMode)
            {
            case TrainMode.RehabilitationModel:
                return(0);

            case TrainMode.ActiveModel:
                return(1);

            case TrainMode.PassiveModel:
                return(2);

            default:
                return(-1);
            }
        }