Beispiel #1
0
        //20090323 志忠~~比較TK的回傳Code
        public void strcmpDearErrorCode(StringBuilder strReturnCode)
        {
            //20090323 志忠~~用來存放分割
            string[] szHandDearError;
            String[] szReturnDearErrorCode;
            //20090325 志忠~~比對字串是否成功
            bool          bCompareSuccessful = false;
            DearErrorCode CompareSuccessful  = new DearErrorCode();

            for (int i = 0; i < ARtnCode.Count; i++)
            {
                //20090323 志忠~~分割初始化TK的回傳Code
                szHandDearError = ARtnCode[i].ToString().Split(',');
                //20090324 志忠~~分割傳過來的訊息
                szReturnDearErrorCode = strReturnCode.ToString().Split(',');

                //20090323 志忠~~比對回傳的DearErrorCode
                if (String.Equals(szHandDearError[0], szReturnDearErrorCode[0]) == true)
                {
                    //20090323 志忠~~依照DearErrorCode來呼叫對應的函式
                    switch (szHandDearError[0])
                    {
                    case "R100":
                        CompareSuccessful.Rtn_AllMotorHome(strReturnCode.ToString());
                        bCompareSuccessful = true;

                        break;

                    case "R101":
                        CompareSuccessful.Rtn_CCDAxleChangeMove(strReturnCode.ToString());
                        bCompareSuccessful = true;
                        break;

                    case "R201":
                        CompareSuccessful.Rtn_AutoLoad(strReturnCode.ToString());
                        bCompareSuccessful = true;
                        break;

                    case "R202":
                        CompareSuccessful.Rtn_AutoUnload(strReturnCode.ToString());
                        bCompareSuccessful = true;
                        break;

                    case "R203":
                        CompareSuccessful.Rtn_UpperLoadProcess(strReturnCode.ToString());
                        bCompareSuccessful = true;
                        break;

                    case "R204":
                        CompareSuccessful.Rtn_UpperUnloadProcess(strReturnCode.ToString());
                        bCompareSuccessful = true;
                        break;

                    case "R205":
                        CompareSuccessful.Rtn_BottomLoadProcess(strReturnCode.ToString());
                        bCompareSuccessful = true;
                        break;

                    case "R206":
                        CompareSuccessful.Rtn_LastUnloadProcess(strReturnCode.ToString());
                        bCompareSuccessful = true;
                        break;

                    case "R300":
                        CompareSuccessful.Rtn_StageInitProcess(strReturnCode.ToString());
                        bCompareSuccessful = true;
                        break;

                    case "R301":
                        CompareSuccessful.Rtn_StageAutoLoadProcess(strReturnCode.ToString());
                        bCompareSuccessful = true;
                        break;

                    case "R302":
                        CompareSuccessful.Rtn_StageAutoUnloadProcess(strReturnCode.ToString());
                        bCompareSuccessful = true;
                        break;

                    case "R303":
                        CompareSuccessful.Rtn_StageBeforehandClipProcess(strReturnCode.ToString());
                        bCompareSuccessful = true;
                        break;

                    case "R304":
                        CompareSuccessful.Rtn_LaserRepairProcess(strReturnCode.ToString());
                        bCompareSuccessful = true;
                        break;

                    case "R305":
                        CompareSuccessful.Rtn_LampProcess(strReturnCode.ToString());
                        bCompareSuccessful = true;
                        break;

                    case "R401":
                        CompareSuccessful.Rtn_SGL_Move(strReturnCode.ToString());
                        bCompareSuccessful = true;
                        break;

                    case "R402":
                        CompareSuccessful.Rtn_QS1QG1_Move(strReturnCode.ToString());
                        bCompareSuccessful = true;
                        break;

                    case "R403":
                        CompareSuccessful.Rtn_QS2QG2_Move(strReturnCode.ToString());
                        bCompareSuccessful = true;
                        break;

                    case "R404":
                        CompareSuccessful.Rtn_QS3QG3_Move(strReturnCode.ToString());
                        bCompareSuccessful = true;
                        break;

                    case "R405":
                        CompareSuccessful.Rtn_QS4QG4_Move(strReturnCode.ToString());
                        bCompareSuccessful = true;
                        break;

                    case "R406":
                        CompareSuccessful.Rtn_QS5QG5_Move(strReturnCode.ToString());
                        bCompareSuccessful = true;
                        break;

                    case "R407":
                        CompareSuccessful.Rtn_QS6QG6_Move(strReturnCode.ToString());
                        bCompareSuccessful = true;
                        break;

                    case "R408":
                        CompareSuccessful.Rtn_QS7QG7_Move(strReturnCode.ToString());
                        bCompareSuccessful = true;
                        break;

                    case "R409":
                        CompareSuccessful.Rtn_B1B2_Move(strReturnCode.ToString());
                        bCompareSuccessful = true;
                        break;

                    case "R410":
                        CompareSuccessful.Rtn_C1C2_Move(strReturnCode.ToString());
                        bCompareSuccessful = true;
                        break;

                    case "R411":
                        CompareSuccessful.Rtn_TSTG_Move(strReturnCode.ToString());
                        bCompareSuccessful = true;
                        break;

                    case "R501":
                        CompareSuccessful.Rtn_SGL_Box_Control(strReturnCode.ToString());
                        bCompareSuccessful = true;
                        break;

                    case "R502":
                        CompareSuccessful.Rtn_QS1QG1_Box_Control(strReturnCode.ToString());
                        bCompareSuccessful = true;
                        break;

                    case "R503":
                        CompareSuccessful.Rtn_QS2QG2_Box_Control(strReturnCode.ToString());
                        bCompareSuccessful = true;
                        break;

                    case "R504":
                        CompareSuccessful.Rtn_QS3QG3_Box_Control(strReturnCode.ToString());
                        bCompareSuccessful = true;
                        break;

                    case "R505":
                        CompareSuccessful.Rtn_QS4QG4_Box_Control(strReturnCode.ToString());
                        bCompareSuccessful = true;
                        break;

                    case "R506":
                        CompareSuccessful.Rtn_QS5QG5_Box_Control(strReturnCode.ToString());
                        bCompareSuccessful = true;
                        break;

                    case "R507":
                        CompareSuccessful.Rtn_QS6QG6_Box_Control(strReturnCode.ToString());
                        bCompareSuccessful = true;
                        break;

                    case "R508":
                        CompareSuccessful.Rtn_QS7QG7_Box_Control(strReturnCode.ToString());
                        bCompareSuccessful = true;
                        break;

                    case "R509":
                        CompareSuccessful.Rtn_C1C2_Box_Control(strReturnCode.ToString());
                        bCompareSuccessful = true;
                        break;

                    case "R510":
                        CompareSuccessful.Rtn_TSTG_Box_Control(strReturnCode.ToString());
                        bCompareSuccessful = true;
                        break;
                    }
                    break;
                }
            }

            if (!bCompareSuccessful)
            {
                //if (strReturnCode[0] == 'R' && strReturnCode[4] == ',' && strReturnCode[5] == '0')
                //{
                //20090324 志忠~~這個Code什麼都不做
                //}
                if (strReturnCode[0] == 'R' || strReturnCode[0] == 'E' || strReturnCode[0] == 'A' || strReturnCode[0] == 'X')
                {
                    //20090324 志忠~~這個Code呼叫AlarmMsg
                    CompareSuccessful.Rtn_NotDefineCode(strReturnCode.ToString());
                }
            }
        }
Beispiel #2
0
        //20090323 志忠~~比較TK的回傳Code
        public void strcmpDearErrorCode(StringBuilder strReturnCode)
        {
            //20090323 志忠~~用來存放分割
            string[] szHandDearError;
            String[] szReturnDearErrorCode;
            //20090325 志忠~~比對字串是否成功
            bool bCompareSuccessful = false;
            DearErrorCode CompareSuccessful = new DearErrorCode();

            for (int i = 0; i < ARtnCode.Count; i++)
            {
                //20090323 志忠~~分割初始化TK的回傳Code
                szHandDearError = ARtnCode[i].ToString().Split(',');
                //20090324 志忠~~分割傳過來的訊息
                szReturnDearErrorCode = strReturnCode.ToString().Split(',');

                //20090323 志忠~~比對回傳的DearErrorCode
                if (String.Equals(szHandDearError[0], szReturnDearErrorCode[0]) == true)
                {
                    //20090323 志忠~~依照DearErrorCode來呼叫對應的函式
                    switch (szHandDearError[0])
                    {
                        case "R100":
                            CompareSuccessful.Rtn_AllMotorHome(strReturnCode.ToString());
                            bCompareSuccessful = true;
                            
                            break;
                        case "R101":
                            CompareSuccessful.Rtn_CCDAxleChangeMove(strReturnCode.ToString());
                            bCompareSuccessful = true;
                            break;
                        case "R201":
                            CompareSuccessful.Rtn_AutoLoad(strReturnCode.ToString());
                            bCompareSuccessful = true;
                            break;
                        case "R202":
                            CompareSuccessful.Rtn_AutoUnload(strReturnCode.ToString());
                            bCompareSuccessful = true;
                            break;
                        case "R203":
                            CompareSuccessful.Rtn_UpperLoadProcess(strReturnCode.ToString());
                            bCompareSuccessful = true;
                            break;
                        case "R204":
                            CompareSuccessful.Rtn_UpperUnloadProcess(strReturnCode.ToString());
                            bCompareSuccessful = true;
                            break;
                        case "R205":
                            CompareSuccessful.Rtn_BottomLoadProcess(strReturnCode.ToString());
                            bCompareSuccessful = true;
                            break;
                        case "R206":
                            CompareSuccessful.Rtn_LastUnloadProcess(strReturnCode.ToString());
                            bCompareSuccessful = true;
                            break;
                        case "R300":
                            CompareSuccessful.Rtn_StageInitProcess(strReturnCode.ToString());
                            bCompareSuccessful = true;
                            break;
                        case "R301":
                            CompareSuccessful.Rtn_StageAutoLoadProcess(strReturnCode.ToString());
                            bCompareSuccessful = true;
                            break;
                        case "R302":
                            CompareSuccessful.Rtn_StageAutoUnloadProcess(strReturnCode.ToString());
                            bCompareSuccessful = true;
                            break;
                        case "R303":
                            CompareSuccessful.Rtn_StageBeforehandClipProcess(strReturnCode.ToString());
                            bCompareSuccessful = true;
                            break;
                        case "R304":
                            CompareSuccessful.Rtn_LaserRepairProcess(strReturnCode.ToString());
                            bCompareSuccessful = true;
                            break;
                        case "R305":
                            CompareSuccessful.Rtn_LampProcess(strReturnCode.ToString());
                            bCompareSuccessful = true;
                            break;
                        case "R401":
                            CompareSuccessful.Rtn_SGL_Move(strReturnCode.ToString());
                            bCompareSuccessful = true;
                            break;
                        case "R402":
                            CompareSuccessful.Rtn_QS1QG1_Move(strReturnCode.ToString());
                            bCompareSuccessful = true;
                            break;
                        case "R403":
                            CompareSuccessful.Rtn_QS2QG2_Move(strReturnCode.ToString());
                            bCompareSuccessful = true;
                            break;
                        case "R404":
                            CompareSuccessful.Rtn_QS3QG3_Move(strReturnCode.ToString());
                            bCompareSuccessful = true;
                            break;
                        case "R405":
                            CompareSuccessful.Rtn_QS4QG4_Move(strReturnCode.ToString());
                            bCompareSuccessful = true;
                            break;
                        case "R406":
                            CompareSuccessful.Rtn_QS5QG5_Move(strReturnCode.ToString());
                            bCompareSuccessful = true;
                            break;
                        case "R407":
                            CompareSuccessful.Rtn_QS6QG6_Move(strReturnCode.ToString());
                            bCompareSuccessful = true;
                            break;
                        case "R408":
                            CompareSuccessful.Rtn_QS7QG7_Move(strReturnCode.ToString());
                            bCompareSuccessful = true;
                            break;
                        case "R409":
                            CompareSuccessful.Rtn_B1B2_Move(strReturnCode.ToString());
                            bCompareSuccessful = true;
                            break;
                        case "R410":
                            CompareSuccessful.Rtn_C1C2_Move(strReturnCode.ToString());
                            bCompareSuccessful = true;
                            break;
                        case "R411":
                            CompareSuccessful.Rtn_TSTG_Move(strReturnCode.ToString());
                            bCompareSuccessful = true;
                            break;
                        case "R501":
                            CompareSuccessful.Rtn_SGL_Box_Control(strReturnCode.ToString());
                            bCompareSuccessful = true;
                            break;
                        case "R502":
                            CompareSuccessful.Rtn_QS1QG1_Box_Control(strReturnCode.ToString());
                            bCompareSuccessful = true;
                            break;
                        case "R503":
                            CompareSuccessful.Rtn_QS2QG2_Box_Control(strReturnCode.ToString());
                            bCompareSuccessful = true;
                            break;
                        case "R504":
                            CompareSuccessful.Rtn_QS3QG3_Box_Control(strReturnCode.ToString());
                            bCompareSuccessful = true;
                            break;
                        case "R505":
                            CompareSuccessful.Rtn_QS4QG4_Box_Control(strReturnCode.ToString());
                            bCompareSuccessful = true;
                            break;
                        case "R506":
                            CompareSuccessful.Rtn_QS5QG5_Box_Control(strReturnCode.ToString());
                            bCompareSuccessful = true;
                            break;
                        case "R507":
                            CompareSuccessful.Rtn_QS6QG6_Box_Control(strReturnCode.ToString());
                            bCompareSuccessful = true;
                            break;
                        case "R508":
                            CompareSuccessful.Rtn_QS7QG7_Box_Control(strReturnCode.ToString());
                            bCompareSuccessful = true;
                            break;
                        case "R509":
                            CompareSuccessful.Rtn_C1C2_Box_Control(strReturnCode.ToString());
                            bCompareSuccessful = true;
                            break;
                        case "R510":
                            CompareSuccessful.Rtn_TSTG_Box_Control(strReturnCode.ToString());
                            bCompareSuccessful = true;
                            break;
                    }
                    break;
                }
            }

            if (!bCompareSuccessful)
            {
                //if (strReturnCode[0] == 'R' && strReturnCode[4] == ',' && strReturnCode[5] == '0')
                //{
                    //20090324 志忠~~這個Code什麼都不做
                //}
                if (strReturnCode[0] == 'R' || strReturnCode[0] == 'E' || strReturnCode[0] == 'A' || strReturnCode[0] == 'X')
                {
                    //20090324 志忠~~這個Code呼叫AlarmMsg
                    CompareSuccessful.Rtn_NotDefineCode(strReturnCode.ToString());
                }
            }
        }