Beispiel #1
0
        /// <summary>
        /// Queue에서 OPCall Object를 가져와 Type별로 분기시켜 Form을 발생
        /// </summary>
        private void subOPCallGet()
        {
            int    dintOPCallType;
            int    dintPortID;
            string dstrFromSF;
            string dstrHostMsg;

            InfoAct.clsOPCall dclsOPCall;

            try
            {
                //이미 다른 OPCall Form이 떠있으면 빠져나간다
                if (PInfo.All.OperatorCallFormVisible == true)
                {
                    return;
                }

                dclsOPCall = (InfoAct.clsOPCall)PInfo.funGetOPCall();     //OPCall Queue에서 항목을 가져온다

                dintOPCallType = dclsOPCall.intOPCallType;
                dintPortID     = dclsOPCall.intPortID;
                dstrFromSF     = dclsOPCall.strFromSF;
                dstrHostMsg    = dclsOPCall.strHostMsg;

                switch (dintOPCallType)     //OPCall Type별로 분기하여 Form을 띄운다
                {
                case (int)InfoAct.clsInfo.OPCall.MSG:
                    //Buzzer를 울린다
                    this.PInfo.subPLCCommand_Set(InfoAct.clsInfo.PLCCommand.BuzzerOn);
                    //this.pfrmErrMSG.subFormLoad(dstrHostMsg, dintOPCallType);   //Message창을 띄운다
                    this.PInfo.All.OperatorCallFormVisible = true;
                    break;

                //case (int)InfoAct.clsInfo.OPCall.S10F3HostMSG:
                //    //Buzzer를 울린다
                //    this.PInfo.subPLCCommand_Set(InfoAct.clsInfo.PLCCommand.BuzzerOn);

                //    this.pfrmErrMSG.PInfo = this.PInfo;
                //    this.pfrmErrMSG.subFormLoad(dstrHostMsg, dintOPCallType);   //Message창을 띄운다
                //   this.PInfo.All.OperatorCallFormVisible = true;
                //    break;

                case (int)InfoAct.clsInfo.OPCall.Scrap:
                    //Buzzer를 울린다
                    //this.PInfo.subPLCCommand_Set(InfoAct.clsInfo.PLCCommand.BuzzerOn);
                    //this.pfrmScrapUnscrapAbort.subFormLoad(dstrHostMsg, dintOPCallType);   //Message창을 띄운다
                    //PInfo.All.OperatorCallFormVisible = true;
                    break;

                case (int)InfoAct.clsInfo.OPCall.Unscrap:
                    //Buzzer를 울린다
                    //this.PInfo.subPLCCommand_Set(InfoAct.clsInfo.PLCCommand.BuzzerOn);
                    //this.pfrmScrapUnscrapAbort.subFormLoad(dstrHostMsg, dintOPCallType);   //Message창을 띄운다
                    //this.PInfo.All.OperatorCallFormVisible = true;
                    break;

                case (int)InfoAct.clsInfo.OPCall.GLSAbort:
                    //Buzzer를 울린다
                    //this.PInfo.subPLCCommand_Set(InfoAct.clsInfo.PLCCommand.BuzzerOn);
                    //this.pfrmScrapUnscrapAbort.subFormLoad(dstrHostMsg, dintOPCallType);   //Message창을 띄운다
                    //this.PInfo.All.OperatorCallFormVisible = true;
                    break;

                case (int)InfoAct.clsInfo.OPCall.OnlineModeChangeT3TimeOut:
                    //Buzzer를 울린다
                    this.PInfo.subPLCCommand_Set(InfoAct.clsInfo.PLCCommand.BuzzerOn);
                    break;

                case (int)InfoAct.clsInfo.OPCall.T3TimeOut:
                    //Buzzer를 울린다
                    this.PInfo.subPLCCommand_Set(InfoAct.clsInfo.PLCCommand.BuzzerOn);
                    break;

                case (int)InfoAct.clsInfo.OPCall.FormClose:                                 //OPCall.FormClose는 frmMSG와 frmModeChange에서 공동사용
                    if (this.PInfo.All.ModeChangeFormVisible == true)
                    {
                        this.pfrmModeChange.Hide();
                        this.PInfo.All.ModeChangeFormVisible = false;
                    }
                    break;

                case (int)InfoAct.clsInfo.OPCall.ModeChangeShow:                             //Online Mode Change창을 띄운다.
                    this.pfrmModeChange.subFormLoad();
                    break;
                }
            }
            catch (Exception ex)
            {
                this.PInfo.subLog_Set(InfoAct.clsInfo.LogType.CIM, ex.ToString());
            }
        }