Exemple #1
0
        void eqpProcessState(int UnitID, string strEQPProcessState)
        {
            //Label lblTemp = new Label();

            try
            {
                dgv_UnitState[UnitID - 1, 1].Value = PInfo.funEQPProcessState(strEQPProcessState);

                switch (strEQPProcessState)
                {
                case "1":     //idle
                    dgv_UnitState[UnitID - 1, 1].Style.BackColor = Color.Yellow;
                    dgv_UnitState[UnitID - 1, 1].Style.ForeColor = Color.Black;
                    break;

                case "2":    //setup
                    dgv_UnitState[UnitID - 1, 1].Style.BackColor = Color.LightGreen;
                    dgv_UnitState[UnitID - 1, 1].Style.ForeColor = Color.White;
                    break;

                case "3":    //execute
                    dgv_UnitState[UnitID - 1, 1].Style.BackColor = Color.Blue;
                    dgv_UnitState[UnitID - 1, 1].Style.ForeColor = Color.White;
                    break;

                case "4":    //pause
                    dgv_UnitState[UnitID - 1, 1].Style.BackColor = Color.LightPink;
                    dgv_UnitState[UnitID - 1, 1].Style.ForeColor = Color.Black;
                    break;

                case "5":    //DISABLE
                    dgv_UnitState[UnitID - 1, 1].Style.BackColor = Color.Red;
                    dgv_UnitState[UnitID - 1, 1].Style.ForeColor = Color.Black;
                    break;
                }

                #region
                //switch (UnitID)
                //{
                //    case 1: //FI01
                //        lblTemp = lblFL01EQPProcessState;
                //        break;

                //    case 2: //FI02
                //        lblTemp = lblFL02EQPProcessState;
                //        break;

                //    case 3: //FT01
                //        lblTemp = lblFT01EQPProcessState;
                //        break;

                //    case 4://AL01
                //        lblTemp = lblAL01EQPProcessState;
                //        break;

                //    case 5://LM01
                //        lblTemp = lblLM01EQPProcessState;
                //        break;

                //    case 6://DM01
                //        lblTemp = lblDM01EQPProcessState;
                //        break;

                //    case 7://IS01
                //        lblTemp = lblIS01EQPProcessState;
                //        break;

                //    case 8://ST01
                //        lblTemp = lblST01EQPProcessState;
                //        break;

                //    case 9://FT02
                //        lblTemp = lblFT02EQPProcessState;
                //        break;
                //}


                //switch (strEQPProcessState)
                //{
                //    case "1": //idle
                //            lblTemp.BackColor = Color.Yellow;
                //            lblTemp.ForeColor = Color.Black;
                //        break;

                //    case "2"://setup
                //         lblTemp.BackColor = Color.LightGreen;
                //            lblTemp.ForeColor = Color.White;
                //        break;

                //    case "3"://execute
                //         lblTemp.BackColor = Color.Blue;
                //            lblTemp.ForeColor = Color.White;
                //        break;

                //    case "4"://pause
                //         lblTemp.BackColor = Color.LightPink;
                //            lblTemp.ForeColor = Color.Black;
                //        break;

                //    case "5"://DISABLE
                //         lblTemp.BackColor = Color.Red;
                //            lblTemp.ForeColor = Color.Black;
                //        break;
                //}
                #endregion
            }
            catch (Exception ex)
            {
                PInfo.subLog_Set(clsInfo.LogType.CIM, ex.ToString());
            }
        }