// DlgGlassAndNetworkInfo.cpp : 구현 파일입니다.
|
//
|
|
#include "stdafx.h"
|
#include "ReviewSystem.h"
|
#include "DlgGlassAndConnectionInfo.h"
|
#include "afxdialogex.h"
|
|
#include "CHReviewSetting/SystemInfo.h"
|
|
|
// CDlgGlassAndNetworkInfo 대화 상자입니다.
|
|
IMPLEMENT_DYNAMIC(CDlgGlassAndConnectionInfo, CDialog)
|
|
CDlgGlassAndConnectionInfo::CDlgGlassAndConnectionInfo(CWnd* pParent /*=NULL*/)
|
: CDialog(CDlgGlassAndConnectionInfo::IDD, pParent)
|
{
|
m_pGlassResult = NULL;
|
m_pConnectionStatus = NULL;
|
m_nProcessStatus = 0;
|
m_nLineType = -1;
|
}
|
|
CDlgGlassAndConnectionInfo::~CDlgGlassAndConnectionInfo()
|
{
|
}
|
|
void CDlgGlassAndConnectionInfo::DoDataExchange(CDataExchange* pDX)
|
{
|
CDialog::DoDataExchange(pDX);
|
DDX_Control(pDX, IDC_GRID_GLASS_INFO, m_ctrlGlassInfo);
|
DDX_Control(pDX, IDC_GRID_CONNECT_INFO, m_ctrlConnectInfo);
|
}
|
|
|
BEGIN_MESSAGE_MAP(CDlgGlassAndConnectionInfo, CDialog)
|
ON_BN_CLICKED(IDOK, &CDlgGlassAndConnectionInfo::OnBnClickedOk)
|
ON_BN_CLICKED(IDCANCEL, &CDlgGlassAndConnectionInfo::OnBnClickedCancel)
|
ON_MESSAGE(UM_PROCESS_STATUS_UPDATE, &CDlgGlassAndConnectionInfo::OnProcessStatusUpdate)
|
ON_MESSAGE(UM_CONNECTION_STATUS_UPDATE, &CDlgGlassAndConnectionInfo::OnConnectionStatusUpdate)
|
ON_WM_ERASEBKGND()
|
ON_WM_CTLCOLOR()
|
END_MESSAGE_MAP()
|
|
|
// CDlgGlassAndNetworkInfo 메시지 처리기입니다.
|
|
void CDlgGlassAndConnectionInfo::OnBnClickedOk()
|
{
|
// TODO: 여기에 컨트롤 알림 처리기 코드를 추가합니다.
|
// OnOK();
|
}
|
|
void CDlgGlassAndConnectionInfo::OnBnClickedCancel()
|
{
|
// TODO: 여기에 컨트롤 알림 처리기 코드를 추가합니다.
|
// OnCancel();
|
}
|
|
void CDlgGlassAndConnectionInfo::InitGridGlassInfo()
|
{
|
enum { GLASS_GRID_ROW_COUNT = 28, GLASS_GRID_COL_COUNT = 2 };
|
|
int nRowIdx, nColIdx, nRows, nCols, nFixRows, nFixCols;
|
CString strTemp;
|
CRect rt;
|
|
nRows = GLASS_GRID_ROW_COUNT;
|
nCols = GLASS_GRID_COL_COUNT;
|
nFixRows = 1;
|
nFixCols = 1;
|
nRowIdx = 0;
|
nColIdx = 0;
|
|
|
// CFont font;
|
// VERIFY(font.CreateFont(
|
// 15, // nHeight
|
// 4, // nWidth
|
// 0, // nEscapement
|
// 0, // nOrientation
|
// FW_NORMAL, // nWeight
|
// FALSE, // bItalic
|
// FALSE, // bUnderline
|
// 0, // cStrikeOut
|
// ANSI_CHARSET, // nCharSet
|
// OUT_DEFAULT_PRECIS, // nOutPrecision
|
// CLIP_DEFAULT_PRECIS, // nClipPrecision
|
// DEFAULT_QUALITY, // nQuality
|
// DEFAULT_PITCH | FF_SWISS, // nPitchAndFamily
|
// _T("MS Shell Dlg"))); // lpszFacename
|
//
|
// m_ctrlGlassInfo.SetFont(&font);
|
|
|
m_ctrlGlassInfo.GetClientRect(&rt);
|
m_ctrlGlassInfo.GetDefaultCell(TRUE, FALSE)->SetBackClr(RGB(180, 210, 247));
|
m_ctrlGlassInfo.GetDefaultCell(FALSE, TRUE)->SetBackClr(RGB(180, 210, 247));
|
m_ctrlGlassInfo.GetDefaultCell(FALSE, FALSE)->SetBackClr(RGB(255, 255, 255));
|
|
m_ctrlGlassInfo.SetRowCount(nRows);
|
m_ctrlGlassInfo.SetColumnCount(nCols);
|
m_ctrlGlassInfo.SetFixedRowCount(nFixRows);
|
m_ctrlGlassInfo.SetFixedColumnCount(nFixCols);
|
|
m_ctrlGlassInfo.SetColumnWidth(0, 64);
|
m_ctrlGlassInfo.SetColumnWidth(1, 64);
|
|
m_ctrlGlassInfo.SetRowHeight(0,25);
|
m_ctrlGlassInfo.SetRowHeight(1,25);
|
m_ctrlGlassInfo.SetRowHeight(2,25);
|
m_ctrlGlassInfo.SetRowHeight(3,25);
|
m_ctrlGlassInfo.SetRowHeight(4,25);
|
m_ctrlGlassInfo.SetRowHeight(5,25);
|
|
GV_ITEM Item;
|
|
nRowIdx = 0;
|
nColIdx = 0;
|
|
//col
|
Item.mask = GVIF_TEXT;
|
Item.row = nRowIdx;
|
Item.col = nColIdx;
|
strTemp.Format(_T("Name"));
|
Item.strText = strTemp;
|
m_ctrlGlassInfo.SetItem(&Item);
|
|
Item.mask = GVIF_TEXT;
|
Item.row = nRowIdx++;
|
Item.col = nColIdx + 1;
|
strTemp.Format(_T("PCControl"));
|
Item.strText = strTemp;
|
m_ctrlGlassInfo.SetItem(&Item);
|
|
#if 1
|
|
//col
|
Item.mask = GVIF_TEXT;
|
Item.row = nRowIdx++;
|
Item.col = nColIdx;
|
strTemp.Format(_T("PROD_ID"));
|
Item.strText = strTemp;
|
m_ctrlGlassInfo.SetItem(&Item);
|
|
//row
|
Item.row = nRowIdx++;
|
Item.col = nColIdx;
|
strTemp.Format(_T("OPER_ID"));
|
Item.strText = strTemp;
|
m_ctrlGlassInfo.SetItem(&Item);
|
|
Item.row = nRowIdx++;
|
Item.col = nColIdx;
|
strTemp.Format(_T("LOT_ID"));
|
Item.strText = strTemp;
|
m_ctrlGlassInfo.SetItem(&Item);
|
|
Item.row = nRowIdx++;
|
Item.col = nColIdx;
|
strTemp.Format(_T("PPID"));
|
Item.strText = strTemp;
|
m_ctrlGlassInfo.SetItem(&Item);
|
|
Item.row = nRowIdx++;
|
Item.col = nColIdx;
|
strTemp.Format(_T("JOB_TYPE"));
|
Item.strText = strTemp;
|
m_ctrlGlassInfo.SetItem(&Item);
|
|
Item.row = nRowIdx++;
|
Item.col = nColIdx;
|
strTemp.Format(_T("JOB_ID"));
|
Item.strText = strTemp;
|
m_ctrlGlassInfo.SetItem(&Item);
|
|
|
////////////////////////////////////////
|
Item.row = nRowIdx++;
|
Item.col = nColIdx;
|
strTemp.Format(_T("LOT_SEQUENCE_NUMBER"));
|
Item.strText = strTemp;
|
m_ctrlGlassInfo.SetItem(&Item);
|
|
|
Item.row = nRowIdx++;
|
Item.col = nColIdx;
|
strTemp.Format(_T("SLOT_SEQUENCE_NUMBER"));
|
Item.strText = strTemp;
|
m_ctrlGlassInfo.SetItem(&Item);
|
|
|
Item.row = nRowIdx++;
|
Item.col = nColIdx;
|
strTemp.Format(_T("PROPERTY_CODE"));
|
Item.strText = strTemp;
|
m_ctrlGlassInfo.SetItem(&Item);
|
|
|
Item.row = nRowIdx++;
|
Item.col = nColIdx;
|
strTemp.Format(_T("JOB_JUDGE_CODE"));
|
Item.strText = strTemp;
|
m_ctrlGlassInfo.SetItem(&Item);
|
|
Item.row = nRowIdx++;
|
Item.col = nColIdx;
|
strTemp.Format(_T("JOB_GRADE_CODE"));
|
Item.strText = strTemp;
|
m_ctrlGlassInfo.SetItem(&Item);
|
|
Item.row = nRowIdx++;
|
Item.col = nColIdx;
|
strTemp.Format(_T("SUBSTRATE_TYPE"));
|
Item.strText = strTemp;
|
m_ctrlGlassInfo.SetItem(&Item);
|
|
Item.row = nRowIdx++;
|
Item.col = nColIdx;
|
strTemp.Format(_T("PROCESSING_FLAG"));
|
Item.strText = strTemp;
|
m_ctrlGlassInfo.SetItem(&Item);
|
|
Item.row = nRowIdx++;
|
Item.col = nColIdx;
|
strTemp.Format(_T("INSPECTION_FLAG"));
|
Item.strText = strTemp;
|
m_ctrlGlassInfo.SetItem(&Item);
|
|
Item.row = nRowIdx++;
|
Item.col = nColIdx;
|
strTemp.Format(_T("SKIP_FLAG"));
|
Item.strText = strTemp;
|
m_ctrlGlassInfo.SetItem(&Item);
|
|
Item.row = nRowIdx++;
|
Item.col = nColIdx;
|
strTemp.Format(_T("JOB_SIZE"));
|
Item.strText = strTemp;
|
m_ctrlGlassInfo.SetItem(&Item);
|
|
Item.row = nRowIdx++;
|
Item.col = nColIdx;
|
strTemp.Format(_T("GLASS_THICKNESS"));
|
Item.strText = strTemp;
|
m_ctrlGlassInfo.SetItem(&Item);
|
|
Item.row = nRowIdx++;
|
Item.col = nColIdx;
|
strTemp.Format(_T("JOB_ANGLE"));
|
Item.strText = strTemp;
|
m_ctrlGlassInfo.SetItem(&Item);
|
|
Item.row = nRowIdx++;
|
Item.col = nColIdx;
|
strTemp.Format(_T("JOB_FLIP"));
|
Item.strText = strTemp;
|
m_ctrlGlassInfo.SetItem(&Item);
|
|
Item.row = nRowIdx++;
|
Item.col = nColIdx;
|
strTemp.Format(_T("CUTTING_GLASS_TYPE"));
|
Item.strText = strTemp;
|
m_ctrlGlassInfo.SetItem(&Item);
|
|
Item.row = nRowIdx++;
|
Item.col = nColIdx;
|
strTemp.Format(_T("PROCESSING_COUNT"));
|
Item.strText = strTemp;
|
m_ctrlGlassInfo.SetItem(&Item);
|
|
Item.row = nRowIdx++;
|
Item.col = nColIdx;
|
strTemp.Format(_T("INSPECTION_JUDGE_DATA"));
|
Item.strText = strTemp;
|
m_ctrlGlassInfo.SetItem(&Item);
|
|
Item.row = nRowIdx++;
|
Item.col = nColIdx;
|
strTemp.Format(_T("PAIR_JOB_ID"));
|
Item.strText = strTemp;
|
m_ctrlGlassInfo.SetItem(&Item);
|
|
Item.row = nRowIdx++;
|
Item.col = nColIdx;
|
strTemp.Format(_T("PAIR_FLAG"));
|
Item.strText = strTemp;
|
m_ctrlGlassInfo.SetItem(&Item);
|
|
Item.row = nRowIdx++;
|
Item.col = nColIdx;
|
strTemp.Format(_T("OPTION_VALUE"));
|
Item.strText = strTemp;
|
m_ctrlGlassInfo.SetItem(&Item);
|
|
Item.row = nRowIdx++;
|
Item.col = nColIdx;
|
strTemp.Format(_T("RESERVED"));
|
Item.strText = strTemp;
|
m_ctrlGlassInfo.SetItem(&Item);
|
|
Item.row = nRowIdx++;
|
Item.col = nColIdx;
|
strTemp.Format(_T("Glass_Scan_Schedule")); //분판정보
|
Item.strText = strTemp;
|
m_ctrlGlassInfo.SetItem(&Item);
|
|
#else
|
//col
|
Item.mask = GVIF_TEXT;
|
Item.row = nRowIdx++;
|
Item.col = nColIdx;
|
strTemp.Format(_T("GLASSID"));
|
Item.strText = strTemp;
|
m_ctrlGlassInfo.SetItem(&Item);
|
|
//row
|
Item.row = nRowIdx++;
|
Item.col = nColIdx;
|
strTemp.Format(_T("LOTID"));
|
Item.strText = strTemp;
|
m_ctrlGlassInfo.SetItem(&Item);
|
|
Item.row = nRowIdx++;
|
strTemp.Format(_T("SLOT"));
|
Item.strText = strTemp;
|
m_ctrlGlassInfo.SetItem(&Item);
|
|
Item.row = nRowIdx++;
|
strTemp.Format(_T("STEPID"));
|
Item.strText = strTemp;
|
m_ctrlGlassInfo.SetItem(&Item);
|
|
Item.row = nRowIdx++;
|
strTemp.Format(_T("PPID"));
|
Item.strText = strTemp;
|
m_ctrlGlassInfo.SetItem(&Item);
|
|
Item.row = nRowIdx++;
|
strTemp.Format(_T("FLOWID"));
|
Item.strText = strTemp;
|
m_ctrlGlassInfo.SetItem(&Item);
|
|
Item.row = nRowIdx++;
|
strTemp.Format(_T("FLOWHIS"));
|
Item.strText = strTemp;
|
m_ctrlGlassInfo.SetItem(&Item);
|
#endif
|
|
for(int rowIdx = 0; rowIdx < GLASS_GRID_ROW_COUNT; rowIdx++)
|
m_ctrlGlassInfo.SetRowHeight(rowIdx, 21);
|
}
|
|
void CDlgGlassAndConnectionInfo::InitGridConnectInfo()
|
{
|
enum { CONNECT_INFO_GRID_ROW_COUNT = 10, CONNECT_INFO_GRID_COL_COUNT = 2 };
|
|
int nRowIdx, nColIdx, nRows, nCols, nFixRows, nFixCols, nWidth, nFixWidth;
|
CString strTemp;
|
CRect rt;
|
|
nRows = CONNECT_INFO_GRID_ROW_COUNT;
|
nCols = CONNECT_INFO_GRID_COL_COUNT;
|
nFixRows = 1;
|
nFixCols = 1;
|
nRowIdx = 0;
|
nColIdx = 0;
|
|
m_ctrlConnectInfo.GetClientRect(&rt);
|
m_ctrlConnectInfo.GetDefaultCell(TRUE, FALSE)->SetBackClr(RGB(248, 218, 169));
|
m_ctrlConnectInfo.GetDefaultCell(FALSE, TRUE)->SetBackClr(RGB(248, 218, 169));
|
m_ctrlConnectInfo.GetDefaultCell(FALSE, FALSE)->SetBackClr(RGB(255, 255, 255));
|
|
m_ctrlConnectInfo.SetRowCount(nRows);
|
m_ctrlConnectInfo.SetColumnCount(nCols);
|
m_ctrlConnectInfo.SetFixedRowCount(nFixRows);
|
m_ctrlConnectInfo.SetFixedColumnCount(nFixCols);
|
m_ctrlConnectInfo.SetEditable(FALSE);
|
m_ctrlConnectInfo.SetSelectedRange(0, 0, 0, 0, FALSE, FALSE);
|
nFixWidth = 86;
|
nWidth = (rt.Width() - nFixWidth) / (CONNECT_INFO_GRID_COL_COUNT - 1);
|
|
GV_ITEM Item;
|
|
//col
|
Item.mask = GVIF_TEXT;
|
Item.row = nRowIdx;
|
Item.col = nColIdx;
|
strTemp.Format(_T("Item"));//strTemp.Format(_T("Connect"));
|
Item.strText = strTemp;
|
m_ctrlConnectInfo.SetColumnWidth(nColIdx++, nFixWidth);
|
m_ctrlConnectInfo.SetItem(&Item);
|
|
Item.col = nColIdx;
|
strTemp.Format(_T("Status"));
|
Item.strText = strTemp;
|
m_ctrlConnectInfo.SetColumnWidth(nColIdx++, nWidth);
|
m_ctrlConnectInfo.SetItem(&Item);
|
|
|
//row
|
nRowIdx = 1;
|
nColIdx = 0;
|
Item.row = nRowIdx++;
|
Item.col = nColIdx;
|
strTemp.Format(_T("PCControl"));
|
Item.strText = strTemp;
|
m_ctrlConnectInfo.SetItem(&Item);
|
|
Item.row = nRowIdx++;
|
strTemp.Format(_T("Motor"));
|
Item.strText = strTemp;
|
m_ctrlConnectInfo.SetItem(&Item);
|
|
Item.row = nRowIdx++;
|
strTemp.Format(_T("AFM"));
|
Item.strText = strTemp;
|
m_ctrlConnectInfo.SetItem(&Item);
|
|
Item.row = nRowIdx++;
|
strTemp.Format(_T("RCam"));//strTemp.Format(_T("ReviewCam"));
|
Item.strText = strTemp;
|
m_ctrlConnectInfo.SetItem(&Item);
|
|
Item.row = nRowIdx++;
|
strTemp.Format(_T("RLight"));//strTemp.Format(_T("ReviewLight"));
|
Item.strText = strTemp;
|
m_ctrlConnectInfo.SetItem(&Item);
|
|
Item.row = nRowIdx++;
|
strTemp.Format(_T("Turret"));
|
Item.strText = strTemp;
|
m_ctrlConnectInfo.SetItem(&Item);
|
|
Item.row = nRowIdx++;
|
strTemp.Format(_T("ACam1"));//strTemp.Format(_T("AlignCam1"));
|
Item.strText = strTemp;
|
m_ctrlConnectInfo.SetItem(&Item);
|
|
Item.row = nRowIdx++;
|
strTemp.Format(_T("ACam2"));//strTemp.Format(_T("AlignCam2"));
|
Item.strText = strTemp;
|
m_ctrlConnectInfo.SetItem(&Item);
|
|
Item.row = nRowIdx++;
|
strTemp.Format(_T("ALight"));//strTemp.Format(_T("AlignLight"));
|
Item.strText = strTemp;
|
m_ctrlConnectInfo.SetItem(&Item);
|
|
}
|
|
BOOL CDlgGlassAndConnectionInfo::OnInitDialog()
|
{
|
CDialog::OnInitDialog();
|
|
InitGridGlassInfo();
|
|
InitGridConnectInfo();
|
|
return TRUE; // return TRUE unless you set the focus to a control
|
// 예외: OCX 속성 페이지는 FALSE를 반환해야 합니다.
|
}
|
|
void CDlgGlassAndConnectionInfo::UpdateProcessStatus(int nLineType, int nMachineType, int nProcessStatus, const CGlassResult* pGlassResult)
|
{
|
if (pGlassResult==NULL) return;
|
|
m_nProcessStatus = nProcessStatus;
|
|
m_pGlassResult = pGlassResult;
|
|
m_nLineType = nLineType;
|
|
this->SendMessage(UM_PROCESS_STATUS_UPDATE);
|
}
|
|
void CDlgGlassAndConnectionInfo::UpdateConnectionStatus(const CConnectionStatus* pConnectionStatus)
|
{
|
if (pConnectionStatus==NULL) return;
|
|
m_pConnectionStatus = pConnectionStatus;
|
|
this->PostMessage(UM_CONNECTION_STATUS_UPDATE);
|
}
|
|
LRESULT CDlgGlassAndConnectionInfo::OnProcessStatusUpdate(WPARAM wParam, LPARAM lParam)
|
{
|
if (m_pGlassResult==NULL) return 0;
|
|
g_pLog->DisplayMessage(_T("[DlgGlassAndConnectionInfo] m_pGlassResult = %d"), m_pGlassResult);
|
|
int nRowIdx = 1;
|
int nColIdx = 1;
|
|
// [2017:1:9]-[WEZASW] : PCControl GlassData 항목 재정의.
|
#if 1
|
// PROD_ID
|
m_ctrlGlassInfo.SetItemText(nRowIdx, nColIdx, m_pGlassResult->m_strProdID);
|
nRowIdx++;
|
|
// OPER_ID
|
m_ctrlGlassInfo.SetItemText(nRowIdx, nColIdx, m_pGlassResult->m_strOperID);
|
nRowIdx++;
|
|
// LOT_ID
|
m_ctrlGlassInfo.SetItemText(nRowIdx, nColIdx, m_pGlassResult->m_strLotID);
|
nRowIdx++;
|
|
// PPID
|
m_ctrlGlassInfo.SetItemText(nRowIdx, nColIdx, m_pGlassResult->m_strPPID);
|
nRowIdx++;
|
|
// JOB_TYPE
|
m_ctrlGlassInfo.SetItemText(nRowIdx, nColIdx, m_pGlassResult->m_strJobType);
|
nRowIdx++;
|
|
// JOB_ID
|
m_ctrlGlassInfo.SetItemText(nRowIdx, nColIdx, m_pGlassResult->m_strJobID);
|
nRowIdx++;
|
|
// LOT_SEQUENCE_NUMBER
|
m_ctrlGlassInfo.SetItemText(nRowIdx, nColIdx, m_pGlassResult->m_strLotSeqNum);
|
nRowIdx++;
|
|
// SLOT_SEQUENCE_NUMBER
|
m_ctrlGlassInfo.SetItemText(nRowIdx, nColIdx, m_pGlassResult->m_strSlotSeqNum);
|
nRowIdx++;
|
|
// PROPERTY_CODE
|
m_ctrlGlassInfo.SetItemText(nRowIdx, nColIdx, m_pGlassResult->m_strPropertyCode);
|
nRowIdx++;
|
|
// JOB_JUDGE_CODE
|
m_ctrlGlassInfo.SetItemText(nRowIdx, nColIdx, m_pGlassResult->m_strJobJudgeCode);
|
nRowIdx++;
|
|
// JOB_GRADE_CODE
|
m_ctrlGlassInfo.SetItemText(nRowIdx, nColIdx, m_pGlassResult->m_strJobGradeCode);
|
nRowIdx++;
|
|
// SUBSTRATE_TYPE
|
m_ctrlGlassInfo.SetItemText(nRowIdx, nColIdx, m_pGlassResult->m_strSubstrateType);
|
nRowIdx++;
|
|
// PROCESSING_FLAG
|
m_ctrlGlassInfo.SetItemText(nRowIdx, nColIdx, m_pGlassResult->m_strProcessingFlag);
|
nRowIdx++;
|
|
// INSPECTION_FLAG
|
m_ctrlGlassInfo.SetItemText(nRowIdx, nColIdx, m_pGlassResult->m_strInspectionFlag);
|
nRowIdx++;
|
|
|
// SKIP_FLAG
|
m_ctrlGlassInfo.SetItemText(nRowIdx, nColIdx, m_pGlassResult->m_strSkipFlag);
|
nRowIdx++;
|
|
// JOB_SIZE
|
m_ctrlGlassInfo.SetItemText(nRowIdx, nColIdx, m_pGlassResult->m_strJobSize);
|
nRowIdx++;
|
|
// GLASS_THICKNESS
|
m_ctrlGlassInfo.SetItemText(nRowIdx, nColIdx, m_pGlassResult->m_strGlassThickness);
|
nRowIdx++;
|
|
// JOB_ANGLE
|
m_ctrlGlassInfo.SetItemText(nRowIdx, nColIdx, m_pGlassResult->m_strJobAngle);
|
nRowIdx++;
|
|
// JOB_FLIP
|
m_ctrlGlassInfo.SetItemText(nRowIdx, nColIdx, m_pGlassResult->m_strJobFlip);
|
nRowIdx++;
|
|
// CUTTING_GLASS_TYPE
|
m_ctrlGlassInfo.SetItemText(nRowIdx, nColIdx, m_pGlassResult->m_strCuttingGlassType);
|
nRowIdx++;
|
|
// PROCESSING_COUNT
|
m_ctrlGlassInfo.SetItemText(nRowIdx, nColIdx, m_pGlassResult->m_strProcessingCount);
|
nRowIdx++;
|
|
// INSPECTION_JUDGE_DATA
|
m_ctrlGlassInfo.SetItemText(nRowIdx, nColIdx, m_pGlassResult->m_strInspectionJudgeData);
|
nRowIdx++;
|
|
// PAIR_JOB_ID
|
m_ctrlGlassInfo.SetItemText(nRowIdx, nColIdx, m_pGlassResult->m_strPairJobID);
|
nRowIdx++;
|
|
// PAIR_FLAG
|
m_ctrlGlassInfo.SetItemText(nRowIdx, nColIdx, m_pGlassResult->m_strPairFlag);
|
nRowIdx++;
|
|
// OPTION_VALUE
|
m_ctrlGlassInfo.SetItemText(nRowIdx, nColIdx, m_pGlassResult->m_strOptionValue);
|
nRowIdx++;
|
|
// RESERVED
|
m_ctrlGlassInfo.SetItemText(nRowIdx, nColIdx, m_pGlassResult->m_strReserved);
|
nRowIdx++;
|
|
// Glass Scan Schedule
|
m_ctrlGlassInfo.SetItemText(nRowIdx, nColIdx, m_pGlassResult->strGlassScanSchedule); //분판 정보
|
nRowIdx++;
|
|
// PPID_RC (레시피 이름)
|
m_ctrlGlassInfo.SetItemText(nRowIdx, nColIdx, m_pGlassResult->m_strPPID_RC); //분판 정보
|
nRowIdx++;
|
|
|
#else
|
// GlassID
|
m_ctrlGlassInfo.SetItemText(nRowIdx, nColIdx, m_pGlassResult->m_strGlassID);
|
nRowIdx++;
|
|
// LotID
|
m_ctrlGlassInfo.SetItemText(nRowIdx, nColIdx, m_pGlassResult->m_strLotID);
|
nRowIdx++;
|
|
// slot num
|
CString strValue = _T("");
|
strValue.Format(_T("%d"), m_pGlassResult->m_nSlotNum);
|
m_ctrlGlassInfo.SetItemText(nRowIdx, nColIdx, strValue);
|
nRowIdx++;
|
|
// step
|
m_ctrlGlassInfo.SetItemText(nRowIdx, nColIdx, m_pGlassResult->m_strStepID);
|
nRowIdx++;
|
|
// ppid
|
m_ctrlGlassInfo.SetItemText(nRowIdx, nColIdx, m_pGlassResult->m_strPPID);
|
nRowIdx++;
|
|
// flow id
|
m_ctrlGlassInfo.SetItemText(nRowIdx, nColIdx, m_pGlassResult->m_strFlowID);
|
nRowIdx++;
|
#endif
|
m_ctrlGlassInfo.Invalidate(FALSE);
|
|
return 1;
|
}
|
|
LRESULT CDlgGlassAndConnectionInfo::OnConnectionStatusUpdate(WPARAM wParam, LPARAM lParam)
|
{
|
if (m_pConnectionStatus==NULL) return 0;
|
|
int nRowIdx = 1;
|
int nColIdx = 1;
|
|
COLORREF nConnColor = RGB(150,255,150);
|
COLORREF nDisconnColor = RGB(255,150,150);
|
|
// PCControl
|
if (m_pConnectionStatus->m_bSignalStatus)
|
{
|
m_ctrlConnectInfo.GetCell(nRowIdx, nColIdx)->SetBackClr(nConnColor);
|
m_ctrlConnectInfo.GetCell(nRowIdx, nColIdx)->SetText(_T("Connect"));
|
}
|
else
|
{
|
m_ctrlConnectInfo.GetCell(nRowIdx, nColIdx)->SetBackClr(nDisconnColor);
|
m_ctrlConnectInfo.GetCell(nRowIdx, nColIdx)->SetText(_T("Disconnect"));
|
}
|
nRowIdx++;
|
|
// Motor
|
if (m_pConnectionStatus->m_bMotorStatus)
|
{
|
m_ctrlConnectInfo.GetCell(nRowIdx, nColIdx)->SetBackClr(nConnColor);
|
m_ctrlConnectInfo.GetCell(nRowIdx, nColIdx)->SetText(_T("Connect"));
|
}
|
else
|
{
|
m_ctrlConnectInfo.GetCell(nRowIdx, nColIdx)->SetBackClr(nDisconnColor);
|
m_ctrlConnectInfo.GetCell(nRowIdx, nColIdx)->SetText(_T("Disconnect"));
|
}
|
nRowIdx++;
|
|
// Review AFM
|
if (m_pConnectionStatus->m_vecReviewAFMStatus.size()>=1 && m_pConnectionStatus->m_vecReviewAFMStatus[0])
|
{
|
m_ctrlConnectInfo.GetCell(nRowIdx, nColIdx)->SetBackClr(nConnColor);
|
m_ctrlConnectInfo.GetCell(nRowIdx, nColIdx)->SetText(_T("Connect"));
|
}
|
else
|
{
|
m_ctrlConnectInfo.GetCell(nRowIdx, nColIdx)->SetBackClr(nDisconnColor);
|
m_ctrlConnectInfo.GetCell(nRowIdx, nColIdx)->SetText(_T("Disconnect"));
|
}
|
nRowIdx++;
|
|
// Review Camera
|
if (m_pConnectionStatus->m_vecReviewCameraStatus.size()>=1 && m_pConnectionStatus->m_vecReviewCameraStatus[0])
|
{
|
m_ctrlConnectInfo.GetCell(nRowIdx, nColIdx)->SetBackClr(nConnColor);
|
m_ctrlConnectInfo.GetCell(nRowIdx, nColIdx)->SetText(_T("Connect"));
|
}
|
else
|
{
|
m_ctrlConnectInfo.GetCell(nRowIdx, nColIdx)->SetBackClr(nDisconnColor);
|
m_ctrlConnectInfo.GetCell(nRowIdx, nColIdx)->SetText(_T("Disconnect"));
|
}
|
nRowIdx++;
|
|
// Review Light
|
if (m_pConnectionStatus->m_vecReviewLightStatus.size()>=1 && m_pConnectionStatus->m_vecReviewLightStatus[0])
|
{
|
m_ctrlConnectInfo.GetCell(nRowIdx, nColIdx)->SetBackClr(nConnColor);
|
m_ctrlConnectInfo.GetCell(nRowIdx, nColIdx)->SetText(_T("Connect"));
|
}
|
else
|
{
|
m_ctrlConnectInfo.GetCell(nRowIdx, nColIdx)->SetBackClr(nDisconnColor);
|
m_ctrlConnectInfo.GetCell(nRowIdx, nColIdx)->SetText(_T("Disconnect"));
|
}
|
nRowIdx++;
|
|
// Review Revolver
|
if (m_pConnectionStatus->m_vecReviewRevolverStatus.size()>=1 && m_pConnectionStatus->m_vecReviewRevolverStatus[0])
|
{
|
m_ctrlConnectInfo.GetCell(nRowIdx, nColIdx)->SetBackClr(nConnColor);
|
m_ctrlConnectInfo.GetCell(nRowIdx, nColIdx)->SetText(_T("Connect"));
|
}
|
else
|
{
|
m_ctrlConnectInfo.GetCell(nRowIdx, nColIdx)->SetBackClr(nDisconnColor);
|
m_ctrlConnectInfo.GetCell(nRowIdx, nColIdx)->SetText(_T("Disconnect"));
|
}
|
nRowIdx++;
|
|
// Align Camera 1
|
if (m_pConnectionStatus->m_vecAlignCameraStatus.size()>=1 && m_pConnectionStatus->m_vecAlignCameraStatus[0])
|
{
|
m_ctrlConnectInfo.GetCell(nRowIdx, nColIdx)->SetBackClr(nConnColor);
|
m_ctrlConnectInfo.GetCell(nRowIdx, nColIdx)->SetText(_T("Connect"));
|
}
|
else
|
{
|
m_ctrlConnectInfo.GetCell(nRowIdx, nColIdx)->SetBackClr(nDisconnColor);
|
m_ctrlConnectInfo.GetCell(nRowIdx, nColIdx)->SetText(_T("Disconnect"));
|
}
|
nRowIdx++;
|
|
// Align Camera 2
|
if (m_pConnectionStatus->m_vecAlignCameraStatus.size()>=2 && m_pConnectionStatus->m_vecAlignCameraStatus[1])
|
{
|
m_ctrlConnectInfo.GetCell(nRowIdx, nColIdx)->SetBackClr(nConnColor);
|
m_ctrlConnectInfo.GetCell(nRowIdx, nColIdx)->SetText(_T("Connect"));
|
}
|
else
|
{
|
m_ctrlConnectInfo.GetCell(nRowIdx, nColIdx)->SetBackClr(nDisconnColor);
|
m_ctrlConnectInfo.GetCell(nRowIdx, nColIdx)->SetText(_T("Disconnect"));
|
}
|
nRowIdx++;
|
|
// Align Light
|
if (m_pConnectionStatus->m_vecAlignLightStatus.size()>=1 && m_pConnectionStatus->m_vecAlignLightStatus[0])
|
{
|
m_ctrlConnectInfo.GetCell(nRowIdx, nColIdx)->SetBackClr(nConnColor);
|
m_ctrlConnectInfo.GetCell(nRowIdx, nColIdx)->SetText(_T("Connect"));
|
}
|
else
|
{
|
m_ctrlConnectInfo.GetCell(nRowIdx, nColIdx)->SetBackClr(nDisconnColor);
|
m_ctrlConnectInfo.GetCell(nRowIdx, nColIdx)->SetText(_T("Disconnect"));
|
}
|
nRowIdx++;
|
|
return 0;
|
}
|
|
BOOL CDlgGlassAndConnectionInfo::SetLineType(int nType)
|
{
|
m_nLineType = nType;
|
return TRUE;
|
}
|
|
BOOL CDlgGlassAndConnectionInfo::OnEraseBkgnd(CDC* pDC)
|
{
|
// TODO: 여기에 메시지 처리기 코드를 추가 및/또는 기본값을 호출합니다.
|
CRect rect;
|
GetClientRect(&rect);
|
__super::OnEraseBkgnd(pDC);
|
pDC->FillSolidRect(rect, RGB(38,38,38) );
|
|
return TRUE;
|
}
|
|
|
HBRUSH CDlgGlassAndConnectionInfo::OnCtlColor(CDC* pDC, CWnd* pWnd, UINT nCtlColor)
|
{
|
HBRUSH hbr = __super::OnCtlColor(pDC, pWnd, nCtlColor);
|
|
CRect rect;
|
CString strClass = _T("");
|
UINT nID = pWnd->GetDlgCtrlID();
|
|
if(nCtlColor == CTLCOLOR_STATIC)
|
{
|
pDC->SetTextColor(RGB(255,255,255));
|
pDC->SetBkColor(RGB(38,38,38));
|
hbr = (HBRUSH)GetStockObject(NULL_BRUSH);
|
}
|
|
|
// TODO: 기본값이 적당하지 않으면 다른 브러시를 반환합니다.
|
return hbr;
|
|
}
|