コード例 #1
0
ファイル: tabfrmSetupEQP.cs プロジェクト: k2un/k2un
 private void tabfrmSetupEQPInfo_Load(object sender, EventArgs e)
 {
     try
     {
         this.lblLastModified.Text = FunINIMethod.funINIReadValue("ETCInfo", "EQPLastModified", "", this.pInfo.All.SystemINIFilePath);
         this.txtEQPID.Text        = pInfo.EQP("Main").EQPID;
         this.txtMDLN.Text         = pInfo.All.MDLN;
         this.txtSlotCount.Text    = Convert.ToString(pInfo.EQP("Main").SlotCount);
         this.txtUnitCount.Text    = Convert.ToString(pInfo.UnitCount);
         this.txtKeepDays.Text     = pInfo.All.ProcDataKeepDays.ToString();
     }
     catch (Exception ex)
     {
         pInfo.subLog_Set(InfoAct.clsInfo.LogType.CIM, ex.ToString());
     }
 }
コード例 #2
0
ファイル: frmLoading.cs プロジェクト: k2un/k2un
        /// <summary>
        /// 각 Class를 Loading하고 Initial한다.
        /// </summary>
        public void subclsInitial()
        {
            try
            {
                subProgressText("PlugIn Loading");
                pclsDBActPlugIn      = new clsDBActPlugIn();                            //DB를 다루기위한 PlugIn cls정의및 생성
                pclsInfoPlugIn       = new clsInfoActPlugIn();                          //구조체를 다루기위한 PlugIn cls정의및 생성
                pclsLogActPlugIn     = new clsLogActPlugIn();
                pclsHostActPlugIn    = new clsHostActPlugIn();                          //호스트를 다루기위한 PlugIn cls정의및 생성
                pclsEqpActPlugIn     = new clsEqpActPlugIn();                           //장비를 다루기위한 PlugIn cls정의및 생성
                pclsDisplayActPlugIn = new clsDisplayActPlugIn();

                if (pInfo.AddAll() == true)
                {
                    string dModelINI = Application.StartupPath + @"\system\EqpModel.ini";
                    pInfo.All.MODEL_NAME = FunINIMethod.funINIReadValue("MODEL", "NAME", "", dModelINI);
                }

                subProgressText("DBAct Initial");
                pclsDBActPlugIn.funConnectDB(pInfo.All.MODEL_NAME);                                         //DB OPEN

                subProgressText("InfoAct Initial");
                pclsInfoPlugIn.subInitialInfo(pInfo.All.MODEL_NAME);                                        //구조체 초기화

                subProgressText("LogAct Initial");
                pclsLogActPlugIn.subInitialLog();                                       //Log 폴더 Initial

                subProgressText("DisplayAct Initial");
                pclsDisplayActPlugIn.subInitial();                                      //Main Form Load

                subProgressText("EqpAct Initial");
                pclsEqpActPlugIn.funOpenPLC();                                          //장비 초기화

                subProgressText("HostAct Initial");
                pclsHostActPlugIn.funOpenSecs("EAP01");                                 //호스트 초기화

                pclsDBActPlugIn.funDisconnectDB();                                      //DB CLOSE
                this.pgbLoading.Value = 100;
            }
            catch (Exception ex)
            {
                this.pInfo.subLog_Set(InfoAct.clsInfo.LogType.CIM, ex.ToString());
            }
        }
コード例 #3
0
ファイル: frmLoading.cs プロジェクト: k2un/k2un
        //*******************************************************************************
        //  Function Name : subclsInitial()
        //  Description   : 각 Class를 Loading하고 Initial한다.
        //  Parameters    : None
        //  Return Value  : None
        //  Special Notes :
        //*******************************************************************************
        //  2006/11/02          어 경태             [L 00]
        //*******************************************************************************
        public void subclsInitial()
        {
            try
            {
                subProgressText("PlugIn Loading");
                pclsDBActPlugIn  = new clsDBActPlugIn();                                //DB를 다루기위한 PlugIn cls정의및 생성
                pclsInfoPlugIn   = new clsInfoActPlugIn();                              //구조체를 다루기위한 PlugIn cls정의및 생성
                pclsLogActPlugIn = new clsLogActPlugIn();
                pclsEqpActPlugIn = new clsEqpActPlugIn();                               //장비를 다루기위한 PlugIn cls정의및 생성

                if (pInfo.AddAll() == true)
                {
                    string dModelINI = @"D:\Source\STM\bin\Debug\system\EqpModel.ini";
                    pInfo.All.MODEL_NAME = FunINIMethod.funINIReadValue("MODEL", "NAME", "", dModelINI);
                }

                subProgressText("DBAct Initial");
                pclsDBActPlugIn.funConnectDB(pInfo.All.MODEL_NAME);                                         //DB OPEN

                subProgressText("InfoAct Initial");
                pclsInfoPlugIn.subInitialInfo(pInfo.All.MODEL_NAME);                    //구조체 초기화

                subProgressText("LogAct Initial");
                //pclsLogActPlugIn.PInfo = this.pInfo;
                pclsLogActPlugIn.subInitialLog();                                       //Log 폴더 Initial

                subProgressText("EqpAct Initial");
                pclsEqpActPlugIn.funOpenPLC();                                          //장비 초기화

                pclsDBActPlugIn.funDisconnectDB();                                      //DB CLOSE
                this.pgbLoading.Value = 100;
            }
            catch (Exception ex)
            {
                this.pInfo.subLog_Set(InfoAct.clsInfo.LogType.CIM, ex.ToString());
            }
        }
コード例 #4
0
ファイル: tabfrmSetupEOID.cs プロジェクト: k2un/k2un
        public void Save()
        {
            File.Copy(Application.StartupPath + @"\system\System.mdb", Application.StartupPath + @"\system\System.mdb.bak", true);

            string     dstrSQL;
            DataTable  dDT;
            int        dintIndex    = 0;
            int        dintEOV      = 0;
            bool       dbolError    = false;
            SortedList dHT          = new SortedList();
            string     dstrAfterEOV = "";


            try
            {
                //유효성검사
                for (int dintLoop = 0; dintLoop < this.dataGridView1.RowCount; dintLoop++)
                {
                    dintIndex = Convert.ToInt32(this.dataGridView1.Rows[dintLoop].Cells[0].Value);
                    dintEOV   = Convert.ToInt32(this.dataGridView1.Rows[dintLoop].Cells[5].Value);

                    if (dintEOV >= this.pInfo.Unit(0).SubUnit(0).EOID(dintIndex).EOVMin&& dintEOV <= this.pInfo.Unit(0).SubUnit(0).EOID(dintIndex).EOVMax)
                    {
                        if (this.pInfo.Unit(0).SubUnit(0).EOID(dintIndex).EOID == 8)          //EOID=8이면 VCR Reading Mode임.
                        {
                            if (dintEOV == 0 || dintEOV == 1 || dintEOV == 2 || dintEOV == 3) //VCR Reading Mode는 0,1,2,3 만 값이 있다.
                            {
                            }
                            else
                            {
                                dbolError = true;
                            }
                        }

                        if (this.pInfo.Unit(0).SubUnit(0).EOID(dintIndex).EOID == 19) //SEM
                        {
                            if (dintEOV == 1)
                            {
                                //pInfo.All.SEM_ON = true;
                                //if (pInfo.All.CommPort.ToUpper() != "NULL") pInfo.subPLCCommand_Set(InfoAct.clsInfo.PLCCommand.SerialPortOpen);

                                this.pInfo.subPLCCommand_Set(InfoAct.clsInfo.PLCCommand.UDPPortOpen);
                                //SEM Controller에 Start명령을 내린다.
                                this.pInfo.subPLCCommand_Set(InfoAct.clsInfo.PLCCommand.SEMControllerStart);
                            }
                            else
                            {
                                //pInfo.All.SEM_ON = false;
                                this.pInfo.subPLCCommand_Set(InfoAct.clsInfo.PLCCommand.SEMControllerEnd);

                                this.pInfo.subPLCCommand_Set(InfoAct.clsInfo.PLCCommand.UDPPortClose);
                            }
                        }

                        if (this.pInfo.Unit(0).SubUnit(0).EOID(dintIndex).EOID == 21) //APC
                        {
                            if (dintEOV == 0 || dintEOV == 1)
                            {
                                if (dintEOV == 0)
                                {
                                    pInfo.All.APCUSE = false;
                                }
                                else
                                {
                                    pInfo.All.APCUSE = true;
                                }
                            }
                            else
                            {
                                dbolError = true;
                            }
                        }

                        if (this.pInfo.Unit(0).SubUnit(0).EOID(dintIndex).EOID == 22) //RPC
                        {
                            if (dintEOV == 0 || dintEOV == 1)
                            {
                                if (dintEOV == 0)
                                {
                                    pInfo.All.RPCUSE = false;
                                }
                                else
                                {
                                    pInfo.All.RPCUSE = true;
                                }
                            }
                            else
                            {
                                dbolError = true;
                            }
                        }
                    }
                    else
                    {
                        dbolError = true;
                    }

                    if (dbolError == true)
                    {
                        dstrErrorMsg = this.pInfo.Unit(0).SubUnit(0).EOID(dintIndex).DESC + " 값은 " + this.pInfo.Unit(0).SubUnit(0).EOID(dintIndex).EOVMin
                                       + "~" + this.pInfo.Unit(0).SubUnit(0).EOID(dintIndex).EOVMax + " 이어야 합니다.";
                        MessageBox.Show(dstrErrorMsg, "Error!", MessageBoxButtons.OK, MessageBoxIcon.Warning);
                        return;
                    }
                }

                //바뀐 EOV 값이 있는지 검사한다.
                for (int dintLoop = 0; dintLoop < this.dataGridView1.RowCount; dintLoop++)
                {
                    //dintIndex = dintLoop + 1;
                    dintIndex = Convert.ToInt32(this.dataGridView1.Rows[dintLoop].Cells[0].Value);
                    dintEOV   = Convert.ToInt32(this.dataGridView1.Rows[dintLoop].Cells[5].Value);
                    if (this.pInfo.Unit(0).SubUnit(0).EOID(dintIndex).EOV != dintEOV)
                    {
                        dstrAfterEOV = dstrAfterEOV + dintIndex.ToString() + ";";              //EOID 저장
                        dHT.Add(dintIndex, this.pInfo.Unit(0).SubUnit(0).EOID(dintIndex).EOV); //변경전의 EOID, EOV 저장

                        //if (this.PInfo.funGetEOIDLapseTime(dintIndex) == true) dbolProcessTimeOverChange = true;
                    }
                }

                if (dstrAfterEOV == "")
                {
                    MessageBox.Show("변경된 EOV가 하나도 없습니다.", "Information", MessageBoxButtons.OK, MessageBoxIcon.Information);
                    return;
                }

                if (!DBAct.clsDBAct.funBeginTransaction())
                {
                    MessageBox.Show("DB Transaction NG!", "Error!", MessageBoxButtons.OK, MessageBoxIcon.Warning);
                    return;
                }

                //DataAdapter 생성
                OleDbDataAdapter    dataAdapter    = new OleDbDataAdapter("SELECT * FROM tbEOID order by Index", DBAct.clsDBAct.funOleDbConnect());
                OleDbCommandBuilder commandBuilder = new OleDbCommandBuilder(dataAdapter);

                //DataAdapter를 이용하여 DB로 업데이트를 한다.
                dataAdapter.SelectCommand.Transaction = DBAct.clsDBAct.funOleDbTransaction();
                dataAdapter.Update((DataTable)pEOIDListSource.DataSource);

                if (!DBAct.clsDBAct.funCommitTransaction())
                {
                    MessageBox.Show("DB Commit Transaction NG!", "Error!", MessageBoxButtons.OK, MessageBoxIcon.Warning);
                    DBAct.clsDBAct.funRollbackTransaction();
                    return;
                }



                dstrSQL = "SELECT * FROM tbEOID order by index";
                //dDT = DBAct.clsDBAct.funSelectQuery2(dstrSQL);                          //DataTable을 받아온다.
                dDT = DBAct.clsDBAct.funSelectQuery2(dstrSQL);
                if (dDT != null)
                {
                    pInfo.Unit(0).SubUnit(0).RemoveEOID();

                    pInfo.DeleteTable("EOID");
                    pInfo.AddDataTable("EOID", dDT);

                    foreach (DataRow dr in dDT.Rows)
                    {
                        dintIndex = Convert.ToInt32(dr["Index"]);
                        pInfo.Unit(0).SubUnit(0).AddEOID(dintIndex);

                        pInfo.Unit(0).SubUnit(0).EOID(dintIndex).EOID     = Convert.ToInt32(dr["EOID"]);
                        pInfo.Unit(0).SubUnit(0).EOID(dintIndex).EOMD     = Convert.ToInt32(dr["EOMD"]);
                        pInfo.Unit(0).SubUnit(0).EOID(dintIndex).EOMDMin  = Convert.ToInt32(dr["EOMDMin"]);
                        pInfo.Unit(0).SubUnit(0).EOID(dintIndex).EOMDMax  = Convert.ToInt32(dr["EOMDMax"]);
                        pInfo.Unit(0).SubUnit(0).EOID(dintIndex).EOV      = Convert.ToInt32(dr["EOV"]);
                        pInfo.Unit(0).SubUnit(0).EOID(dintIndex).EOVMin   = Convert.ToInt32(dr["EOVMin"]);
                        pInfo.Unit(0).SubUnit(0).EOID(dintIndex).EOVMax   = Convert.ToInt32(dr["EOVMax"]);
                        pInfo.Unit(0).SubUnit(0).EOID(dintIndex).DESC     = dr["Description"].ToString();
                        pInfo.Unit(0).SubUnit(0).EOID(dintIndex).PLCWrite = Convert.ToBoolean(dr["PLCWrite"]);
                    }
                }
                string[] dstrData = dstrAfterEOV.Split(new char[] { ';' });
                if (dstrData.Length > 1)
                {
                    this.pInfo.All.EOIDChangeBYWHO = "2";       //BY OP

                    //HOST로 EOV값 변경 보고
                    this.pInfo.subSendSF_Set(InfoAct.clsInfo.SFName.S6F11RelatedEquipmentParameterEvent, 101, dstrAfterEOV); //마지막 인자는 EOID Index임

                    this.pInfo.All.EOIDChangeBYWHO = "";                                                                     //초기화

                    //변경 이력 로그 저장
                    foreach (DictionaryEntry de in dHT)
                    {
                        dintIndex = Convert.ToInt32(de.Key);        //EOID Index

                        string dstrLog = "";
                        dstrLog = dstrLog + "EOID" + ",";
                        dstrLog = dstrLog + DateTime.Now.ToString("yyyyMMddHHmmss") + ",";
                        dstrLog = dstrLog + "변경" + ",";
                        dstrLog = dstrLog + this.pInfo.All.UserID + ",";
                        dstrLog = dstrLog + this.pInfo.Unit(0).SubUnit(0).EOID(dintIndex).DESC + ",";
                        dstrLog = dstrLog + de.Value.ToString() + ",";
                        dstrLog = dstrLog + this.pInfo.Unit(0).SubUnit(0).EOID(dintIndex).EOV;

                        this.pInfo.subLog_Set(InfoAct.clsInfo.LogType.Parameter, dstrLog); //로그 출력

                        dstrLog = "";                                                      //초기화


                        //만약 EOID중에 PLC로 변경할 것이 있으면 Write해 준다.
                        if (this.pInfo.Unit(0).SubUnit(0).EOID(dintIndex).PLCWrite == true)
                        {
                            switch (dintIndex)
                            {
                            //case 8:                       //VCR Reading Mode
                            //    this.PInfo.subPLCCommand_Set(InfoAct.clsInfo.PLCCommand.VCRReadingMode, this.PInfo.Unit(0).SubUnit(0).EOID(dintIndex).EOV);
                            //    break;

                            case 1:                           //APC(Advanced Process Control) MODE
                                this.pInfo.subPLCCommand_Set(InfoAct.clsInfo.PLCCommand.APCMode, this.pInfo.Unit(0).SubUnit(0).EOID(dintIndex).EOV);
                                break;

                            default:
                                break;
                            }
                        }
                        else
                        {
                            switch (dintIndex)
                            {
                            case 2:                           //MCC Reporting Mode

                                if (this.pInfo.Unit(0).SubUnit(0).EOID(dintIndex).EOV == 1)
                                {
                                    FunINIMethod.funINIReadValue("MCC", "MCCFileUploadUse", "True", this.pInfo.All.SystemINIFilePath);
                                }
                                else
                                {
                                    FunINIMethod.funINIReadValue("MCC", "MCCFileUploadUse", "False", this.pInfo.All.SystemINIFilePath);
                                }
                                break;

                            default:
                                break;
                            }
                        }
                    }
                }

                subSaveLastModified(); //최종 수정된 날짜를 Ini파일에 저장한다.

                MessageBox.Show("Data Save Success!", "Jobs Complete", MessageBoxButtons.OK, MessageBoxIcon.Information);
            }
            catch (Exception ex)
            {
                pInfo.subLog_Set(InfoAct.clsInfo.LogType.CIM, ex.ToString());
                DBAct.clsDBAct.funRollbackTransaction();
                DBAct.clsDBAct.funDisconnect();     // DB 연결을 끊는다.
                MessageBox.Show("DB Update Fail, Because DB Process Error!", "DB Update Error!",
                                MessageBoxButtons.OK, MessageBoxIcon.Warning);
            }
        }
コード例 #5
0
        //*******************************************************************************
        //  Function Name : subEQPInfoInitial()
        //  Description   : System.ini를 읽어 EQP 정보를 구성한다.
        //  Parameters    :
        //  Return Value  :
        //  Special Notes : INI로부터 데이타를 읽어 저장한다.
        //*******************************************************************************
        //  2006/10/12          어 경태         [L 00]
        //  2007/02/26          김 효주         [L 01]  All(공통), EQP별로 구분
        //*******************************************************************************
        private void subEQPInfoInitial(string strEQPName)
        {
            string dSystemINI       = ""; //= Application.StartupPath + @"\system\System_" + strEQPName + ".ini";
            string dSecomINI        = Application.StartupPath + @"\system\SEComINI.EXP";
            string dCFGFile         = Application.StartupPath + @"\system\SDCA3.cfg";
            string dstrSectionUnit  = "UNIT";
            string dstrSectionPort  = "PORT";
            string dstrSectionHOST  = "HOST";
            string dstrSectionInfo  = "ETCInfo";
            string dstrSectionVCR   = "VCRReadingResult";
            string dstrSectionMCC   = "MCC";              //추가 : 20100101 이상호
            string dstrSectionSEM   = "SEM";              //SEM 추가 - 110915 고석현
            string dstrSectionSecom = "EAP01";            //Secom Driver 이름
            string dstrSectionEQP   = "CommunicationEQP"; //EQP 이름
            string dstrEQPID        = "";
            string dstrKey          = "";
            int    dintCount        = 0;

            try
            {
                string   strBasicPath = Application.StartupPath;
                string[] arrCon       = strBasicPath.Split('\\');
                strBasicPath = "";
                for (int dintLoop = 0; dintLoop < arrCon.Length; dintLoop++)
                {
                    if (arrCon[dintLoop] != "MCC")
                    {
                        if (dintLoop == arrCon.Length - 1)
                        {
                            strBasicPath += arrCon[dintLoop];
                        }
                        else
                        {
                            strBasicPath += arrCon[dintLoop] + "\\";
                        }
                    }
                }
                dSystemINI = strBasicPath + @"\system\System_" + strEQPName + ".ini";

                //EQP에 관계없이 응용 프로그램 공통으로 사용할 정보(All)를 구성한다.
                //if (this.PInfo.AddAll() == true)
                //{
                //INI파일경로를 저장한다.
                this.PInfo.All.SystemINIFilePath = dSystemINI;
                PInfo.All.MCCINIFilePath         = Application.StartupPath + @"\system\System.ini";

                this.PInfo.All.SecomINIFilePath = dSecomINI;

                //프로그램 기동시 HOST 로그 보관 기간을 91일(13주)로 Write한다.
                //왜냐하면 SecomClient에서 91일(13주)은 설정이 안되기 때문임
                //FunINIMethod.subINIWriteValue("EAP01", "LOGBACKUP", "91", this.PInfo.All.SecomINIFilePath);

                //HOST정보를 INI에서 읽어 구조체이 저장한다.
                this.PInfo.All.DeviceID   = Convert.ToInt32(FunINIMethod.funINIReadValue("EAP01", "DEVICEID", "1", this.PInfo.All.SecomINIFilePath));
                this.PInfo.All.RetryCount = Convert.ToInt32(FunINIMethod.funINIReadValue("EAP01", "RETRYCOUNT", "3", this.PInfo.All.SecomINIFilePath));
                this.PInfo.All.LocalPort  = FunINIMethod.funINIReadValue("EAP01", "LOCALPORTNUMBER", "7000", this.PInfo.All.SecomINIFilePath);

                this.PInfo.All.T3 = Convert.ToInt32(FunINIMethod.funINIReadValue(dstrSectionSecom, "T3", "45", this.PInfo.All.SecomINIFilePath));
                this.PInfo.All.T5 = Convert.ToInt32(FunINIMethod.funINIReadValue(dstrSectionSecom, "T5", "10", this.PInfo.All.SecomINIFilePath));
                this.PInfo.All.T6 = Convert.ToInt32(FunINIMethod.funINIReadValue(dstrSectionSecom, "T6", "5", this.PInfo.All.SecomINIFilePath));
                this.PInfo.All.T7 = Convert.ToInt32(FunINIMethod.funINIReadValue(dstrSectionSecom, "T7", "10", this.PInfo.All.SecomINIFilePath));
                this.PInfo.All.T8 = Convert.ToInt32(FunINIMethod.funINIReadValue(dstrSectionSecom, "T8", "5", this.PInfo.All.SecomINIFilePath));
                this.PInfo.All.T9 = Convert.ToInt32(FunINIMethod.funINIReadValue(dstrSectionHOST, "T9", "45", this.PInfo.All.SystemINIFilePath));

                //VCR Reading Result 정보를 읽는다.
                this.PInfo.All.VCRPass         = Convert.ToInt32(FunINIMethod.funINIReadValue(dstrSectionVCR, "Pass", "0", this.PInfo.All.SystemINIFilePath));
                this.PInfo.All.VCRPMDT         = Convert.ToInt32(FunINIMethod.funINIReadValue(dstrSectionVCR, "PMDT", "0", this.PInfo.All.SystemINIFilePath));
                this.PInfo.All.VCRMatch        = Convert.ToInt32(FunINIMethod.funINIReadValue(dstrSectionVCR, "Match", "0", this.PInfo.All.SystemINIFilePath));
                this.PInfo.All.VCRMismatch     = Convert.ToInt32(FunINIMethod.funINIReadValue(dstrSectionVCR, "Mismatch", "0", this.PInfo.All.SystemINIFilePath));
                this.PInfo.All.VCRKeyin        = Convert.ToInt32(FunINIMethod.funINIReadValue(dstrSectionVCR, "Keyin", "0", this.PInfo.All.SystemINIFilePath));
                this.PInfo.All.VCRTimeout      = Convert.ToInt32(FunINIMethod.funINIReadValue(dstrSectionVCR, "Timeout", "0", this.PInfo.All.SystemINIFilePath));
                this.PInfo.All.VCRSkip         = Convert.ToInt32(FunINIMethod.funINIReadValue(dstrSectionVCR, "Skip", "0", this.PInfo.All.SystemINIFilePath));
                this.PInfo.All.VCRLastModified = FunINIMethod.funINIReadValue(dstrSectionVCR, "LastModified", "", this.PInfo.All.SystemINIFilePath);

                //MMC Log Data 관련 설정을 읽어 온다.           //추가 : 20101001 이상호
                this.PInfo.All.MCCNetworkPath      = FunINIMethod.funINIReadValue(dstrSectionMCC, "NetworkPath", "Ftp://192.168.1.1/", this.PInfo.All.SystemINIFilePath);
                this.PInfo.All.MCCNetworkBasicPath = FunINIMethod.funINIReadValue(dstrSectionMCC, "NetworkBasicPath", "", this.PInfo.All.SystemINIFilePath);
                this.PInfo.All.MCCNetworkPort      = FunINIMethod.funINIReadValue(dstrSectionMCC, "NetworkPort", "21", this.PInfo.All.SystemINIFilePath);
                this.PInfo.All.MCCNetworkUserID    = FunINIMethod.funINIReadValue(dstrSectionMCC, "NetworkUserID", "USERID", this.PInfo.All.SystemINIFilePath);
                this.PInfo.All.MCCNetworkPassword  = FunINIMethod.funINIReadValue(dstrSectionMCC, "NetworkPassword", "PASSWORD", this.PInfo.All.SystemINIFilePath);
                this.PInfo.All.MCCLootFilePath     = FunINIMethod.funINIReadValue(dstrSectionMCC, "LootFilePath", @"C:\MCCLOG", this.PInfo.All.SystemINIFilePath);
                this.PInfo.All.MCCFileUploadTime   = Convert.ToInt32(FunINIMethod.funINIReadValue(dstrSectionMCC, "MCCFileUploadTime", "0", this.PInfo.All.SystemINIFilePath));
                this.PInfo.All.MCCFileUploadUse    = Convert.ToBoolean(FunINIMethod.funINIReadValue(dstrSectionMCC, "MCCFileUploadUse", "True", this.PInfo.All.SystemINIFilePath));
                this.PInfo.All.MCCLogFileDelete    = Convert.ToInt32(FunINIMethod.funINIReadValue(dstrSectionMCC, "MCCLogFileDelete", "0", this.PInfo.All.SystemINIFilePath));

                //SEM 관련 설정을 읽어온다. - 110915 고석현
                this.PInfo.All.CommPort                = FunINIMethod.funINIReadValue(dstrSectionSEM, "SEM_Port", "NULL", this.PInfo.All.SystemINIFilePath);
                this.PInfo.All.SEM_BaudRate            = FunINIMethod.funINIReadValue(dstrSectionSEM, "SEM_BaudRate", "57600", this.PInfo.All.SystemINIFilePath);
                this.PInfo.All.SEMAlarmTime            = Convert.ToInt32(FunINIMethod.funINIReadValue(dstrSectionSEM, "SEM_AlarmTime", "8", this.PInfo.All.SystemINIFilePath));
                this.PInfo.All.SEM_ErrorDelayCheckTime = Convert.ToInt32(FunINIMethod.funINIReadValue(dstrSectionSEM, "SEM_ErrorDelayCheckTime", "10", this.PInfo.All.SystemINIFilePath));
                this.PInfo.All.SEM_ErrorCheckCount     = Convert.ToInt32(FunINIMethod.funINIReadValue(dstrSectionSEM, "SEM_ErrorCheckCount", "60", this.PInfo.All.SystemINIFilePath));


                //ETCInfo정보를 INI에서 읽어 구조체이 저장한다.
                this.PInfo.All.MDLN = FunINIMethod.funINIReadValue(dstrSectionInfo, "MDLN", "", this.PInfo.All.SystemINIFilePath);
                //this.PInfo.All.UserID = FunINIMethod.funINIReadValue(dstrSectionInfo, "UserID", "", this.PInfo.All.SystemINIFilePath);
                this.PInfo.All.CurrentLOTIndex = Convert.ToInt32(FunINIMethod.funINIReadValue(dstrSectionInfo, "CurrentLOTIndex", "0", this.PInfo.All.SystemINIFilePath));                     //현재까지 발번한 LOTIndex(1~999)
                this.PInfo.All.SoftVersion     = FunINIMethod.funINIReadValue(dstrSectionInfo, "SOFTREV", "", this.PInfo.All.SystemINIFilePath);

                this.PInfo.All.LoginFalg = (FunINIMethod.funINIReadValue(dstrSectionInfo, "LoginFlag", "TRUE", this.PInfo.All.SystemINIFilePath).ToUpper() == "FALSE") ? false : true;

                //모니터 해상도
                this.PInfo.All.SizeWidth  = 1024;
                this.PInfo.All.SizeHeight = 768;     // SystemInformation.PrimaryMonitorSize.Height;
                //}


                //EQPCount를 가져온다.
                dintCount = Convert.ToInt32(FunINIMethod.funINIReadValue(dstrSectionInfo, "EQPCount", "1", this.PInfo.All.SystemINIFilePath));

                //EQPCount 만큼 돌면서 기준정보를 저장한다.
                for (int dintLoop = 1; dintLoop <= dintCount; dintLoop++)
                {
                    dstrKey   = "EQP" + dintLoop.ToString();
                    dstrEQPID = FunINIMethod.funINIReadValue(dstrSectionEQP, dstrKey, "Main", this.PInfo.All.SystemINIFilePath);
                    if (this.PInfo.AddEQP(dstrEQPID) == true)
                    {
                        //UNIT정보를 INI에서 읽어 구조체에 저장한다.
                        this.PInfo.EQP(dstrEQPID).UnitCount = Convert.ToInt32(FunINIMethod.funINIReadValue(dstrSectionUnit, "Count", "0", this.PInfo.All.SystemINIFilePath));

                        //PORT정보를 INI에서 읽어 구조체에 저장한다.
                        this.PInfo.EQP(dstrEQPID).SlotCount = Convert.ToInt32(FunINIMethod.funINIReadValue(dstrSectionPort, "SlotCount", "25", this.PInfo.All.SystemINIFilePath));

                        //PLC정보를 INI에서 읽어 구조체에 저장한다.
                        this.PInfo.EQP(dstrEQPID).DummyPLC     = Convert.ToBoolean(FunINIMethod.funINIReadValue(dstrEQPID, "Dummy", "true", this.PInfo.All.MCCINIFilePath));
                        this.PInfo.EQP(dstrEQPID).Type         = FunINIMethod.funINIReadValue(dstrEQPID, "Type", "PLC", this.PInfo.All.MCCINIFilePath);
                        this.PInfo.EQP(dstrEQPID).WordStart    = FunINIMethod.funINIReadValue(dstrEQPID, "Word1 Start", "W0000", this.PInfo.All.MCCINIFilePath);
                        this.PInfo.EQP(dstrEQPID).WordEnd      = FunINIMethod.funINIReadValue(dstrEQPID, "Word1 End", "W0000", this.PInfo.All.MCCINIFilePath);
                        this.PInfo.EQP(dstrEQPID).BitScanCount = FunINIMethod.funINIReadValue(dstrEQPID, "Scan Area Count", "3", this.PInfo.All.MCCINIFilePath);

                        //Scan에 필요한 값들을 읽어온다. 어경태 20071119
                        this.PInfo.EQP(dstrEQPID).ScanTime       = Convert.ToInt32(FunINIMethod.funINIReadValue(dstrEQPID, "ScanTime", "200", PInfo.All.MCCINIFilePath));
                        this.PInfo.EQP(dstrEQPID).WorkingSizeMin = Convert.ToInt32(FunINIMethod.funINIReadValue(dstrEQPID, "WorkingSizeMin", "1", PInfo.All.MCCINIFilePath));
                        this.PInfo.EQP(dstrEQPID).WorkingSizeMax = Convert.ToInt32(FunINIMethod.funINIReadValue(dstrEQPID, "WorkingSizeMax", "3", PInfo.All.MCCINIFilePath));

                        for (int dintIndex = 1; dintIndex <= 10; dintIndex++)
                        {
                            dstrKey = "Area" + dintIndex.ToString() + " ";
                            this.PInfo.EQP(dstrEQPID).BitScanEnabled[dintIndex] = Convert.ToBoolean(FunINIMethod.funINIReadValue(dstrEQPID, dstrKey + "Scan", "", this.PInfo.All.MCCINIFilePath));
                            this.PInfo.EQP(dstrEQPID).BitScanStart[dintIndex]   = FunINIMethod.funINIReadValue(dstrEQPID, dstrKey + "Start", "", this.PInfo.All.MCCINIFilePath);
                            this.PInfo.EQP(dstrEQPID).BitScanEnd[dintIndex]     = FunINIMethod.funINIReadValue(dstrEQPID, dstrKey + "End", "", this.PInfo.All.MCCINIFilePath);
                        }

                        //EQP
                        this.PInfo.EQP("Main").EQPID       = FunINIMethod.funINIReadValue(dstrSectionInfo, "EQPID", "EAP01", this.PInfo.All.SystemINIFilePath);
                        this.PInfo.EQP("Main").EQPName     = FunINIMethod.funINIReadValue(dstrSectionInfo, "EQPName", "WET ETCH", this.PInfo.All.SystemINIFilePath);
                        this.PInfo.EQP("Main").EQPType     = FunINIMethod.funINIReadValue(dstrSectionInfo, "EQPType", "", this.PInfo.All.SystemINIFilePath);
                        this.PInfo.EQP("Main").RecipeCheck = Convert.ToBoolean(FunINIMethod.funINIReadValue(dstrSectionInfo, "RecipeCheck", "true", this.PInfo.All.SystemINIFilePath));
                    }

                    //검사기 PC 설정 ---------------------------------------------------------------------------------------------------------------------------------------
                    this.PInfo.EQP(dstrEQPID).DummyPC    = Convert.ToBoolean(FunINIMethod.funINIReadValue("MCC_PC", "DummyPC", "true", this.PInfo.All.SystemINIFilePath));
                    this.PInfo.EQP(dstrEQPID).LocalPort  = FunINIMethod.funINIReadValue("MCC_PC", "LocalPort", "7050", this.PInfo.All.SystemINIFilePath);
                    this.PInfo.EQP(dstrEQPID).T3         = Convert.ToInt32(FunINIMethod.funINIReadValue("MCC_PC", "T3", "60", this.PInfo.All.SystemINIFilePath));
                    this.PInfo.EQP(dstrEQPID).RetryCount = Convert.ToInt32(FunINIMethod.funINIReadValue("MCC_PC", "RETRY", "3", this.PInfo.All.SystemINIFilePath));
                }
            }
            catch (Exception ex)
            {
                this.PInfo.subLog_Set(InfoAct.clsInfo.LogType.CIM, ex.ToString());
            }
        }