Esempio n. 1
0
File: frmMain.cs Progetto: k2un/k2un
        /// <summary>
        /// Queue에서 OpCall Object를 가져와 Type별로 분기시켜 Form 발생
        /// 창이 떠 있어도 Overwrite 가능
        /// </summary>
        private void subOPCallOverWriteGet()
        {
            int    dintOPCallType;
            int    dintPortID;
            string dstrFromSF;
            string dstrHostMsg;

            InfoAct.clsOPCall dclsOPCall;

            try
            {
                dclsOPCall = (InfoAct.clsOPCall)PInfo.funGetOPCallOverWrite();     //OPCallOverWrite Queue에서 항목을 가져온다

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

                switch (dintOPCallType)                              //OPCall Type별로 분기하여 Form을 띄운다
                {
                case (int)InfoAct.clsInfo.OPCallOverWrite.MSGBuzzer: //Buzzer On
                    //Buzzer를 울린다
                    this.PInfo.subPLCCommand_Set(InfoAct.clsInfo.PLCCommand.BuzzerOn);
                    this.pfrmErrMsgOverWrite.subFormLoad(dstrHostMsg, dintOPCallType, dintPortID);       //Message창을 띄운다
                    break;

                case (int)InfoAct.clsInfo.OPCallOverWrite.MSGNoBuzzer:       //No Buzzer
                    //this.pfrmErrMsgOverWrite.PInfo = this.PInfo;
                    //this.pfrmErrMsgOverWrite.subFormLoad(dstrHostMsg, dintOPCallType, dintPortID);   //Message창을 띄운다
                    //break;
                    //this.pfrmErrMsgList.PInfo = this.PInfo;
                    //PInfo.All.OperatorCallFormVisible = true;
                    this.pfrmErrMsgList.subFormLoad(dstrHostMsg, dintOPCallType);       //Message창을 띄운다
                    break;

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

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

                case (int)InfoAct.clsInfo.OPCallOverWrite.OPCallClear:
                    this.pfrmErrMsgList.subClose(true);
                    break;

                default:
                    break;
                }
            }
            catch (Exception ex)
            {
                this.PInfo.subLog_Set(InfoAct.clsInfo.LogType.CIM, ex.ToString());
            }
        }