Exemplo n.º 1
0
    IEnumerator phase_11()//reapeat the prograss
    {
        if (GSKDATA.SoftCurrentMode == "Teach")
        {
            //CameraPosition();
            float waittime = 0;
            ShowTips();
            ReadTips(TitleName[stage_current]);
            waittime = GetVoiceTime(TitleName[stage_current]);
            yield return(StartCoroutine(Timer(waittime)));

            LstageRead();

            List <string> stage_code = new List <string>();
            string        ExcelPath  = Application.dataPath + "/StreamingAssets/Excel/MyCode.xls";
            ExcelOperator excelClass = new ExcelOperator();
            DataTable     CodeData   = new DataTable("CodeData");
            CodeData = excelClass.ExcelReader(ExcelPath, caseName);
            int i = 0;
            while (i < CodeData.Rows.Count)
            {
                string tempcode = CodeData.Rows[i][stage_current + 1].ToString();
                if (tempcode != "")
                {
                    stage_code.Add(CodeData.Rows[i][stage_current + 1].ToString());
                }
                i++;
            }
            if (stage_code.Count > 0)
            {
                //Debug.Log("程序行:" + stage_code.Count +" " + FileName);
                GSKFile.CreateFile(FileName);
                GSKFile.writeContents(stage_code, FileName);
                //GSKDATA.CurrentProgramName = FileName;
            }
            else
            {
                GSKFile.DeleteProgram(FileName);
                //FileName = "777777.prl";
            }

            ScreenScript.SetCurrentWin_Teach("F3");
        }
        else
        {
            Debug.Log("pass" + stage_current);
            GetCurrentCode();
            GetCurrentPosition();
            yield return(StartCoroutine(DoubleE()));
        }
    }
Exemplo n.º 2
0
    } //末端加持装置的位置

    IEnumerator phase_0()
    {
        if (GSKDATA.SoftCurrentMode == "Teach")
        {
            //delete the orginal program
            GSKFile.DeleteProgram("a2.prl");
            CameraPosition();
            float waittime = 0;
            ShowTips();
            ReadTips(TitleName[stage_current]);
            waittime = GetVoiceTime(TitleName[stage_current]);
            yield return(StartCoroutine(Timer(waittime)));

            LstageRead();
            showtips(stage_name[0]);
            ReadTips(stage_name[0]);
            waittime = GetVoiceTime(stage_name[0]);
            yield return(StartCoroutine(Timer(waittime)));

            button.MouseMove(0, 12);
            FuncPara.loopControl = 0;
            yield return(StartCoroutine(WaitLoop()));

            yield return(StartCoroutine(button.ButtonClick(12))); //tab

            yield return(StartCoroutine(button.ButtonClick(8)));  //right

            yield return(StartCoroutine(button.ButtonClick(6)));  //chose

            yield return(StartCoroutine(button.ButtonClick(6)));  //chose

            showtips(stage_name[1]);
            ReadTips(stage_name[1]);
            waittime = GetVoiceTime(stage_name[1]);
            yield return(StartCoroutine(Timer(waittime)));

            yield return(StartCoroutine(button.ButtonClick(12))); //tab

            yield return(StartCoroutine(button.ButtonClick(6)));  //chose

            yield return(StartCoroutine(button.ButtonClick(6)));  //chose//a

            yield return(StartCoroutine(button.ButtonClick(45))); //2

            yield return(StartCoroutine(button.ButtonClick(36))); //input

            showtips(stage_name[2]);
            ReadTips(stage_name[2]);
            waittime = GetVoiceTime(stage_name[2]);
            yield return(StartCoroutine(Timer(waittime)));

            yield return(StartCoroutine(button.ButtonClick(12))); //tab

            yield return(StartCoroutine(button.ButtonClick(6)));  //chose

            FileName = "a2.prl";                                  //程序名称
        }
        else
        {
            GSKFile.DeleteProgram(FileName);
            GetCurrentCode();
            GetCurrentPosition();
            yield return(StartCoroutine(DoubleE()));
        }
    }