Exemple #1
0
        //*******************************************************************************
        //   Function Name : funOpenSecs()
        //   Description   : HostAct DLL의 인스턴스를 생성시키고 오픈한다.
        //   Parameters    : strEQPID => SECS에서 쓰이는 EQP ID
        //   Return Value  : 성공 => True, 실패 => False
        //   Special Notes :
        //*******************************************************************************
        //   2006/09/22          어 경태          [L 00]
        //*******************************************************************************
        public Boolean funOpenSecs(string strEqpId)
        {
            Boolean dbolReturn = false;

            try
            {
                this.pHostAct       = new HostAct.clsHostAct();                    //HostAct 인스턴스 생성
                this.pHostAct.PInfo = clsConstant.gInfo;

                //Open을 시도한다.
                int dintReturn = this.pHostAct.funOpenSecsDrv(strEqpId);
                //리턴값이 1006이면 정상
                if (dintReturn == 1006)
                {
                    this.pHostAct.funThreadInitial();      //Secs Driver가 성공적으로 Open되면 HOST 자체 송신 Thread를 실행한다.
                    dbolReturn = true;
                }
                else
                {                                        //Open이 되지 않아 에러가 발생한 경우
                    dbolReturn = false;
                }
            }
            catch (Exception ex)
            {
                this.PInfo.subLog_Set(InfoAct.clsInfo.LogType.CIM, ex.ToString());
            }

            return(dbolReturn);
        }
Exemple #2
0
        public void subInitialDisplay()
        {
            try
            {
                //3기는 폼이 다름(사이즈)
                if (this.PInfo.EQP("Main").EQPType == "3")
                {
                    this.pfrmMain_3th       = new DisplayMainAct.frmMainDisplay_3th();
                    this.pfrmMain_3th.PInfo = clsConstant.gInfo;    //EQPACT.DLL에 구조체정보를 공유할수 있도록 넘긴다.

                    pfrmMain_3th.subformShow();
                }
                else
                {
                    this.pfrmMain       = new DisplayMainAct.frmMainDisplay_4th();
                    this.pfrmMain.PInfo = clsConstant.gInfo;    //EQPACT.DLL에 구조체정보를 공유할수 있도록 넘긴다.

                    pfrmMain.subformShow();
                }
            }
            catch (Exception ex)
            {
                this.PInfo.subLog_Set(InfoAct.clsInfo.LogType.CIM, ex.ToString());
            }
        }
Exemple #3
0
        /// <summary>
        /// 초기화시 "PLCLOG" 폴더가 없으면 생성하고 로그 출력 Timer 생성
        /// </summary>
        /// <remarks>
        /// 최초 프로그램 로딩시 한번만 수행됨
        /// 2006/10/25  김효주  [L 00]
        /// </remarks>
        public void subInitialLog()
        {
            string dstrIPAddress  = "192.169.1.1";
            string dstrPortNumber = "21";

            try
            {
                DirectoryInfo dir = new DirectoryInfo(pstrLogFilesPath);     //PLCLOG 폴더가 없으면 생성한다.
                dir.Create();

                this.pfrmLogView       = new frmLogView();
                this.pfrmLogView.PInfo = this.PInfo;

                this.pfrmDataView       = new frmDataView();
                this.pfrmDataView.PInfo = this.PInfo;
                this.pfrmDataView.subFormLoad();



                // hashtable 준비

                subInitLogFileInfoHash();


                //FTP 객체 생성     //추가 : 20101001 이상호
                pFTP       = new InfoAct.clsFTP_Client(dstrIPAddress + ":" + dstrPortNumber, "", "");
                pFTP.PInfo = this.PInfo;

                //PLC Log Tick Timer 설정
                this.ptmrLogWrite          = new System.Windows.Forms.Timer();
                this.ptmrLogWrite.Tick    += new EventHandler(LogWrite_Tick);
                this.ptmrLogWrite.Interval = 500;      //500ms
                this.ptmrLogWrite.Enabled  = true;
                GC.KeepAlive(this.ptmrLogWrite);

                //MMC Log Tick Timer 설정
                this.ptmrMCCLogUpdate          = new System.Windows.Forms.Timer();
                this.ptmrMCCLogUpdate.Tick    += new EventHandler(MCCLogUpdate_Tick);
                this.ptmrMCCLogUpdate.Interval = 1000;      //500ms
                this.ptmrMCCLogUpdate.Enabled  = true;
                GC.KeepAlive(this.ptmrMCCLogUpdate);
            }
            catch (Exception ex)
            {
                this.PInfo.subLog_Set(InfoAct.clsInfo.LogType.CIM, ex.ToString());
            }
        }