private void tmUpdate_Tick(object sender, EventArgs e) { tmUpdate.Enabled = false; lbCrntDevice.Text = OM.GetCrntDev(); //Download 버튼 활성화 조건(나중에 확인 진섭) if (SEQ._iSeqStat == EN_SEQ_STAT.Stop || SEQ._iSeqStat == EN_SEQ_STAT.Error) { btDownload.Enabled = true; } //접근레벨에 따른 Setting 버튼 활성화 int iLevel = (int)FormPassword.GetLevel(); switch (iLevel) { case (int)EN_LEVEL.Operator: btSetting.Enabled = false; break; case (int)EN_LEVEL.Engineer: btSetting.Enabled = true; break; case (int)EN_LEVEL.Master: btSetting.Enabled = true; break; default: break; } tmUpdate.Enabled = true; }
private void lbName_Click(object sender, EventArgs e) { if (FormPassword.GetLevel() == EN_LEVEL.Master) { if (FrmMaster.IsDisposed) { FrmMaster = new FormMaster(); } FrmMaster.Show(); } }
private void lvDayInfo_MouseDoubleClick(object sender, MouseEventArgs e) //요거는 확인 해봐야 함 진섭 { if (FormPassword.GetLevel() != EN_LEVEL.Master) { return; } if (Log.ShowMessageModal("Confirm", "Clear Day Info?") != DialogResult.Yes) { return; } SPC.DAY.ClearData(); }
private void lvDayInfo_MouseDoubleClick_1(object sender, MouseEventArgs e) { string sText = ((Button)sender).Text; Log.Trace(sFormText + sText + " Button Clicked", ti.Frm); if (FormPassword.GetLevel() != EN_LEVEL.Master) { return; } if (Log.ShowMessageModal("Confirm", "Clear Day Info?") != DialogResult.Yes) { return; } }
private void tmUpdate_Tick(object sender, EventArgs e) { tmUpdate.Enabled = false; btLotDelete.Enabled = FormPassword.GetLevel() > EN_LEVEL.Operator; btErrDelete.Enabled = FormPassword.GetLevel() > EN_LEVEL.Operator; btFailDelete.Enabled = FormPassword.GetLevel() > EN_LEVEL.Operator; btSetRepair.Enabled = FormPassword.GetLevel() > EN_LEVEL.Operator; if (!this.Visible) { tmUpdate.Enabled = false; return; } tmUpdate.Enabled = true; }
private void timer1_Tick(object sender, EventArgs e) { tmUpdate.Enabled = false; pnIdx.Refresh(); //pnPst.Refresh(); tbTargetCnt.Text = OM.DevOptn.iTargetCnt.ToString(); tbCrntCnt.Text = OM.EqpStat.iWorkCnt.ToString(); tbNodeCnt.Text = OM.EqpStat.iNodeCnt.ToString(); tbCttrCnt.Text = OM.EqpStat.iCttrCnt.ToString(); tbDegree.Text = OM.NodePos[SEQ.IDX.iNodeCnt].dDegree.ToString(); int iLevel = (int)FormPassword.GetLevel(); switch (iLevel) { case (int)EN_LEVEL.Operator: btOperator.Text = "OPERATOR"; break; case (int)EN_LEVEL.Engineer: btOperator.Text = "ENGINEER"; break; case (int)EN_LEVEL.Master: btOperator.Text = " ADMIN "; break; default: btOperator.Text = " ERROR "; break; } if (bPreLotOpen != LOT.GetLotOpen()) { btLotEnd.Enabled = LOT.GetLotOpen(); btStart.Enabled = LOT.GetLotOpen(); btLotOpen.Enabled = !LOT.GetLotOpen(); bPreLotOpen = LOT.GetLotOpen(); } SPC.DAY.DispDayInfo(lvDayInfo); SPC.LOT.DispLotInfo(lvLotInfo); string Str; int iPreErrCnt = 0; int iCrntErrCnt = 0; for (int i = 0; i < SML.ER._iMaxErrCnt; i++) { if (SML.ER.GetErr(i)) { iCrntErrCnt++; } } if (iPreErrCnt != iCrntErrCnt) { lbErr.Items.Clear(); int iErrNo = SML.ER.GetLastErr(); for (int i = 0; i < SML.ER._iMaxErrCnt; i++) { if (SML.ER.GetErr(i)) { Str = string.Format("[ERR{0:000}]", i); Str += SML.ER.GetErrName(i) + " " + SML.ER.GetErrMsg(i); lbErr.Items.Add(Str); } } } if (SEQ._iSeqStat != EN_SEQ_STAT.Error) { lbErr.Items.Clear(); } iPreErrCnt = iCrntErrCnt; string sCycleTimeSec; int iCycleTimeMs; //Door Sensor. 나중에 찾아보자 //bool isAllCloseDoor = SM.IO.GetX((int)EN_INPUT_ID.xETC_DoorFt) && // SM.IO.GetX((int)EN_INPUT_ID.xETC_DoorLt) && // SM.IO.GetX((int)EN_INPUT_ID.xETC_DoorRt) && // SM.IO.GetX((int)EN_INPUT_ID.xETC_DoorRr) ; //if (FormPassword.GetLevel() != EN_LEVEL.lvOperator && isAllCloseDoor && CMachine._bRun) //{ // //FM_SetLevel(lvOperator); //} if (!SM.MT_GetHomeDoneAll()) { btAllHome.ForeColor = SEQ._bFlick ? Color.Black : Color.Red; } else { btAllHome.ForeColor = Color.Black; } //DM.ARAY[(int)ri.LENS ].SetMaxColRow(OM.DevInfo.iLensColCnt , OM.DevInfo.iLensRowCnt); //DM.ARAY[(int)ri.REAR ].SetMaxColRow(OM.DevInfo.iRearColCnt , OM.DevInfo.iRearRowCnt); //DM.ARAY[(int)ri.FRNT ].SetMaxColRow(OM.DevInfo.iFrntColCnt , OM.DevInfo.iFrntRowCnt); //DM.ARAY[(int)ri.PICK ].SetMaxColRow(2, 1); pnIDXDetect1.BackColor = !SM.IO_GetX(xi.IDX_Detect1) ? Color.Lime : Color.Red; pnIDXDetect2.BackColor = !SM.IO_GetX(xi.IDX_Detect2) ? Color.Lime : Color.Red; pnIDXDetect3.BackColor = !SM.IO_GetX(xi.IDX_Detect3) ? Color.Lime : Color.Red; pnIDXDetect4.BackColor = !SM.IO_GetX(xi.IDX_Detect4) ? Color.Lime : Color.Red; pnIDXDetect5.BackColor = !SM.IO_GetX(xi.IDX_Detect5) ? Color.Lime : Color.Red; pnULDDetect1.BackColor = SM.IO_GetX(xi.ULD_Detect1) ? Color.Lime : Color.Red; pnULDDetect2.BackColor = SM.IO_GetX(xi.ULD_Detect2) ? Color.Lime : Color.Red; pnULDDetect3.BackColor = SM.IO_GetX(xi.ULD_Detect3) ? Color.Lime : Color.Red; pnULDDetect4.BackColor = SM.IO_GetX(xi.ULD_Detect4) ? Color.Lime : Color.Red; pnULDDetect5.BackColor = SM.IO_GetX(xi.ULD_Detect5) ? Color.Lime : Color.Red; //Option View if (OM.CmnOptn.bUsedLine1) { pnOption1.BackColor = Color.Lime; lbOption1.Text = "ON"; } else { pnOption1.BackColor = Color.Red; lbOption1.Text = "OFF"; } if (OM.CmnOptn.bUsedLine2) { pnOption2.BackColor = Color.Lime; lbOption2.Text = "ON"; } else { pnOption2.BackColor = Color.Red; lbOption2.Text = "OFF"; } if (OM.CmnOptn.bUsedLine3) { pnOption3.BackColor = Color.Lime; lbOption3.Text = "ON"; } else { pnOption3.BackColor = Color.Red; lbOption3.Text = "OFF"; } if (OM.CmnOptn.bUsedLine4) { pnOption4.BackColor = Color.Lime; lbOption4.Text = "ON"; } else { pnOption4.BackColor = Color.Red; lbOption4.Text = "OFF"; } if (OM.CmnOptn.bUsedLine5) { pnOption5.BackColor = Color.Lime; lbOption5.Text = "ON"; } else { pnOption5.BackColor = Color.Red; lbOption5.Text = "OFF"; } if (OM.CmnOptn.bIgnrWork) { pnOption6.BackColor = Color.Lime; lbOption6.Text = "ON"; } else { pnOption6.BackColor = Color.Red; lbOption6.Text = "OFF"; } btCyl1.Text = SML.CL.GetCmd((int)ci.IDX_Hold1UpDn) != 0 ? "FWD" : "BWD"; btCyl1.ForeColor = SML.CL.GetCmd((int)ci.IDX_Hold1UpDn) != 0 ? Color.Lime : Color.Black; btCyl2.Text = SML.CL.GetCmd((int)ci.IDX_CutLtFwBw) != 0 ? "FWD" : "BWD"; btCyl2.ForeColor = SML.CL.GetCmd((int)ci.IDX_CutLtFwBw) != 0 ? Color.Lime : Color.Black; btCyl3.Text = SML.CL.GetCmd((int)ci.IDX_CutRtFwBw) != 0 ? "FWD" : "BWD"; btCyl3.ForeColor = SML.CL.GetCmd((int)ci.IDX_CutRtFwBw) != 0 ? Color.Lime : Color.Black; btCyl4.Text = SML.CL.GetCmd((int)ci.IDX_TwstLtDnUp) != 0 ? "FWD" : "BWD"; btCyl4.ForeColor = SML.CL.GetCmd((int)ci.IDX_TwstLtDnUp) != 0 ? Color.Lime : Color.Black; //btCyl5 .Text = SM.CL.GetCmd((int)ai.IDX_TwstRtDnUp) != 0 ? "FWD" : "BWD" ; //btCyl5 .ForeColor = SM.CL.GetCmd((int)ai.IDX_TwstRtDnUp) != 0 ? Color.Lime : Color.Black; btCyl6.Text = SML.CL.GetCmd((int)ci.IDX_Hold2UpDn) != 0 ? "FWD" : "BWD"; btCyl6.ForeColor = SML.CL.GetCmd((int)ci.IDX_Hold2UpDn) != 0 ? Color.Lime : Color.Black; btCyl7.Text = SML.CL.GetCmd((int)ci.IDX_CutBaseUpDn) != 0 ? "FWD" : "BWD"; btCyl7.ForeColor = SML.CL.GetCmd((int)ci.IDX_CutBaseUpDn) != 0 ? Color.Lime : Color.Black; //btCyl7 .Text = SM.CL.GetCmd((int)ai.IDX_ShiftFwBw ) != 0 ? "FWD" : "BWD" ; //btCyl7 .ForeColor = SM.CL.GetCmd((int)ai.IDX_ShiftFwBw ) != 0 ? Color.Lime : Color.Black; //btCyl8 .Text = SM.CL.GetCmd((int)ai.IDX_ShiftUpDn ) != 0 ? "FWD" : "BWD" ; //btCyl8 .ForeColor = SM.CL.GetCmd((int)ai.IDX_ShiftUpDn ) != 0 ? Color.Lime : Color.Black; btCyl8.Text = SML.CL.GetCmd((int)ci.IDX_OutDnUp) != 0 ? "FWD" : "BWD"; btCyl8.ForeColor = SML.CL.GetCmd((int)ci.IDX_OutDnUp) != 0 ? Color.Lime : Color.Black; btCyl9.Text = SML.CL.GetCmd((int)ci.IDX_CutterDnUp) != 0 ? "FWD" : "BWD"; btCyl9.ForeColor = SML.CL.GetCmd((int)ci.IDX_CutterDnUp) != 0 ? Color.Lime : Color.Black; //if (CMachine._iSeqStat == EN_SEQ_STAT.ssWorkEnd || CMachine._iSeqStat == EN_SEQ_STAT.ssStop) //{ // CMachine.Reset(); // if (bRepeat) CMachine._bBtnStart = true; //} tmUpdate.Enabled = true; }
private void tmUpdate_Tick(object sender, EventArgs e) { tmUpdate.Enabled = false; lbMainThreadTime.Text = string.Format("{0:0.000ms}", SEQ._dMainThreadCycleTime); lbDevice.Text = OM.GetCrntDev().ToString(); lbLotNo.Text = LOT.GetLotNo(); btExit.Enabled = !SEQ._bRun; //Set Sequence State. if (!OM.MstOptn.bDebugMode) { switch (SEQ._iSeqStat) { default: break; case EN_SEQ_STAT.Init: lbStat.Text = "INIT"; lbStat.ForeColor = Color.Blue; break; case EN_SEQ_STAT.Error: lbStat.Text = "ERROR"; lbStat.ForeColor = SEQ._bFlick ? Color.Yellow : Color.Red; break; case EN_SEQ_STAT.Running: lbStat.Text = "RUNNING"; lbStat.ForeColor = Color.Lime; break; case EN_SEQ_STAT.Stop: lbStat.Text = "STOP"; lbStat.ForeColor = Color.Black; break; case EN_SEQ_STAT.WorkEnd: lbStat.Text = "LOTEND"; lbStat.ForeColor = Color.Gray; break; case EN_SEQ_STAT.RunWarn: lbStat.Text = "Run End"; lbStat.ForeColor = Color.Gray; break; } } else { switch (SEQ._iSeqStat) { default: break; case EN_SEQ_STAT.Init: lbStat.Text = "DEBUG INIT"; lbStat.ForeColor = Color.Blue; break; case EN_SEQ_STAT.Error: lbStat.Text = "DEBUG ERROR"; lbStat.ForeColor = SEQ._bFlick ? Color.Yellow : Color.Red; break; case EN_SEQ_STAT.Running: lbStat.Text = "DEBUG RUNNING"; lbStat.ForeColor = Color.Lime; break; case EN_SEQ_STAT.Stop: lbStat.Text = "DEBUG STOP"; lbStat.ForeColor = Color.Black; break; case EN_SEQ_STAT.WorkEnd: lbStat.Text = "DEBUG LOTEND"; lbStat.ForeColor = Color.Gray; break; } } //접근 레벨 Operator에서 Option/Util 버튼 비활성화 if (FormPassword.GetLevel() == EN_LEVEL.Operator) { //btSpc.Enabled = false; btUtil.Enabled = false; btOption.Enabled = false; } else { //btSpc.Enabled = true; btUtil.Enabled = true; btOption.Enabled = true; } tmUpdate.Enabled = true; }