private void Manual_Click(object sender, EventArgs e) { if (!mc.check.READY_AUTORUN(sender)) { return; } mc.check.push(sender, true); if (sender.Equals(BT_Move)) { windowState = true; EVENT.hWindowLargeDisplay(mc.hdc.cam.acq.grabber.cameraNumber); posX = mc.hd.tool.cPos.x.PAD(indexRow); posY = mc.hd.tool.cPos.y.PAD(indexColumn); mc.hd.tool.jogMove(posX, posY, out ret.message); if (ret.message != RetMessage.OK) { mc.message.alarmMotion(ret.message); goto EXIT; } mc.hdc.LIVE = true; mc.idle(300); mc.hdc.LIVE = false; } else if (sender.Equals(BT_Repress)) { if (windowState) { EVENT.hWindow2Display(); } mc.para.mmiOption.manualPadX = indexRow; mc.para.mmiOption.manualPadY = indexColumn; mc.hd.req = true; mc.hd.reqMode = REQMODE.PRESS; } else if (sender.Equals(BT_CheckTilt)) { if (windowState) { EVENT.hWindow2Display(); } mc.para.mmiOption.manualPadX = indexRow; mc.para.mmiOption.manualPadY = indexColumn; mc.hd.req = true; mc.hd.reqMode = REQMODE.CHECK_ATTACH_TILT; } else if (sender.Equals(BT_ReWork)) { FormUserMessage ff = new FormUserMessage(); ff.SetDisplayItems(DIAG_SEL_MODE.HD1HD2Cancel, DIAG_ICON_MODE.QUESTION, "Select Head"); ff.ShowDialog(); ret.usrDialog = FormUserMessage.diagResult; if (ret.usrDialog == DIAG_RESULT.HD1) { mc.hd.tool.singleCycleHead = (int)UnitCodeHead.HD1; } else if (ret.usrDialog == DIAG_RESULT.HD2) { mc.hd.tool.singleCycleHead = (int)UnitCodeHead.HD2; } else { goto EXIT; //mc.check.push(sender, false); //return; } if (windowState) { EVENT.hWindow2Display(); } mc.para.mmiOption.manualSingleMode = true; mc.para.mmiOption.manualPadX = indexRow; mc.para.mmiOption.manualPadY = indexColumn; mc.hd.req = true; mc.hd.reqMode = REQMODE.SINGLE; } else { goto EXIT; } EXIT: mc.main.Thread_Polling(); mc.para.mmiOption.manualSingleMode = false; // update current information mc.board.padStatus(BOARD_ZONE.WORKEDIT, indexRow, indexColumn, mc.board.padStatus(BOARD_ZONE.WORKING, indexRow, indexColumn), out ret.b); mc.check.push(sender, false); }
//BOARD_WORK_DATA localWorkEdit = new BOARD_WORK_DATA(); // BOARD_WORK_DATA prevBoardStatus; private void Control_Click(object sender, EventArgs e) { if (windowState) { EVENT.hWindow2Display(); } if (sender.Equals(BT_Close)) { //FormSelect ff = new FormSelect(); FormUserMessage ff = new FormUserMessage(); ff.SetDisplayItems(DIAG_SEL_MODE.YesNoCancel, DIAG_ICON_MODE.QUESTION, textResource.MB_ETC_PARA_SAVE); //MainForm.UserMessageBox(DIAG_SEL_MODE.YesNoCancel, DIAG_ICON_MODE.QUESTION, "변경된 데이터를 Update할까요?", "[Tray Edit] : "); ff.ShowDialog(); ret.usrDialog = FormUserMessage.diagResult; //mc.message.YesNoCancel("변경된 데이터를 Update할까요?", out ret.dialog, "[Tray Edit] : "); if (ret.usrDialog == DIAG_RESULT.Yes) { // 20130513 , Update 시 한번더 로그인 하도록 추가 //FormLogIn fl = new FormLogIn(); //fl.ShowDialog(); //if (FormLogIn.logInCheck == false) return; //else //{ //mc.para.paraLogWrite(mc.user.userName + "로그인"); UpdateWorkData(); //mc.para.paraLogWrite(); //} } else if (ret.usrDialog == DIAG_RESULT.No) { ; } else { goto EXIT; } IsDisplayed = false; editFlag = false; EVENT.boardStatus(BOARD_ZONE.WORKING, mc.board.padStatus(BOARD_ZONE.WORKING), (int)mc.para.MT.padCount.x.value, (int)mc.para.MT.padCount.y.value); this.Close(); } if (sender.Equals(BT_Empty)) { editFlag = false; //mc.board.padStatus(BOARD_ZONE.WORKING, indexRow, indexColumn, PAD_STATUS.INVALID, out ret.b); } if (sender.Equals(BT_Ready)) { editFlag = true; padApplyStatus = PAD_STATUS.READY; //mc.board.padStatus(BOARD_ZONE.WORKING, indexRow, indexColumn, PAD_STATUS.READY, out ret.b); } if (sender.Equals(BT_Skip)) { editFlag = true; padApplyStatus = PAD_STATUS.SKIP; //mc.board.padStatus(BOARD_ZONE.WORKING, indexRow, indexColumn, PAD_STATUS.SKIP, out ret.b); } if (sender.Equals(BT_AttachDone)) { editFlag = true; padApplyStatus = PAD_STATUS.ATTACH_DONE; //mc.board.padStatus(BOARD_ZONE.WORKING, indexRow, indexColumn, PAD_STATUS.PLACE, out ret.b); } if (sender.Equals(BT_AttachFail)) { editFlag = true; padApplyStatus = PAD_STATUS.ATTACH_FAIL; //mc.board.padStatus(BOARD_ZONE.WORKING, indexRow, indexColumn, PAD_STATUS.PLACE_ERROR, out ret.b); } if (sender.Equals(BT_PadStatus)) { { if (editFlag) { //editFlag = false; if (CB_AllChange.Checked) { mc.message.OkCancel(textResource.MB_ETC_UPDATE_TRAY_INFO_ALL, out ret.dialog, "[Tray Edit] : "); if (ret.dialog != System.Windows.Forms.DialogResult.OK) { goto EXIT; } for (int i = 0; i < (int)mc.para.MT.padCount.x.value; i++) { for (int j = 0; j < (int)mc.para.MT.padCount.y.value; j++) { if (WorkAreaControl.workArea[i, j] == 1) // WorkArea값이 1일때만 업데이트 { mc.board.padStatus(BOARD_ZONE.WORKEDIT, i, j, padApplyStatus, out ret.b); } } } } else { if (WorkAreaControl.workArea[indexRow, indexColumn] == 1) // WorkArea값이 1일때만 업데이트 { mc.board.padStatus(BOARD_ZONE.WORKEDIT, indexRow, indexColumn, padApplyStatus, out ret.b); } } BoardStatus_WorkArea.backupPadStatus = mc.board.padStatus(BOARD_ZONE.WORKEDIT); } } } if (sender.Equals(BT_Left)) { //editFlag = false; if (mc.para.mcType.FrRr == McTypeFrRr.FRONT) { indexRow--; if (indexRow < 0) { indexRow = 0; } } else { indexRow++; if (indexRow >= (int)mc.para.MT.padCount.x.value) { indexRow = (int)mc.para.MT.padCount.x.value - 1; } } BoardStatus_WorkArea.SelectChange(indexRow, indexColumn); if (editFlag) { if (WorkAreaControl.workArea[indexRow, indexColumn] == 1) // WorkArea값이 1일때만 업데이트 { mc.board.padStatus(BOARD_ZONE.WORKEDIT, indexRow, indexColumn, padApplyStatus, out ret.b); BoardStatus_WorkArea.backupPadStatus = mc.board.padStatus(BOARD_ZONE.WORKEDIT); } } } if (sender.Equals(BT_Right)) { //editFlag = false; if (mc.para.mcType.FrRr == McTypeFrRr.FRONT) { indexRow++; if (indexRow >= (int)mc.para.MT.padCount.x.value) { indexRow = (int)mc.para.MT.padCount.x.value - 1; } } else { indexRow--; if (indexRow < 0) { indexRow = 0; } } BoardStatus_WorkArea.SelectChange(indexRow, indexColumn); if (editFlag) { if (WorkAreaControl.workArea[indexRow, indexColumn] == 1) // WorkArea값이 1일때만 업데이트 { mc.board.padStatus(BOARD_ZONE.WORKEDIT, indexRow, indexColumn, padApplyStatus, out ret.b); BoardStatus_WorkArea.backupPadStatus = mc.board.padStatus(BOARD_ZONE.WORKEDIT); } } } if (sender.Equals(BT_Up)) { //editFlag = false; if (mc.para.mcType.FrRr == McTypeFrRr.FRONT) { indexColumn++; if (indexColumn >= (int)mc.para.MT.padCount.y.value) { indexColumn = (int)mc.para.MT.padCount.y.value - 1; } } else { indexColumn--; if (indexColumn < 0) { indexColumn = 0; } } BoardStatus_WorkArea.SelectChange(indexRow, indexColumn); if (editFlag) { if (WorkAreaControl.workArea[indexRow, indexColumn] == 1) // WorkArea값이 1일때만 업데이트 { mc.board.padStatus(BOARD_ZONE.WORKEDIT, indexRow, indexColumn, padApplyStatus, out ret.b); BoardStatus_WorkArea.backupPadStatus = mc.board.padStatus(BOARD_ZONE.WORKEDIT); } } } if (sender.Equals(BT_Down)) { //editFlag = false; if (mc.para.mcType.FrRr == McTypeFrRr.FRONT) { indexColumn--; if (indexColumn < 0) { indexColumn = 0; } } else { indexColumn++; if (indexColumn >= (int)mc.para.MT.padCount.y.value) { indexColumn = (int)mc.para.MT.padCount.y.value - 1; } } BoardStatus_WorkArea.SelectChange(indexRow, indexColumn); if (editFlag) { if (WorkAreaControl.workArea[indexRow, indexColumn] == 1) // WorkArea값이 1일때만 업데이트 { mc.board.padStatus(BOARD_ZONE.WORKEDIT, indexRow, indexColumn, padApplyStatus, out ret.b); BoardStatus_WorkArea.backupPadStatus = mc.board.padStatus(BOARD_ZONE.WORKEDIT); } } } EXIT: refresh(); }