Exemplo n.º 1
0
        public void funInitializeForm()
        {
            try
            {
                tabfrmSEM      = new tabfrmInfoSEM();
                tabfrmSEM.Dock = DockStyle.Fill;

                tabfrmAPC      = new tabfrmInfoAPC();
                tabfrmAPC.Dock = DockStyle.Fill;

                //tabfrmPPC = new tabfrmInfoPPC();
                //tabfrmPPC.Dock = DockStyle.Fill;

                tabfrmRPC      = new tabfrmInfoRPC();
                tabfrmRPC.Dock = DockStyle.Fill;

                tabfrmMultiUseData      = new tabfrmInfoMultiData();
                tabfrmMultiUseData.Dock = DockStyle.Fill;

                this.tabControl1.Controls.Clear();
            }
            catch (Exception ex)
            {
                if (pInfo != null)
                {
                    pInfo.subLog_Set(clsInfo.LogType.CIM, ex.ToString());
                }
            }
        }
Exemplo n.º 2
0
 private void subSemState()
 {
     try
     {
         if (PInfo.EQP("Main").UDPConnect != pbolSEM)
         {
             if (PInfo.EQP("Main").UDPConnect)
             {
                 lblSEMState.Text      = "Connected";
                 lblSEMState.BackColor = Color.Blue;
                 lblSEMState.ForeColor = Color.White;
             }
             else
             {
                 lblSEMState.Text      = "DisConnected";
                 lblSEMState.BackColor = Color.Red;
                 lblSEMState.ForeColor = Color.White;
             }
             pbolSEM = PInfo.EQP("Main").UDPConnect;
         }
     }
     catch (Exception ex)
     {
         PInfo.subLog_Set(clsInfo.LogType.CIM, ex.ToString());
     }
 }
Exemplo n.º 3
0
        public void funInitializeForm()
        {
            try
            {
                if (pInfo.All.EQPID == "A3TLM02S")
                {
                    //pfrmMainView_T = new tabfrmMainView_T();
                    ////pfrmMainView.PInfo = this.pInfo;
                    //pfrmMainView_T.Dock = DockStyle.Fill;

                    pfrmMainView_T2      = new tabfrmMainView_T2();
                    pfrmMainView_T2.Dock = DockStyle.Fill;
                }
                else
                {
                    //pfrmMainView_B = new tabfrmMainView_B();
                    ////pfrmMainView.PInfo = this.pInfo;
                    //pfrmMainView_B.Dock = DockStyle.Fill;

                    pfrmMainView_B2      = new tabfrmMainView_B2();
                    pfrmMainView_B2.Dock = DockStyle.Fill;

                    this.panel1.Controls.Clear();
                }
                this.panel1.Controls.Clear();
            }
            catch (Exception ex)
            {
                if (pInfo != null)
                {
                    pInfo.subLog_Set(clsInfo.LogType.CIM, ex.ToString());
                }
            }
        }
Exemplo n.º 4
0
        void glsexist(int UnitID, bool GLSExist)
        {
            try
            {
                //this.Invoke(new MethodInvoker(delegate()
                //{
                //    if (GLSExist)
                //    {
                //        string strGLSID = PInfo.Unit(UnitID).SubUnit(0).HGLSID;
                //        clsGLS CurrentGLS = PInfo.Unit(UnitID).SubUnit(0).CurrGLS(strGLSID);
                //        if (CurrentGLS != null)
                //            lblST01GLS.Text = string.Format("{0}\r\n{1}", strGLSID, PInfo.GLSID(strGLSID).HOSTPPID);
                //    }
                //    else
                //    {
                //        lblST01GLS.Text = "";
                //    }

                //    lblST01GLS.Visible = GLSExist;
                //}));
            }
            catch (Exception ex)
            {
                PInfo.subLog_Set(clsInfo.LogType.CIM, ex.ToString());
            }
        }
Exemplo n.º 5
0
        private void tabfrmSetupECID_Load(object sender, EventArgs e)
        {
            try
            {
                if (pInfo != null)
                {
                    pECIDBindingSource.DataSource = pInfo.Table("ECID");
                    this.dataGridView1.DataSource = pECIDBindingSource;

                    foreach (DataGridViewColumn column in dataGridView1.Columns)
                    {
                        column.SortMode = DataGridViewColumnSortMode.NotSortable;
                    }

                    //dataGridView1.Columns[4].Visible = false;
                    //dataGridView1.Columns[6].Visible = false;

                }
            }
            catch (Exception ex)
            {
                if (pInfo != null)
                {
                    pInfo.subLog_Set(clsInfo.LogType.PLC, ex.ToString());
                }
            }
        }
Exemplo n.º 6
0
 public void subFormLoad(string strHostPPIDName)
 {
     try
     {
         txtHOSTPPID.Text             = strHostPPIDName;
         this.txtEQPPPID_Current.Text = PInfo.Unit(0).SubUnit(0).HOSTPPID(strHostPPIDName).EQPPPID;
     }
     catch (Exception ex)
     {
         PInfo.subLog_Set(clsInfo.LogType.CIM, ex.ToString());
     }
 }
Exemplo n.º 7
0
 private void subIntal()
 {
     try
     {
         cboBaudRate.Text  = PInfo.All.SEM_BaudRate;
         cboAlarmTime.Text = PInfo.All.SEM_ErrorDelayCheckTime.ToString();
     }
     catch (Exception ex)
     {
         PInfo.subLog_Set(clsInfo.LogType.CIM, ex.ToString());
     }
 }
Exemplo n.º 8
0
        protected void subMCCLogData(string strModuleID, string strLogType, string strStepID, string strGLSID, string strLotID, string strPPID, params string[] strDataValue)
        {
            string dstrMCCLogData = "";
            string dstrDataTime   = "";

            try
            {
                dstrDataTime   = DateTime.Now.ToString("MMdd_HHmm_ss.fff");
                dstrMCCLogData = dstrDataTime + "," + strModuleID + "," + strLogType + "," + strStepID + "," + strGLSID + "," + strLotID + "," + strPPID;

                if (strDataValue != null)
                {
                    switch (strLogType)
                    {
                    case "A":           //Action Log
                        //Action=FromPosition=ToPosition=Start_End, ex) Componet_In=LD01=UP01=End
                        dstrMCCLogData = dstrMCCLogData + "," + strDataValue[0] + "=" + strDataValue[1] + "=" + strDataValue[2] + "=" + strDataValue[3];
                        break;

                    case "I":           //Information Log
                        //Information=Value, ex) VaccumPressure=360.4
                        dstrMCCLogData = dstrMCCLogData + "," + strDataValue[0] + "=" + strDataValue[1];
                        break;

                    case "E":
                        dstrMCCLogData = dstrMCCLogData + "," + strDataValue[0];
                        break;

                    case "W":
                        dstrMCCLogData = dstrMCCLogData + "," + strDataValue[0];
                        break;

                    case "S":
                        dstrMCCLogData = dstrMCCLogData + "," + strDataValue[0] + "=" + strDataValue[1] + "=" + strDataValue[2] + "=" + strDataValue[3];
                        break;

                    default:
                        break;
                    }
                }
                else
                {
                    pInfo.subLog_Set(InfoAct.clsInfo.LogType.CIM, "LogType : " + strLogType + ", Step Definition or Information Data is Null !!");
                    return;
                }

                pInfo.subLog_Set(InfoAct.clsInfo.LogType.MCCLog, dstrMCCLogData);
            }
            catch (Exception ex)
            {
                pInfo.subLog_Set(InfoAct.clsInfo.LogType.CIM, ex.ToString());
            }
        }
Exemplo n.º 9
0
 public void subFormLoad(string strEQPPPID)
 {
     try
     {
         txtEQPPPID.Text     = strEQPPPID;
         txtCurrent_UP.Text  = PInfo.Unit(0).SubUnit(0).MappingEQPPPID(strEQPPPID).UP_EQPPPID;
         txtCurrent_LOW.Text = PInfo.Unit(0).SubUnit(0).MappingEQPPPID(strEQPPPID).LOW_EQPPPID;
     }
     catch (Exception ex)
     {
         PInfo.subLog_Set(clsInfo.LogType.CIM, ex.ToString());
     }
 }
Exemplo n.º 10
0
        /// <summary>
        /// Log 생성
        /// </summary>
        public void subInitialLog()
        {
            try
            {
                if (pInfo.All.LogUseThread == true)
                {
                    pThreadDateCheck              = new Thread(new ThreadStart(ThreadLogDateCheck));
                    pThreadDateCheck.Name         = string.Format("ThreadLogDateCheck");
                    pThreadDateCheck.IsBackground = true;
                    pThreadDateCheck.Start();
                }
                else
                {
                    ptmrDateCheck          = new System.Windows.Forms.Timer();
                    ptmrDateCheck.Tick    += new EventHandler(DateCheck_Tick);
                    ptmrDateCheck.Interval = 10000;
                    ptmrDateCheck.Enabled  = true;
                }

                pstrLogFilesPath = pInfo.All.LogFilePath;

                plogPLC = new clsNLogGroup(pstrLogFilesPath, "PLC", clsInfo.LogType.PLC);
                plogCIM = new clsNLogGroup(pstrLogFilesPath, "CIM", clsInfo.LogType.CIM);

                plogAlarmGlassInfo = new clsNLogGeneral(pstrLogFilesPath, "AlarmGLSInfo", clsInfo.LogType.AlarmGLSInfo);
                plogOPCallMsg      = new clsNLogGeneral(pstrLogFilesPath, "OPCallMSG", clsInfo.LogType.OPCallMSG);
                plogPLCError       = new clsNLogGroup(pstrLogFilesPath, "PLCError", clsInfo.LogType.PLCError);
                plogScrap          = new clsNLogGeneral(pstrLogFilesPath, "Scrap", clsInfo.LogType.ScrapUnScrapAbort);
                plogGlassInOut     = new clsNLogGeneral(pstrLogFilesPath, "GLSInOut", clsInfo.LogType.GLSInOut);
                plogGlassAPD       = new clsNLogGeneral(pstrLogFilesPath, "GLSPDC", clsInfo.LogType.GLSPDC);
                plogLotAPD         = new clsNLogGeneral(pstrLogFilesPath, "LOTPDC", clsInfo.LogType.LOTPDC);
                plogAlarm          = new clsNLogGeneral(pstrLogFilesPath, "Alarm", clsInfo.LogType.Alarm);
                plogParameter      = new clsNLogGeneral(pstrLogFilesPath, "Parameter", clsInfo.LogType.Parameter);
                plogSEM            = new clsNLogGeneral(pstrLogFilesPath, "SEM", clsInfo.LogType.SEM);
                this.pfrmLogView   = new frmLogView();

                //if (this.pInfo.EQP("Main").DummyPLC)
                //{
                //this.pfrmDataView = new frmDataView();
                //this.pfrmDataView.subFormLoad();
                //}
            }
            catch (Exception ex)
            {
                pInfo.subLog_Set(clsInfo.LogType.CIM, ex.ToString());
            }
        }
Exemplo n.º 11
0
        public void funInitializeForm()
        {
            try
            {
                tabAlarm = new tabfrmSetupAlarm();
                tabECID  = new tabfrmSetupECID();
                tabEQP   = new tabfrmSetupEQP();
                tabUser  = new tabfrmSetupUser();
                //tabSVID = new tabfrmSetupSVID();
                tabPPID = new tabfrmSetupPPID();
                tabEOID = new tabfrmSetupEOID();

                //tabGLSAPD = new tabfrmSetupGLSAPD();
                //tabLOTAPD = new tabfrmSetupLOTAPD();

                tabAlarm.Dock = DockStyle.Fill;
                tabECID.Dock  = DockStyle.Fill;
                tabEQP.Dock   = DockStyle.Fill;
                tabUser.Dock  = DockStyle.Fill;
                //tabSVID.Dock = DockStyle.Fill;
                tabPPID.Dock = DockStyle.Fill;
                //tabGLSAPD.Dock = DockStyle.Fill;
                //tabLOTAPD.Dock = DockStyle.Fill;
                tabEOID.Dock = DockStyle.Fill;

                this.tabControl1.Controls.Clear();
            }
            catch (Exception ex)
            {
                if (pInfo != null)
                {
                    pInfo.subLog_Set(clsInfo.LogType.CIM, ex.ToString());
                }
            }
        }
Exemplo n.º 12
0
 /// <summary>
 /// clsSmFn에서 발생하는 Log 처리
 /// </summary>
 /// <param name="logType"> Type of LOG </param>
 /// <param name="strLogText"> Test for record </param>
 protected void funSetLog(InfoAct.clsInfo.LogType logType, string strLogText)
 {
     try
     {
         if (pInfo != null)
         {
             pInfo.subLog_Set(logType, strLogText);
         }
     }
     catch (Exception error)
     {
         if (pInfo != null)
         {
             pInfo.subLog_Set(InfoAct.clsInfo.LogType.CIM, error.ToString());
             return;
         }
     }
 }
Exemplo n.º 13
0
 private void subSaveButtonCheck()
 {
     try
     {
         if (PInfo.EQP("Main").UDPStart) //20141106 이원규 (SEM_UDP)
         {
             btnSave.Enabled = false;
         }
         else
         {
             btnSave.Enabled = true;
         }
     }
     catch (Exception ex)
     {
         PInfo.subLog_Set(clsInfo.LogType.CIM, ex.ToString());
     }
 }
Exemplo n.º 14
0
        public void funInitializeForm()
        {
            try
            {
                tabfrmAlarmHistory = new tabfrmHistoryGeneral();
                tabfrmAlarmHistory.funInitializeForm();
                tabfrmAlarmHistory.Dock = DockStyle.Fill;

                //tabfrmGlassApdHistory = new tabfrmHistoryGeneral();
                //tabfrmGlassApdHistory.funInitializeForm();
                //tabfrmGlassApdHistory.Dock = DockStyle.Fill;

                //tabfrmLotApdHistory = new tabfrmHistoryGeneral();
                //tabfrmLotApdHistory.funInitializeForm();
                //tabfrmLotApdHistory.Dock = DockStyle.Fill;

                //tabfrmScrapHistory = new tabfrmHistoryGeneral();
                //tabfrmScrapHistory.funInitializeForm();
                //tabfrmScrapHistory.Dock = DockStyle.Fill;

                tabfrmMessageHistory = new tabfrmHistoryGeneral();
                tabfrmMessageHistory.funInitializeForm();
                tabfrmMessageHistory.Dock = DockStyle.Fill;

                tabfrmGLSIn_Out = new tabfrmHistoryGeneral();
                tabfrmGLSIn_Out.funInitializeForm();
                tabfrmGLSIn_Out.Dock = DockStyle.Fill;

                //tabfrmCleaner_DV = new tabfrmHistoryGeneral();
                //tabfrmCleaner_DV.funInitializeForm();
                //tabfrmCleaner_DV.Dock = DockStyle.Fill;

                //tabfrmOven_DV = new tabfrmHistoryGeneral();
                //tabfrmOven_DV.funInitializeForm();
                //tabfrmOven_DV.Dock = DockStyle.Fill;
            }
            catch (Exception ex)
            {
                if (pInfo != null)
                {
                    pInfo.subLog_Set(clsInfo.LogType.CIM, ex.ToString());
                }
            }
        }
Exemplo n.º 15
0
 private void grdPPIDList_CellDoubleClick(object sender, DataGridViewCellEventArgs e)
 {
     try
     {
         if (e.RowIndex >= 0)
         {
             DialogResult = System.Windows.Forms.DialogResult.Yes;
             if (ppidselect != null)
             {
                 ppidselect(dstrType, dType, grdPPIDList.Rows[e.RowIndex].Cells[0].Value.ToString());
             }
             this.Hide();
         }
     }
     catch (Exception ex)
     {
         PInfo.subLog_Set(clsInfo.LogType.CIM, ex.ToString());
     }
 }
Exemplo n.º 16
0
        private void subSetForDV()
        {
            try
            {
                System.Windows.Forms.DataGridViewTextBoxColumn cTime   = new DataGridViewTextBoxColumn();
                System.Windows.Forms.DataGridViewTextBoxColumn cGLSID  = new DataGridViewTextBoxColumn();
                System.Windows.Forms.DataGridViewTextBoxColumn cUnitID = new DataGridViewTextBoxColumn();


                this.dgv.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { cTime, cGLSID, cUnitID });

                cTime.FillWeight     = 80F;
                cTime.Frozen         = true;
                cTime.HeaderText     = "Report Time";
                cTime.MaxInputLength = 8;
                cTime.MinimumWidth   = 70;
                cTime.Name           = "cTime";
                cTime.ReadOnly       = true;
                cTime.Resizable      = System.Windows.Forms.DataGridViewTriState.False;
                cTime.SortMode       = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
                cTime.Width          = 70;

                cGLSID.AutoSizeMode   = System.Windows.Forms.DataGridViewAutoSizeColumnMode.None;
                cGLSID.FillWeight     = 120F;
                cGLSID.Frozen         = true;
                cGLSID.HeaderText     = "Glass ID";
                cGLSID.MaxInputLength = 20;
                cGLSID.MinimumWidth   = 200;
                cGLSID.Name           = "cGLSID";
                cGLSID.ReadOnly       = true;
                cGLSID.Resizable      = System.Windows.Forms.DataGridViewTriState.False;
                cGLSID.SortMode       = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
                cGLSID.Width          = 200;

                cUnitID.AutoSizeMode   = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill;
                cUnitID.FillWeight     = 120F;
                cUnitID.Frozen         = true;
                cUnitID.HeaderText     = "UnitID";
                cUnitID.MaxInputLength = 5;
                cUnitID.MinimumWidth   = 50;
                cUnitID.Name           = "cUnitID";
                cUnitID.ReadOnly       = true;
                cUnitID.Resizable      = System.Windows.Forms.DataGridViewTriState.False;
                cUnitID.SortMode       = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
                cUnitID.Width          = 50;
            }
            catch (Exception ex)
            {
                if (PInfo != null)
                {
                    PInfo.subLog_Set(clsInfo.LogType.CIM, ex.ToString());
                }
            }
        }
Exemplo n.º 17
0
 void pfrmPPIDList_ppidselect(string dstrType, int dintType, string dstrPPIDName)
 {
     try
     {
         strType     = dstrType;
         intType     = dintType;
         strPPIDName = dstrPPIDName;
     }
     catch (Exception ex)
     {
         PInfo.subLog_Set(clsInfo.LogType.CIM, ex.ToString());
     }
 }
Exemplo n.º 18
0
        private void tabfrmSetupAlarm_Load(object sender, EventArgs e)
        {
            try
            {
                if (pInfo != null)
                {
                    pAlarmListSource.DataSource   = pInfo.Table("ALARM");
                    this.dataGridView1.DataSource = pAlarmListSource;

                    foreach (DataGridViewColumn column in dataGridView1.Columns)
                    {
                        column.SortMode = DataGridViewColumnSortMode.NotSortable;
                    }
                }
            }
            catch (Exception ex)
            {
                if (pInfo != null)
                {
                    pInfo.subLog_Set(clsInfo.LogType.PLC, ex.ToString());
                }
            }
        }
Exemplo n.º 19
0
        private void pictureBox1_Click(object sender, EventArgs e)
        {
            try
            {
                if (pfrmDataView != null)
                {
                    pfrmDataView.Close();
                }

                pfrmDataView = new frmDataView();
                pfrmDataView.subFormLoad();
            }
            catch (Exception ex)
            {
                PInfo.subLog_Set(clsInfo.LogType.CIM, ex.ToString());
            }
        }
Exemplo n.º 20
0
        private void btnTest_Click(object sender, EventArgs e)
        {
            try
            {
                if (frmTest.Visible == true)
                {
                    //this.PInfo.subSendSF_Set(clsInfo.SFName.S1F1AreYouThereRequest);
                }
                else
                {
                    frmTest.Show();
                }

                //pfrmLotinformationDisplay = new frmLotInformationDisplay();
                //pfrmLotinformationDisplay.subFormLoad();
            }
            catch (Exception ex)
            {
                PInfo.subLog_Set(clsInfo.LogType.CIM, ex.ToString());
            }
        }
Exemplo n.º 21
0
 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());
     }
 }
Exemplo n.º 22
0
        private void subInit()
        {
            try
            {
                pbPO02.Parent   = pbMain;
                pbPO02.Location = new Point(339, 148);
                pbPO02.BringToFront();

                pbDM01.Parent   = pbMain;
                pbDM01.Location = new Point(480, 148);
                pbDM01.BringToFront();

                pbLM01.Parent   = pbMain;
                pbLM01.Location = new Point(621, 148);
                pbLM01.BringToFront();

                pbIS01.Parent   = pbMain;
                pbIS01.Location = new Point(762, 148);
                pbIS01.BringToFront();

                pbST01.Parent   = pbMain;
                pbST01.Location = new Point(904, 148);
                pbST01.BringToFront();

                pbPI01.Parent   = pbMain;
                pbPI01.Location = new Point(303, 258);
                pbPI01.BringToFront();

                pbFT02.Parent   = pbMain;
                pbFT02.Location = new Point(553, 281);
                pbFT02.BringToFront();

                pbST02.Parent   = pbMain;
                pbST02.Location = new Point(866, 258);
                pbST02.BringToFront();


                pbFI01.Parent   = pbMain;
                pbFI01.Location = new Point(69, 408);
                pbFI01.BringToFront();

                pbFI02.Parent   = pbMain;
                pbFI02.Location = new Point(214, 408);
                pbFI02.BringToFront();

                pbFT01.Parent   = pbMain;
                pbFT01.Location = new Point(355, 408);
                pbFT01.BringToFront();

                pbAL01.Parent   = pbMain;
                pbAL01.Location = new Point(496, 408);
                pbAL01.BringToFront();

                pbFO04.Parent   = pbMain;
                pbFO04.Location = new Point(27, 520);
                pbFO04.BringToFront();

                pbFO03.Parent   = pbMain;
                pbFO03.Location = new Point(175, 520);
                pbFO03.BringToFront();

                //[2015/01/16]GL01(Add by HS)
                pbGL01.Parent   = pbMain;
                pbGL01.Location = new Point(945, 42);
                pbGL01.BringToFront();

                lblAL01.Parent = pbAL01;
                lblAL01.Dock   = DockStyle.Fill;
                lblAL01.BringToFront();

                lblDM01.Parent = pbDM01;
                lblDM01.Dock   = DockStyle.Fill;
                lblDM01.BringToFront();

                lblFI01.Parent = pbFI01;
                lblFI01.Dock   = DockStyle.Fill;
                lblFI01.BringToFront();

                lblFI02.Parent = pbFI02;
                lblFI02.Dock   = DockStyle.Fill;
                lblFI02.BringToFront();

                lblFO03.Parent = pbFO03;
                lblFO03.Dock   = DockStyle.Fill;
                lblFO03.BringToFront();

                lblFO04.Parent = pbFO04;
                lblFO04.Dock   = DockStyle.Fill;
                lblFO04.BringToFront();

                lblFT01.Parent = pbFT01;
                lblFT01.Dock   = DockStyle.Fill;
                lblFT01.BringToFront();

                lblFT02.Parent = pbFT02;
                lblFT02.Dock   = DockStyle.Fill;
                lblFT02.BringToFront();

                lblIS01.Parent = pbIS01;
                lblIS01.Dock   = DockStyle.Fill;
                lblIS01.BringToFront();

                lblLM01.Parent = pbLM01;
                lblLM01.Dock   = DockStyle.Fill;
                lblLM01.BringToFront();

                lblPI01.Parent = pbPI01;
                lblPI01.Dock   = DockStyle.Fill;
                lblPI01.BringToFront();

                lblPO02.Parent = pbPO02;
                lblPO02.Dock   = DockStyle.Fill;
                lblPO02.BringToFront();

                lblST01.Parent = pbST01;
                lblST01.Dock   = DockStyle.Fill;
                lblST01.BringToFront();

                lblST02.Parent = pbST02;
                lblST02.Dock   = DockStyle.Fill;
                lblST02.BringToFront();

                lblGL01.Parent = pbGL01;
                lblGL01.Dock   = DockStyle.Fill;
                lblGL01.BringToFront();
            }
            catch (Exception ex)
            {
                if (PInfo != null)
                {
                    PInfo.subLog_Set(clsInfo.LogType.CIM, ex.ToString());
                }
            }
        }
Exemplo n.º 23
0
 //*******************************************************************************
 //  Function Name : subSlotDisplay()
 //  Description   : dataGridView에 데이터를 넣어준다
 //  Parameters    : intPort - Port Number
 //  Return Value  : None
 //  Special Notes :
 //*******************************************************************************
 //  2006/11/23          어 경태         [L 00]
 //  2008/04/26          구 정환         [L 01] 장비에 등록된 레시피만 선택가능하도록
 //*******************************************************************************
 private void subSlotDisplay(int intPort)
 {
     try
     {
         this.CenterToScreen();
         this.Show();
     }
     catch (Exception ex)
     {
         PInfo.subLog_Set(clsInfo.LogType.CIM, ex.ToString() + ", intPortID:" + intPort);
     }
 }
Exemplo n.º 24
0
Arquivo: frmMain.cs Projeto: k2un/k2un
        private void frmMainNew_Load(object sender, EventArgs e)
        {
            try
            {
                // Version d
                this.Text = "NCIM V1.27 2016-02-05";


                #region load
                //1. 설정된 Size로 Form Size 조절...
                Size sizeForm = new Size(PInfo.All.SizeWidth, PInfo.All.SizeHeight);
                this.Size = sizeForm;

                //영역 구분 확인용 Label을 감춘다.
                foreach (Control ctrl in this.tableLayoutPanel1.Controls)
                {
                    if (ctrl.GetType() == typeof(Label))
                    {
                        ctrl.Visible = false;
                    }
                }

                longStartTick = DateTime.Now.Ticks;

                //2. Sub-Form을 생성한다.
                pfrmMainView       = new subfrmMainView();
                pfrmHistoryView    = new subfrmHistoryView();
                pfrmLogManagerView = new subfrmLogManagerView();
                pfrmSystemSetup    = new subfrmSetupView();
                pfrmInfoView       = new subfrmInfoView();

                subfrmNavigationButton = new subfrmNavigationButton();

                subfrmCommandButtonMain       = new subfrmCommandButton_Main();
                subfrmCommandButtonHistory    = new subfrmCommandButton_History();
                subfrmCommandButtonLogManager = new subfrmCommandButton_LogManager();
                subfrmCommandButtonSetting    = new subfrmCommandButton_Setting();
                subfrmCommandButtonInfo       = new subfrmCommandButton_Info();

                this.subfrmTitlePanel.funInitializeForm();
                this.subfrmCaption.funInitializeForm();
                this.subfrmCommandButtonMain.funInitializeForm();
                this.subfrmNavigationButton.funInitializeForm();

                this.pfrmMainView.funInitializeForm();
                this.pfrmHistoryView.funInitializeForm();
                this.pfrmSystemSetup.funInitializeForm();
                pfrmInfoView.funInitializeForm();

                //3. TableLayoutPanel의 해당 영역에 Sub-Form을 위치시킨다.
                this.panelInfo.Controls.Add(pfrmMainView);
                this.panelInfo.Controls.Add(pfrmSystemSetup);
                this.panelInfo.Controls.Add(pfrmLogManagerView);
                this.panelInfo.Controls.Add(pfrmHistoryView);
                panelInfo.Controls.Add(pfrmInfoView);

                this.panelNavigation.Controls.Add(subfrmNavigationButton);

                this.panelCommand.Controls.Add(subfrmCommandButtonMain);
                this.panelCommand.Controls.Add(subfrmCommandButtonHistory);
                this.panelCommand.Controls.Add(subfrmCommandButtonLogManager);
                this.panelCommand.Controls.Add(subfrmCommandButtonSetting);
                this.panelCommand.Controls.Add(subfrmCommandButtonInfo);


                //4. 기타 Pop-Up Form을 생성한다.
                pfrmErrMsgList           = new frmErrMsgList();
                this.pfrmErrMsgOverWrite = new frmErrMsgOverWrite();
                this.pfrmModeChange      = new frmModeChange();
                this.pfrmLogOn           = new frmLogOn();
                this.pfrmEQPState        = new frmEQPState();
                this.pfrmEQPProcessState = new frmProcessState();

                //5. Sub-Form의 Event들을 등록한다.
                int i = 0;
                i += 1;
                this.pfrmSystemSetup.SelectSaveDisableTab     += new subfrmSetupView.eventSystemSetup(SaveDisalbeSettingTabSelected);
                this.pfrmSystemSetup.SelectSaveEnableTab      += new subfrmSetupView.eventSystemSetup(SaveEnalbeSettingTabSelected);
                this.pfrmSystemSetup.SelectReloadEnableTab    += new subfrmSetupView.eventSystemSetup(SelectReloadEnableTab);
                this.pfrmSystemSetup.SelectReloadDisableTab   += new subfrmSetupView.eventSystemSetup(SelectReloadDisableTab);
                this.pfrmSystemSetup.SelectEditModeEnableTab  += new subfrmSetupView.eventSystemSetup(SelectEditModeEnableTab);
                this.pfrmSystemSetup.SelectEditModeDisableTab += new subfrmSetupView.eventSystemSetup(SelectEditModeDisableTab);

                this.subfrmNavigationButton.ClickMainViewButton    += new subfrmNavigationButton.eventClickNavigationButton(ClickMainView);
                this.subfrmNavigationButton.ClickHistoryViewButton += new subfrmNavigationButton.eventClickNavigationButton(ClickHistoryView);
                this.subfrmNavigationButton.ClickLogViewButton     += new subfrmNavigationButton.eventClickNavigationButton(ClickLogView);
                this.subfrmNavigationButton.ClickSetupViewButton   += new subfrmNavigationButton.eventClickNavigationButton(ClickSetupView);
                //this.subfrmNavigationButton.ClickSEMViewButton += new subfrmNavigationButton.eventClickNavigationButton(ClickSEMView);
                this.subfrmNavigationButton.ClickInfoButton += new DisplayAct.subfrmNavigationButton.eventClickNavigationButton(ClickInfoView);

                pfrmInfoView.SelectSaveEnableTab  += new subfrmInfoView.eventInfoView(pfrmInfoView_SelectSaveEnableTab);
                pfrmInfoView.SelectSaveDisableTab += new subfrmInfoView.eventInfoView(pfrmInfoView_SelectSaveDisableTab);

                pfrmInfoView.SelectConfigTab  += new subfrmInfoView.eventInfoView(pfrmInfoView_SelectConfigTab);
                pfrmInfoView.SelectHistotyTab += new subfrmInfoView.eventInfoView(pfrmInfoView_SelectHistotyTab);

                this.subfrmCommandButtonMain.ClickModeChangeButton   += new subfrmCommandButton_Main.eventClickCommandButton_Main(ClickModeChange);
                this.subfrmCommandButtonMain.ClickEQPStateButton     += new subfrmCommandButton_Main.eventClickCommandButton_Main(ClickEQPState);
                this.subfrmCommandButtonMain.ClickProcessStateButton += new subfrmCommandButton_Main.eventClickCommandButton_Main(ClickProcessState);
                this.subfrmCommandButtonMain.ClickBuzzerOffButton    += new subfrmCommandButton_Main.eventClickCommandButton_Main(ClickBuzzerOff);
                this.subfrmCommandButtonMain.ClickMessageClearButton += new subfrmCommandButton_Main.eventClickCommandButton_Main(ClickMessageClear);
                this.subfrmCommandButtonHistory.ClickClearButton     += new subfrmCommandButton_History.eventClickCommandButton_History(ClickHistoryClear);
                this.subfrmCommandButtonHistory.ClickSaveButton      += new subfrmCommandButton_History.eventClickCommandButton_History(ClickHistorySave);

                this.subfrmCommandButtonLogManager.ClickSaveButton += new subfrmCommandButton_LogManager.eventClickCommandButton_LogManager(ClickLogSave);

                this.subfrmCommandButtonSetting.ClickSaveButton   += new subfrmCommandButton_Setting.eventClickCommandButton_Setting(ClickSettingSave);
                this.subfrmCommandButtonSetting.ClickReloadButton += new subfrmCommandButton_Setting.eventClickCommandButton_Setting(ClickSettingReload);
                this.subfrmCommandButtonSetting.ClickEditMode     += new subfrmCommandButton_Setting.eventClickCommandButton_Setting(ClickSettingEditMode);

                this.subfrmCommandButtonInfo.ClickHistoryButton += new subfrmCommandButton_Info.eventClickCommandButton_Info(subfrmCommandButtonInfo_ClickHistoryButton);
                subfrmCommandButtonInfo.ClickSEMConfigButton    += new subfrmCommandButton_Info.eventClickCommandButton_Info(subfrmCommandButtonInfo_ClickSEMConfigButton);

                this.pfrmLogOn.LogonSuccess += new frmLogOn.eventLogonDialog(SystemSetupLogon);

                //6. 화면 설정에 맞게 Sub-Form 크기 조절 및 보여질 화면, Button을 설정한다.
                funSetWindowSize();
                SetCommandButtonArea(typeof(subfrmCommandButton_Main).ToString());
                SetInfoPanelArea(typeof(subfrmMainView).ToString());
                funWriteLog_InitialTime("MainView");

                #endregion
            }
            catch (Exception error)
            {
                if (PInfo != null)
                {
                    PInfo.subLog_Set(InfoAct.clsInfo.LogType.CIM, error.ToString());
                }
            }
        }
Exemplo n.º 25
0
        private void subInit()
        {
            try
            {
                pbPO02.Parent   = pbMain;
                pbPO02.Location = new Point(349, 146);
                pbPO02.BringToFront();

                pbDM01.Parent   = pbMain;
                pbDM01.Location = new Point(489, 144);
                pbDM01.BringToFront();

                pbLM01.Parent   = pbMain;
                pbLM01.Location = new Point(629, 144);
                pbLM01.BringToFront();

                pbIS01.Parent   = pbMain;
                pbIS01.Location = new Point(773, 144);
                pbIS01.BringToFront();

                pbST01.Parent   = pbMain;
                pbST01.Location = new Point(916, 144);
                pbST01.BringToFront();

                pbPI01.Parent   = pbMain;
                pbPI01.Location = new Point(317, 254);
                pbPI01.BringToFront();

                pbFT02.Parent   = pbMain;
                pbFT02.Location = new Point(563, 279);
                pbFT02.BringToFront();

                pbST02.Parent   = pbMain;
                pbST02.Location = new Point(878, 254);
                pbST02.BringToFront();


                pbFI01.Parent   = pbMain;
                pbFI01.Location = new Point(82, 405);
                pbFI01.BringToFront();

                pbFI02.Parent   = pbMain;
                pbFI02.Location = new Point(223, 405);
                pbFI02.BringToFront();

                pbFT01.Parent   = pbMain;
                pbFT01.Location = new Point(363, 405);
                pbFT01.BringToFront();

                pbAL01.Parent   = pbMain;
                pbAL01.Location = new Point(504, 405);
                pbAL01.BringToFront();

                pbFO04.Parent   = pbMain;
                pbFO04.Location = new Point(40, 516);
                pbFO04.BringToFront();

                pbFO03.Parent   = pbMain;
                pbFO03.Location = new Point(183, 516);
                pbFO03.BringToFront();

                lblAL01.Parent = pbAL01;
                lblAL01.Dock   = DockStyle.Fill;
                lblAL01.BringToFront();

                lblDM01.Parent = pbDM01;
                lblDM01.Dock   = DockStyle.Fill;
                lblDM01.BringToFront();

                lblFI01.Parent = pbFI01;
                lblFI01.Dock   = DockStyle.Fill;
                lblFI01.BringToFront();

                lblFI02.Parent = pbFI02;
                lblFI02.Dock   = DockStyle.Fill;
                lblFI02.BringToFront();

                lblFO03.Parent = pbFO03;
                lblFO03.Dock   = DockStyle.Fill;
                lblFO03.BringToFront();

                lblFO04.Parent = pbFO04;
                lblFO04.Dock   = DockStyle.Fill;
                lblFO04.BringToFront();

                lblFT01.Parent = pbFT01;
                lblFT01.Dock   = DockStyle.Fill;
                lblFT01.BringToFront();

                lblFT02.Parent = pbFT02;
                lblFT02.Dock   = DockStyle.Fill;
                lblFT02.BringToFront();

                lblIS01.Parent = pbIS01;
                lblIS01.Dock   = DockStyle.Fill;
                lblIS01.BringToFront();

                lblLM01.Parent = pbLM01;
                lblLM01.Dock   = DockStyle.Fill;
                lblLM01.BringToFront();

                lblPI01.Parent = pbPI01;
                lblPI01.Dock   = DockStyle.Fill;
                lblPI01.BringToFront();

                lblPO02.Parent = pbPO02;
                lblPO02.Dock   = DockStyle.Fill;
                lblPO02.BringToFront();

                lblST01.Parent = pbST01;
                lblST01.Dock   = DockStyle.Fill;
                lblST01.BringToFront();

                lblST02.Parent = pbST02;
                lblST02.Dock   = DockStyle.Fill;
                lblST02.BringToFront();
            }
            catch (Exception ex)
            {
                if (PInfo != null)
                {
                    PInfo.subLog_Set(clsInfo.LogType.CIM, ex.ToString());
                }
            }
        }
Exemplo n.º 26
0
        public void Save()
        {
            if (MessageBox.Show("SVID 리스트를 업데이트 합니다.\n양산중인 장비에서 이 기능을 실행하면\n심각한 문제가 발생 할 수 있습니다.\n진행하겠습니까?", "경고", MessageBoxButtons.YesNo, MessageBoxIcon.Warning) == DialogResult.No)
            {
                return;
            }

            File.Copy(Application.StartupPath + @"\system\System.mdb", Application.StartupPath + @"\system\System.mdb.bak", true);

            string    dstrSQL;
            DataTable dDT;
            int       dintIndex = 0;

            try
            {
                //if (!DBAct.clsDBAct.funConnect())
                //{
                //    MessageBox.Show("DB Connection Fail!", "Connect Error!", MessageBoxButtons.OK, MessageBoxIcon.Warning);
                //    return;
                //}

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

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

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

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



                dstrSQL = "SELECT * FROM tbSVID order by SVID";
                //dDT = DBAct.clsDBAct.funSelectQuery2(dstrSQL);                          //DataTable을 받아온다.
                dDT = DBAct.clsDBAct.funSelectQuery2(dstrSQL);
                if (dDT != null)
                {
                    pInfo.Unit(0).SubUnit(0).RemoveSVID();
                    pInfo.DeleteTable("SVID");
                    pInfo.AddDataTable("SVID", dDT);

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

                        pInfo.Unit(0).SubUnit(0).SVID(dintIndex).Name           = dr["SVNAME"].ToString();
                        pInfo.Unit(0).SubUnit(0).SVID(dintIndex).Length         = Convert.ToInt32(dr["Length"].ToString());
                        pInfo.Unit(0).SubUnit(0).SVID(dintIndex).Format         = dr["Format"].ToString();
                        pInfo.Unit(0).SubUnit(0).SVID(dintIndex).Value          = dr["SV"].ToString();
                        pInfo.Unit(0).SubUnit(0).SVID(dintIndex).Type           = dr["Type"].ToString();
                        pInfo.Unit(0).SubUnit(0).SVID(dintIndex).Unit           = dr["Unit"].ToString();
                        pInfo.Unit(0).SubUnit(0).SVID(dintIndex).Range          = dr["Range"].ToString();
                        pInfo.Unit(0).SubUnit(0).SVID(dintIndex).HaveMinusValue = Convert.ToBoolean(dr["HaveMinusValue"]);
                        pInfo.Unit(0).SubUnit(0).SVID(dintIndex).DESC           = dr["Description"].ToString();
                        //PInfo.Unit(0).SubUnit(0).SVID(dintIndex).UnitID = this.PInfo.funGetModuleIDToUnitID(dr["ModuleID"].ToString());
                        pInfo.Unit(0).SubUnit(0).SVID(dintIndex).ModuleID = dr["ModuleID"].ToString();

                        if (pInfo.Unit(0).SubUnit(0).SVID(dintIndex).Format.Trim() != "")
                        {
                            this.pInfo.All.SVIDPLCReadLength = this.pInfo.All.SVIDPLCReadLength + this.pInfo.Unit(0).SubUnit(0).SVID(dintIndex).Length;
                        }
                    }
                }

                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);
            }
        }
Exemplo n.º 27
0
        private void subInit()
        {
            try
            {
                pbPO02.Parent   = pbMain;
                pbPO02.Location = new Point(285, 95);
                pbPO02.BringToFront();

                pbDM01.Parent   = pbMain;
                pbDM01.Location = new Point(394, 95);
                pbDM01.BringToFront();

                pbLM01.Parent   = pbMain;
                pbLM01.Location = new Point(506, 95);
                pbLM01.BringToFront();

                pbIS01.Parent   = pbMain;
                pbIS01.Location = new Point(626, 95);
                pbIS01.BringToFront();

                pbST01.Parent   = pbMain;
                pbST01.Location = new Point(735, 95);
                pbST01.BringToFront();

                pbPI01.Parent   = pbMain;
                pbPI01.Location = new Point(255, 167);
                pbPI01.BringToFront();

                pbFT02.Parent   = pbMain;
                pbFT02.Location = new Point(455, 178);
                pbFT02.BringToFront();

                pbST02.Parent   = pbMain;
                pbST02.Location = new Point(706, 165);
                pbST02.BringToFront();


                pbFI01.Parent   = pbMain;
                pbFI01.Location = new Point(76, 263);
                pbFI01.BringToFront();

                pbFI02.Parent   = pbMain;
                pbFI02.Location = new Point(187, 263);
                pbFI02.BringToFront();

                pbFT01.Parent   = pbMain;
                pbFT01.Location = new Point(296, 263);
                pbFT01.BringToFront();

                pbAL01.Parent   = pbMain;
                pbAL01.Location = new Point(409, 263);
                pbAL01.BringToFront();

                pbFO04.Parent   = pbMain;
                pbFO04.Location = new Point(34, 338);
                pbFO04.BringToFront();

                pbFO03.Parent   = pbMain;
                pbFO03.Location = new Point(150, 338);
                pbFO03.BringToFront();

                //[2015/01/16]GL01(Add by HS)
                pbGL01.Parent   = pbMain;
                pbGL01.Location = new Point(764, 24);
                pbGL01.BringToFront();
            }
            catch (Exception ex)
            {
                if (PInfo != null)
                {
                    PInfo.subLog_Set(clsInfo.LogType.CIM, ex.ToString());
                }
            }
        }
Exemplo n.º 28
0
        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);
            }
        }
Exemplo n.º 29
0
 private void subEventAdd()
 {
     try
     {
         //pInfo.Unit(0).SubUnit(0).Event_EQPPPID_Update += new clsSubUnitMethod.EQPPPID_Update_Event(tabfrmSetupPPID_Event_EQPPPID_Update);
         pInfo.Unit(0).SubUnit(0).Event_HOSTPPID_Update += new clsSubUnitMethod.HOSTPPID_Update_Event(tabfrmSetupPPID_Event_HOSTPPID_Update);
     }
     catch (Exception ex)
     {
         pInfo.subLog_Set(clsInfo.LogType.CIM, ex.ToString());
     }
 }