// DlgAFMInfo.cpp : 구현 파일입니다.
|
//
|
|
#include "stdafx.h"
|
#include "ReviewSystem.h"
|
#include "DlgAFMInfo.h"
|
#include "afxdialogex.h"
|
|
#include "CHReviewSetting/SystemInfo.h"
|
|
|
// CDlgAFMInfo 대화 상자입니다.
|
|
IMPLEMENT_DYNAMIC(CDlgAFMInfo, CDialog)
|
|
CDlgAFMInfo::CDlgAFMInfo(CWnd* pParent /*=NULL*/)
|
: CDialog(CDlgAFMInfo::IDD, pParent)
|
{
|
m_pSignalIOStatus = NULL;
|
m_nMachineType = -1;
|
}
|
|
CDlgAFMInfo::~CDlgAFMInfo()
|
{
|
}
|
|
void CDlgAFMInfo::DoDataExchange(CDataExchange* pDX)
|
{
|
CDialog::DoDataExchange(pDX);
|
DDX_Control(pDX, IDC_GRID_AFM_INFO, m_ctrlAFMInfo);
|
}
|
|
|
BEGIN_MESSAGE_MAP(CDlgAFMInfo, CDialog)
|
ON_BN_CLICKED(IDOK, &CDlgAFMInfo::OnBnClickedOk)
|
ON_BN_CLICKED(IDCANCEL, &CDlgAFMInfo::OnBnClickedCancel)
|
ON_MESSAGE(UM_SIGNAL_IO_SIGNAL_UPDATE, &CDlgAFMInfo::OnPCControlIOSignalUpdate)
|
END_MESSAGE_MAP()
|
|
|
// CDlgAFMInfo 메시지 처리기입니다.
|
|
void CDlgAFMInfo::OnBnClickedOk()
|
{
|
// TODO: 여기에 컨트롤 알림 처리기 코드를 추가합니다.
|
// OnOK();
|
}
|
|
void CDlgAFMInfo::OnBnClickedCancel()
|
{
|
// TODO: 여기에 컨트롤 알림 처리기 코드를 추가합니다.
|
// OnCancel();
|
}
|
|
void CDlgAFMInfo::InitGridAFMInfo()
|
{
|
enum { AFM_INFO_GRID_ROW_COUNT = 16, AFM_INFO_GRID_COL_COUNT = 4 };
|
|
int nRowIdx, nColIdx, nRows, nCols, nFixRows, nFixCols, nWidth, nFixWidth;
|
CString strTemp;
|
CRect rt;
|
|
nRows = AFM_INFO_GRID_ROW_COUNT;
|
nCols = AFM_INFO_GRID_COL_COUNT;
|
nFixRows = 1;
|
nFixCols = 1;
|
nRowIdx = 0;
|
nColIdx = 0;
|
|
m_ctrlAFMInfo.GetClientRect(&rt);
|
// m_ctrlGridAFMStateInfo.GetDefaultCell(FALSE, FALSE)->SetBackClr(RGB(0xFF, 0xFF, 0xFF));
|
|
m_ctrlAFMInfo.GetDefaultCell(TRUE, FALSE)->SetBackClr(RGB(248, 218, 169));
|
m_ctrlAFMInfo.GetDefaultCell(FALSE, TRUE)->SetBackClr(RGB(248, 218, 169));
|
m_ctrlAFMInfo.GetDefaultCell(FALSE, FALSE)->SetBackClr(RGB(255, 255, 255));
|
|
m_ctrlAFMInfo.SetRowCount(nRows);
|
m_ctrlAFMInfo.SetColumnCount(nCols);
|
m_ctrlAFMInfo.SetFixedRowCount(0);
|
m_ctrlAFMInfo.SetFixedColumnCount(0);
|
m_ctrlAFMInfo.SetEditable(FALSE);
|
m_ctrlAFMInfo.SetSelectedRange(0, 0, 0, 0, FALSE, FALSE);
|
nFixWidth = 90;
|
nWidth = (rt.Width() - (nFixWidth*2)) / (AFM_INFO_GRID_COL_COUNT - 2);
|
nWidth -= 2;
|
|
GV_ITEM Item;
|
|
//col
|
Item.mask = GVIF_TEXT;
|
Item.row = nRowIdx;
|
Item.col = nColIdx;
|
strTemp.Format(_T("Item"));
|
Item.strText = strTemp;
|
m_ctrlAFMInfo.SetColumnWidth(nColIdx++, nFixWidth);
|
m_ctrlAFMInfo.SetItem(&Item);
|
m_ctrlAFMInfo.SetItemBkColour(Item.row, Item.col, RGB(248, 218, 169));
|
|
Item.col = nColIdx;
|
strTemp.Format(_T("In"));
|
Item.strText = strTemp;
|
m_ctrlAFMInfo.SetColumnWidth(nColIdx++, nWidth);
|
m_ctrlAFMInfo.SetItem(&Item);
|
m_ctrlAFMInfo.SetItemBkColour(Item.row, Item.col, RGB(248, 218, 169));
|
|
Item.col = nColIdx;
|
strTemp.Format(_T("Item"));
|
Item.strText = strTemp;
|
m_ctrlAFMInfo.SetColumnWidth(nColIdx++, nFixWidth);
|
m_ctrlAFMInfo.SetItem(&Item);
|
m_ctrlAFMInfo.SetItemBkColour(Item.row, Item.col, RGB(248, 218, 169));
|
|
Item.col = nColIdx;
|
strTemp.Format(_T("Ou"));
|
Item.strText = strTemp;
|
m_ctrlAFMInfo.SetColumnWidth(nColIdx++, nWidth);
|
m_ctrlAFMInfo.SetItem(&Item);
|
m_ctrlAFMInfo.SetItemBkColour(Item.row, Item.col, RGB(248, 218, 169));
|
|
//row
|
nRowIdx = 1;
|
nColIdx = 0;
|
Item.row = nRowIdx++;
|
Item.col = nColIdx;
|
strTemp.Format(_T("Servo On"));
|
Item.strText = strTemp;
|
m_ctrlAFMInfo.SetItem(&Item);
|
m_ctrlAFMInfo.SetItemBkColour(Item.row, Item.col, RGB(248, 218, 169));
|
|
Item.row = nRowIdx++;
|
strTemp.Format(_T("Alarm"));
|
Item.strText = strTemp;
|
m_ctrlAFMInfo.SetItem(&Item);
|
m_ctrlAFMInfo.SetItemBkColour(Item.row, Item.col, RGB(248, 218, 169));
|
|
Item.row = nRowIdx++;
|
strTemp.Format(_T("In Motion"));
|
Item.strText = strTemp;
|
m_ctrlAFMInfo.SetItem(&Item);
|
m_ctrlAFMInfo.SetItemBkColour(Item.row, Item.col, RGB(248, 218, 169));
|
|
Item.row = nRowIdx++;
|
strTemp.Format(_T("In Position"));
|
Item.strText = strTemp;
|
m_ctrlAFMInfo.SetItem(&Item);
|
m_ctrlAFMInfo.SetItemBkColour(Item.row, Item.col, RGB(248, 218, 169));
|
|
Item.row = nRowIdx++;
|
strTemp.Format(_T("Home"));
|
Item.strText = strTemp;
|
m_ctrlAFMInfo.SetItem(&Item);
|
m_ctrlAFMInfo.SetItemBkColour(Item.row, Item.col, RGB(248, 218, 169));
|
|
Item.row = nRowIdx++;
|
strTemp.Format(_T("+ Limit"));
|
Item.strText = strTemp;
|
m_ctrlAFMInfo.SetItem(&Item);
|
m_ctrlAFMInfo.SetItemBkColour(Item.row, Item.col, RGB(248, 218, 169));
|
|
Item.row = nRowIdx++;
|
strTemp.Format(_T("- Limit"));
|
Item.strText = strTemp;
|
m_ctrlAFMInfo.SetItem(&Item);
|
m_ctrlAFMInfo.SetItemBkColour(Item.row, Item.col, RGB(248, 218, 169));
|
|
Item.row = nRowIdx++;
|
strTemp.Format(_T("AF Enable"));
|
Item.strText = strTemp;
|
m_ctrlAFMInfo.SetItem(&Item);
|
m_ctrlAFMInfo.SetItemBkColour(Item.row, Item.col, RGB(248, 218, 169));
|
|
Item.row = nRowIdx++;
|
strTemp.Format(_T("Motion End"));
|
Item.strText = strTemp;
|
m_ctrlAFMInfo.SetItem(&Item);
|
m_ctrlAFMInfo.SetItemBkColour(Item.row, Item.col, RGB(248, 218, 169));
|
|
|
//row2
|
nRowIdx = 1;
|
nColIdx = 2;
|
Item.row = nRowIdx++;
|
Item.col = nColIdx;
|
strTemp.Format(_T("Mag #1"));
|
Item.strText = strTemp;
|
m_ctrlAFMInfo.SetItem(&Item);
|
m_ctrlAFMInfo.SetItemBkColour(Item.row, Item.col, RGB(248, 218, 169));
|
|
Item.row = nRowIdx++;
|
strTemp.Format(_T("Mag #2"));
|
Item.strText = strTemp;
|
m_ctrlAFMInfo.SetItem(&Item);
|
m_ctrlAFMInfo.SetItemBkColour(Item.row, Item.col, RGB(248, 218, 169));
|
|
Item.row = nRowIdx++;
|
strTemp.Format(_T("Speed #1"));
|
Item.strText = strTemp;
|
m_ctrlAFMInfo.SetItem(&Item);
|
m_ctrlAFMInfo.SetItemBkColour(Item.row, Item.col, RGB(248, 218, 169));
|
|
Item.row = nRowIdx++;
|
strTemp.Format(_T("Speed #2"));
|
Item.strText = strTemp;
|
m_ctrlAFMInfo.SetItem(&Item);
|
m_ctrlAFMInfo.SetItemBkColour(Item.row, Item.col, RGB(248, 218, 169));
|
|
Item.row = nRowIdx++;
|
strTemp.Format(_T("Home"));
|
Item.strText = strTemp;
|
m_ctrlAFMInfo.SetItem(&Item);
|
m_ctrlAFMInfo.SetItemBkColour(Item.row, Item.col, RGB(248, 218, 169));
|
|
Item.row = nRowIdx++;
|
strTemp.Format(_T("+ Jog"));
|
Item.strText = strTemp;
|
m_ctrlAFMInfo.SetItem(&Item);
|
m_ctrlAFMInfo.SetItemBkColour(Item.row, Item.col, RGB(248, 218, 169));
|
|
Item.row = nRowIdx++;
|
strTemp.Format(_T("- Jog"));
|
Item.strText = strTemp;
|
m_ctrlAFMInfo.SetItem(&Item);
|
m_ctrlAFMInfo.SetItemBkColour(Item.row, Item.col, RGB(248, 218, 169));
|
|
Item.row = nRowIdx++;
|
strTemp.Format(_T("AF Enable"));
|
Item.strText = strTemp;
|
m_ctrlAFMInfo.SetItem(&Item);
|
m_ctrlAFMInfo.SetItemBkColour(Item.row, Item.col, RGB(248, 218, 169));
|
|
Item.row = nRowIdx++;
|
strTemp.Format(_T("n/a"));
|
Item.strText = strTemp;
|
m_ctrlAFMInfo.SetItem(&Item);
|
m_ctrlAFMInfo.SetItemBkColour(Item.row, Item.col, RGB(248, 218, 169));
|
}
|
|
|
void CDlgAFMInfo::InitGridPCControlInfo()
|
{
|
enum { PCControl_INFO_GRID_ROW_COUNT = 22, PCControl_INFO_GRID_COL_COUNT = 4 };
|
|
int nRowIdx, nColIdx, nRows, nCols, nFixRows, nFixCols, nWidth, nFixWidth;
|
CString strTemp;
|
CRect rt;
|
|
nRows = PCControl_INFO_GRID_ROW_COUNT;
|
nCols = PCControl_INFO_GRID_COL_COUNT;
|
nFixRows = 1;
|
nFixCols = 1;
|
nRowIdx = 0;
|
nColIdx = 0;
|
|
m_ctrlAFMInfo.GetClientRect(&rt);
|
// m_ctrlGridAFMStateInfo.GetDefaultCell(FALSE, FALSE)->SetBackClr(RGB(0xFF, 0xFF, 0xFF));
|
|
m_ctrlAFMInfo.GetDefaultCell(TRUE, FALSE)->SetBackClr(RGB(248, 218, 169));
|
m_ctrlAFMInfo.GetDefaultCell(FALSE, TRUE)->SetBackClr(RGB(248, 218, 169));
|
m_ctrlAFMInfo.GetDefaultCell(FALSE, FALSE)->SetBackClr(RGB(255, 255, 255));
|
|
m_ctrlAFMInfo.SetRowCount(nRows);
|
m_ctrlAFMInfo.SetColumnCount(nCols);
|
m_ctrlAFMInfo.SetFixedRowCount(0);
|
m_ctrlAFMInfo.SetFixedColumnCount(0);
|
m_ctrlAFMInfo.SetEditable(FALSE);
|
m_ctrlAFMInfo.SetSelectedRange(0, 0, 0, 0, FALSE, FALSE);
|
nFixWidth = 90;
|
nWidth = (rt.Width() - (nFixWidth*2)) / (PCControl_INFO_GRID_COL_COUNT - 2);
|
nWidth -= 8;
|
|
GV_ITEM Item;
|
|
|
if (m_nLineType == SystemLine_CPJT)
|
{
|
|
//col
|
Item.mask = GVIF_TEXT;
|
Item.row = nRowIdx;
|
Item.col = nColIdx;
|
strTemp.Format(_T("BYPASS"));
|
Item.strText = strTemp;
|
m_ctrlAFMInfo.SetColumnWidth(nColIdx++, nFixWidth);
|
m_ctrlAFMInfo.SetItem(&Item);
|
m_ctrlAFMInfo.SetItemBkColour(Item.row, Item.col, RGB(248, 218, 169));
|
|
Item.col = nColIdx;
|
strTemp.Format(_T(""));
|
Item.strText = strTemp;
|
m_ctrlAFMInfo.SetColumnWidth(nColIdx++, nWidth);
|
m_ctrlAFMInfo.SetItem(&Item);
|
m_ctrlAFMInfo.SetItemBkColour(Item.row, Item.col, RGB(255, 255, 255));
|
|
Item.col = nColIdx;
|
strTemp.Format(_T("ReviewAlive"));
|
Item.strText = strTemp;
|
m_ctrlAFMInfo.SetColumnWidth(nColIdx++, nFixWidth);
|
m_ctrlAFMInfo.SetItem(&Item);
|
m_ctrlAFMInfo.SetItemBkColour(Item.row, Item.col, RGB(248, 218, 169));
|
|
Item.col = nColIdx;
|
strTemp.Format(_T(""));
|
Item.strText = strTemp;
|
m_ctrlAFMInfo.SetColumnWidth(nColIdx++, nWidth);
|
m_ctrlAFMInfo.SetItem(&Item);
|
m_ctrlAFMInfo.SetItemBkColour(Item.row, Item.col, RGB(255, 255, 255));
|
|
//row
|
nRowIdx = 1;
|
nColIdx = 0;
|
Item.col = nColIdx;
|
Item.row = nRowIdx++;
|
strTemp.Format(_T("Auto"));
|
Item.strText = strTemp;
|
m_ctrlAFMInfo.SetItem(&Item);
|
m_ctrlAFMInfo.SetItemBkColour(Item.row, Item.col, RGB(248, 218, 169));
|
|
Item.row = nRowIdx++;
|
strTemp.Format(_T("Manual"));
|
Item.strText = strTemp;
|
m_ctrlAFMInfo.SetItem(&Item);
|
m_ctrlAFMInfo.SetItemBkColour(Item.row, Item.col, RGB(248, 218, 169));
|
|
Item.row = nRowIdx++;
|
strTemp.Format(_T("ReviewManual"));
|
Item.strText = strTemp;
|
m_ctrlAFMInfo.SetItem(&Item);
|
m_ctrlAFMInfo.SetItemBkColour(Item.row, Item.col, RGB(248, 218, 169));
|
|
Item.row = nRowIdx++;
|
strTemp.Format(_T("AutoRecipe"));
|
Item.strText = strTemp;
|
m_ctrlAFMInfo.SetItem(&Item);
|
m_ctrlAFMInfo.SetItemBkColour(Item.row, Item.col, RGB(248, 218, 169));
|
|
Item.row = nRowIdx++;
|
strTemp.Format(_T("Loading"));
|
Item.strText = strTemp;
|
m_ctrlAFMInfo.SetItem(&Item);
|
m_ctrlAFMInfo.SetItemBkColour(Item.row, Item.col, RGB(248, 218, 169));
|
|
Item.row = nRowIdx++;
|
strTemp.Format(_T("AlignStart"));
|
Item.strText = strTemp;
|
m_ctrlAFMInfo.SetItem(&Item);
|
m_ctrlAFMInfo.SetItemBkColour(Item.row, Item.col, RGB(248, 218, 169));
|
|
Item.row = nRowIdx++;
|
strTemp.Format(_T("AlignEnd"));
|
Item.strText = strTemp;
|
m_ctrlAFMInfo.SetItem(&Item);
|
m_ctrlAFMInfo.SetItemBkColour(Item.row, Item.col, RGB(248, 218, 169));
|
|
Item.row = nRowIdx++;
|
strTemp.Format(_T("AlignCompleteAck"));
|
Item.strText = strTemp;
|
m_ctrlAFMInfo.SetItem(&Item);
|
m_ctrlAFMInfo.SetItemBkColour(Item.row, Item.col, RGB(248, 218, 169));
|
|
Item.row = nRowIdx++;
|
strTemp.Format(_T("ReviewStart"));
|
Item.strText = strTemp;
|
m_ctrlAFMInfo.SetItem(&Item);
|
m_ctrlAFMInfo.SetItemBkColour(Item.row, Item.col, RGB(248, 218, 169));
|
|
Item.row = nRowIdx++;
|
strTemp.Format(_T("ReviewEnd"));
|
Item.strText = strTemp;
|
m_ctrlAFMInfo.SetItem(&Item);
|
m_ctrlAFMInfo.SetItemBkColour(Item.row, Item.col, RGB(248, 218, 169));
|
|
Item.row = nRowIdx++;
|
strTemp.Format(_T("ReviewCompleteAck"));
|
Item.strText = strTemp;
|
m_ctrlAFMInfo.SetItem(&Item);
|
m_ctrlAFMInfo.SetItemBkColour(Item.row, Item.col, RGB(248, 218, 169));
|
|
Item.row = nRowIdx++;
|
strTemp.Format(_T("Unloading"));
|
Item.strText = strTemp;
|
m_ctrlAFMInfo.SetItem(&Item);
|
m_ctrlAFMInfo.SetItemBkColour(Item.row, Item.col, RGB(248, 218, 169));
|
|
switch (m_nLineType)
|
{
|
case SystemLine_CPJT:
|
{
|
Item.row = nRowIdx++;
|
strTemp.Format(_T(""));
|
Item.strText = strTemp;
|
m_ctrlAFMInfo.SetItem(&Item);
|
m_ctrlAFMInfo.SetItemBkColour(Item.row, Item.col, RGB(248, 218, 169));
|
|
Item.row = nRowIdx++;
|
strTemp.Format(_T(""));
|
Item.strText = strTemp;
|
m_ctrlAFMInfo.SetItem(&Item);
|
m_ctrlAFMInfo.SetItemBkColour(Item.row, Item.col, RGB(248, 218, 169));
|
|
Item.row = nRowIdx++;
|
strTemp.Format(_T(""));
|
Item.strText = strTemp;
|
m_ctrlAFMInfo.SetItem(&Item);
|
m_ctrlAFMInfo.SetItemBkColour(Item.row, Item.col, RGB(248, 218, 169));
|
|
Item.row = nRowIdx++;
|
strTemp.Format(_T(""));
|
Item.strText = strTemp;
|
m_ctrlAFMInfo.SetItem(&Item);
|
m_ctrlAFMInfo.SetItemBkColour(Item.row, Item.col, RGB(248, 218, 169));
|
|
Item.row = nRowIdx++;
|
strTemp.Format(_T(""));
|
Item.strText = strTemp;
|
m_ctrlAFMInfo.SetItem(&Item);
|
m_ctrlAFMInfo.SetItemBkColour(Item.row, Item.col, RGB(248, 218, 169));
|
|
Item.row = nRowIdx++;
|
strTemp.Format(_T(""));
|
Item.strText = strTemp;
|
m_ctrlAFMInfo.SetItem(&Item);
|
m_ctrlAFMInfo.SetItemBkColour(Item.row, Item.col, RGB(248, 218, 169));
|
|
Item.row = nRowIdx++;
|
strTemp.Format(_T(""));
|
Item.strText = strTemp;
|
m_ctrlAFMInfo.SetItem(&Item);
|
m_ctrlAFMInfo.SetItemBkColour(Item.row, Item.col, RGB(248, 218, 169));
|
|
Item.row = nRowIdx++;
|
strTemp.Format(_T(""));
|
Item.strText = strTemp;
|
m_ctrlAFMInfo.SetItem(&Item);
|
m_ctrlAFMInfo.SetItemBkColour(Item.row, Item.col, RGB(248, 218, 169));
|
}
|
break;
|
|
default:
|
{
|
Item.row = nRowIdx++;
|
strTemp.Format(_T(""));
|
Item.strText = strTemp;
|
m_ctrlAFMInfo.SetItem(&Item);
|
m_ctrlAFMInfo.SetItemBkColour(Item.row, Item.col, RGB(248, 218, 169));
|
|
Item.row = nRowIdx++;
|
strTemp.Format(_T(""));
|
Item.strText = strTemp;
|
m_ctrlAFMInfo.SetItem(&Item);
|
m_ctrlAFMInfo.SetItemBkColour(Item.row, Item.col, RGB(248, 218, 169));
|
|
Item.row = nRowIdx++;
|
strTemp.Format(_T(""));
|
Item.strText = strTemp;
|
m_ctrlAFMInfo.SetItem(&Item);
|
m_ctrlAFMInfo.SetItemBkColour(Item.row, Item.col, RGB(248, 218, 169));
|
|
Item.row = nRowIdx++;
|
strTemp.Format(_T(""));
|
Item.strText = strTemp;
|
m_ctrlAFMInfo.SetItem(&Item);
|
m_ctrlAFMInfo.SetItemBkColour(Item.row, Item.col, RGB(248, 218, 169));
|
|
Item.row = nRowIdx++;
|
strTemp.Format(_T(""));
|
Item.strText = strTemp;
|
m_ctrlAFMInfo.SetItem(&Item);
|
m_ctrlAFMInfo.SetItemBkColour(Item.row, Item.col, RGB(248, 218, 169));
|
|
Item.row = nRowIdx++;
|
strTemp.Format(_T(""));
|
Item.strText = strTemp;
|
m_ctrlAFMInfo.SetItem(&Item);
|
m_ctrlAFMInfo.SetItemBkColour(Item.row, Item.col, RGB(248, 218, 169));
|
|
Item.row = nRowIdx++;
|
strTemp.Format(_T(""));
|
Item.strText = strTemp;
|
m_ctrlAFMInfo.SetItem(&Item);
|
m_ctrlAFMInfo.SetItemBkColour(Item.row, Item.col, RGB(248, 218, 169));
|
|
Item.row = nRowIdx++;
|
strTemp.Format(_T(""));
|
Item.strText = strTemp;
|
m_ctrlAFMInfo.SetItem(&Item);
|
m_ctrlAFMInfo.SetItemBkColour(Item.row, Item.col, RGB(248, 218, 169));
|
}
|
break;
|
}
|
|
//row2
|
nRowIdx = 1;
|
nColIdx = 2;
|
|
Item.row = nRowIdx++;
|
Item.col = nColIdx;
|
strTemp.Format(_T("LoadSuccess"));
|
Item.strText = strTemp;
|
m_ctrlAFMInfo.SetItem(&Item);
|
m_ctrlAFMInfo.SetItemBkColour(Item.row, Item.col, RGB(248, 218, 169));
|
|
Item.row = nRowIdx++;
|
strTemp.Format(_T("LoadFail"));
|
Item.strText = strTemp;
|
m_ctrlAFMInfo.SetItem(&Item);
|
m_ctrlAFMInfo.SetItemBkColour(Item.row, Item.col, RGB(248, 218, 169));
|
|
Item.row = nRowIdx++;
|
strTemp.Format(_T("AlignStartAck"));
|
Item.strText = strTemp;
|
m_ctrlAFMInfo.SetItem(&Item);
|
m_ctrlAFMInfo.SetItemBkColour(Item.row, Item.col, RGB(248, 218, 169));
|
|
Item.row = nRowIdx++;
|
strTemp.Format(_T("AlignEndAck"));
|
Item.strText = strTemp;
|
m_ctrlAFMInfo.SetItem(&Item);
|
m_ctrlAFMInfo.SetItemBkColour(Item.row, Item.col, RGB(248, 218, 169));
|
|
Item.row = nRowIdx++;
|
strTemp.Format(_T("AlignSuccess"));
|
Item.strText = strTemp;
|
m_ctrlAFMInfo.SetItem(&Item);
|
m_ctrlAFMInfo.SetItemBkColour(Item.row, Item.col, RGB(248, 218, 169));
|
|
Item.row = nRowIdx++;
|
strTemp.Format(_T("AlignFail"));
|
Item.strText = strTemp;
|
m_ctrlAFMInfo.SetItem(&Item);
|
m_ctrlAFMInfo.SetItemBkColour(Item.row, Item.col, RGB(248, 218, 169));
|
|
Item.row = nRowIdx++;
|
strTemp.Format(_T("ReviewStartAck"));
|
Item.strText = strTemp;
|
m_ctrlAFMInfo.SetItem(&Item);
|
m_ctrlAFMInfo.SetItemBkColour(Item.row, Item.col, RGB(248, 218, 169));
|
|
Item.row = nRowIdx++;
|
strTemp.Format(_T("ReviewEndAck"));
|
Item.strText = strTemp;
|
m_ctrlAFMInfo.SetItem(&Item);
|
m_ctrlAFMInfo.SetItemBkColour(Item.row, Item.col, RGB(248, 218, 169));
|
|
Item.row = nRowIdx++;
|
strTemp.Format(_T("ReviewSuccess"));
|
Item.strText = strTemp;
|
m_ctrlAFMInfo.SetItem(&Item);
|
m_ctrlAFMInfo.SetItemBkColour(Item.row, Item.col, RGB(248, 218, 169));
|
|
Item.row = nRowIdx++;
|
strTemp.Format(_T("ReviewFail"));
|
Item.strText = strTemp;
|
m_ctrlAFMInfo.SetItem(&Item);
|
m_ctrlAFMInfo.SetItemBkColour(Item.row, Item.col, RGB(248, 218, 169));
|
|
Item.row = nRowIdx++;
|
strTemp.Format(_T("Light_Error"));
|
Item.strText = strTemp;
|
m_ctrlAFMInfo.SetItem(&Item);
|
m_ctrlAFMInfo.SetItemBkColour(Item.row, Item.col, RGB(248, 218, 169));
|
|
Item.row = nRowIdx++;
|
strTemp.Format(_T("A/F_Error"));
|
Item.strText = strTemp;
|
m_ctrlAFMInfo.SetItem(&Item);
|
m_ctrlAFMInfo.SetItemBkColour(Item.row, Item.col, RGB(248, 218, 169));
|
|
switch (m_nMachineType)
|
{
|
case SystemMachine_CPJT_QD:
|
case SystemMachine_CPJT_RGB:
|
case SystemMachine_CPJT_BANK:
|
case SystemMachine_CPJT_OC:
|
case SystemMachine_CPJT_BDI:
|
case SystemMachine_CPJT_CS:
|
{
|
Item.row = nRowIdx++;
|
strTemp.Format(_T(""));
|
Item.strText = strTemp;
|
m_ctrlAFMInfo.SetItem(&Item);
|
m_ctrlAFMInfo.SetItemBkColour(Item.row, Item.col, RGB(248, 218, 169));
|
|
Item.row = nRowIdx++;
|
strTemp.Format(_T(""));
|
Item.strText = strTemp;
|
m_ctrlAFMInfo.SetItem(&Item);
|
m_ctrlAFMInfo.SetItemBkColour(Item.row, Item.col, RGB(248, 218, 169));
|
|
Item.row = nRowIdx++;
|
strTemp.Format(_T(""));
|
Item.strText = strTemp;
|
m_ctrlAFMInfo.SetItem(&Item);
|
m_ctrlAFMInfo.SetItemBkColour(Item.row, Item.col, RGB(248, 218, 169));
|
|
Item.row = nRowIdx++;
|
strTemp.Format(_T(""));
|
Item.strText = strTemp;
|
m_ctrlAFMInfo.SetItem(&Item);
|
m_ctrlAFMInfo.SetItemBkColour(Item.row, Item.col, RGB(248, 218, 169));
|
|
Item.row = nRowIdx++;
|
strTemp.Format(_T(""));
|
Item.strText = strTemp;
|
m_ctrlAFMInfo.SetItem(&Item);
|
m_ctrlAFMInfo.SetItemBkColour(Item.row, Item.col, RGB(248, 218, 169));
|
|
Item.row = nRowIdx++;
|
strTemp.Format(_T(""));
|
Item.strText = strTemp;
|
m_ctrlAFMInfo.SetItem(&Item);
|
m_ctrlAFMInfo.SetItemBkColour(Item.row, Item.col, RGB(248, 218, 169));
|
|
Item.row = nRowIdx++;
|
strTemp.Format(_T(""));
|
Item.strText = strTemp;
|
m_ctrlAFMInfo.SetItem(&Item);
|
m_ctrlAFMInfo.SetItemBkColour(Item.row, Item.col, RGB(248, 218, 169));
|
|
Item.row = nRowIdx++;
|
strTemp.Format(_T(""));
|
Item.strText = strTemp;
|
m_ctrlAFMInfo.SetItem(&Item);
|
m_ctrlAFMInfo.SetItemBkColour(Item.row, Item.col, RGB(248, 218, 169));
|
|
Item.row = nRowIdx++;
|
strTemp.Format(_T(""));
|
Item.strText = strTemp;
|
m_ctrlAFMInfo.SetItem(&Item);
|
m_ctrlAFMInfo.SetItemBkColour(Item.row, Item.col, RGB(248, 218, 169));
|
}
|
break;
|
}
|
}
|
else
|
{
|
|
//col
|
Item.mask = GVIF_TEXT;
|
Item.row = nRowIdx;
|
Item.col = nColIdx;
|
strTemp.Format(_T("BYPASS"));
|
Item.strText = strTemp;
|
m_ctrlAFMInfo.SetColumnWidth(nColIdx++, nFixWidth);
|
m_ctrlAFMInfo.SetItem(&Item);
|
m_ctrlAFMInfo.SetItemBkColour(Item.row, Item.col, RGB(248, 218, 169));
|
|
Item.col = nColIdx;
|
strTemp.Format(_T(""));
|
Item.strText = strTemp;
|
m_ctrlAFMInfo.SetColumnWidth(nColIdx++, nWidth);
|
m_ctrlAFMInfo.SetItem(&Item);
|
m_ctrlAFMInfo.SetItemBkColour(Item.row, Item.col, RGB(255, 255, 255));
|
|
Item.col = nColIdx;
|
strTemp.Format(_T("LoadSuccess"));
|
Item.strText = strTemp;
|
m_ctrlAFMInfo.SetColumnWidth(nColIdx++, nFixWidth);
|
m_ctrlAFMInfo.SetItem(&Item);
|
m_ctrlAFMInfo.SetItemBkColour(Item.row, Item.col, RGB(248, 218, 169));
|
|
Item.col = nColIdx;
|
strTemp.Format(_T(""));
|
Item.strText = strTemp;
|
m_ctrlAFMInfo.SetColumnWidth(nColIdx++, nWidth);
|
m_ctrlAFMInfo.SetItem(&Item);
|
m_ctrlAFMInfo.SetItemBkColour(Item.row, Item.col, RGB(255, 255, 255));
|
|
//row
|
nRowIdx = 1;
|
nColIdx = 0;
|
Item.col = nColIdx;
|
Item.row = nRowIdx++;
|
strTemp.Format(_T("AUTO"));
|
Item.strText = strTemp;
|
m_ctrlAFMInfo.SetItem(&Item);
|
m_ctrlAFMInfo.SetItemBkColour(Item.row, Item.col, RGB(248, 218, 169));
|
|
Item.row = nRowIdx++;
|
strTemp.Format(_T("MANUAL"));
|
Item.strText = strTemp;
|
m_ctrlAFMInfo.SetItem(&Item);
|
m_ctrlAFMInfo.SetItemBkColour(Item.row, Item.col, RGB(248, 218, 169));
|
|
Item.row = nRowIdx++;
|
strTemp.Format(_T("REVIEW"));
|
Item.strText = strTemp;
|
m_ctrlAFMInfo.SetItem(&Item);
|
m_ctrlAFMInfo.SetItemBkColour(Item.row, Item.col, RGB(248, 218, 169));
|
|
Item.row = nRowIdx++;
|
strTemp.Format(_T("Loading"));
|
Item.strText = strTemp;
|
m_ctrlAFMInfo.SetItem(&Item);
|
m_ctrlAFMInfo.SetItemBkColour(Item.row, Item.col, RGB(248, 218, 169));
|
|
Item.row = nRowIdx++;
|
strTemp.Format(_T("AlignStart"));
|
Item.strText = strTemp;
|
m_ctrlAFMInfo.SetItem(&Item);
|
m_ctrlAFMInfo.SetItemBkColour(Item.row, Item.col, RGB(248, 218, 169));
|
|
Item.row = nRowIdx++;
|
strTemp.Format(_T("AlignEnd"));
|
Item.strText = strTemp;
|
m_ctrlAFMInfo.SetItem(&Item);
|
m_ctrlAFMInfo.SetItemBkColour(Item.row, Item.col, RGB(248, 218, 169));
|
|
Item.row = nRowIdx++;
|
strTemp.Format(_T(""));
|
Item.strText = strTemp;
|
m_ctrlAFMInfo.SetItem(&Item);
|
m_ctrlAFMInfo.SetItemBkColour(Item.row, Item.col, RGB(248, 218, 169));
|
|
Item.row = nRowIdx++;
|
strTemp.Format(_T(""));
|
Item.strText = strTemp;
|
m_ctrlAFMInfo.SetItem(&Item);
|
m_ctrlAFMInfo.SetItemBkColour(Item.row, Item.col, RGB(248, 218, 169));
|
|
Item.row = nRowIdx++;
|
strTemp.Format(_T(""));
|
Item.strText = strTemp;
|
m_ctrlAFMInfo.SetItem(&Item);
|
m_ctrlAFMInfo.SetItemBkColour(Item.row, Item.col, RGB(248, 218, 169));
|
|
Item.row = nRowIdx++;
|
strTemp.Format(_T(""));
|
Item.strText = strTemp;
|
m_ctrlAFMInfo.SetItem(&Item);
|
m_ctrlAFMInfo.SetItemBkColour(Item.row, Item.col, RGB(248, 218, 169));
|
|
//row2
|
nRowIdx = 1;
|
nColIdx = 2;
|
|
Item.row = nRowIdx++;
|
Item.col = nColIdx;
|
strTemp.Format(_T("LoadFail"));
|
Item.strText = strTemp;
|
m_ctrlAFMInfo.SetItem(&Item);
|
m_ctrlAFMInfo.SetItemBkColour(Item.row, Item.col, RGB(248, 218, 169));
|
|
Item.row = nRowIdx++;
|
strTemp.Format(_T("AlignSuccess"));
|
Item.strText = strTemp;
|
m_ctrlAFMInfo.SetItem(&Item);
|
m_ctrlAFMInfo.SetItemBkColour(Item.row, Item.col, RGB(248, 218, 169));
|
|
Item.row = nRowIdx++;
|
strTemp.Format(_T("AlignFail"));
|
Item.strText = strTemp;
|
m_ctrlAFMInfo.SetItem(&Item);
|
m_ctrlAFMInfo.SetItemBkColour(Item.row, Item.col, RGB(248, 218, 169));
|
|
Item.row = nRowIdx++;
|
strTemp.Format(_T("ReviewSuccess"));
|
Item.strText = strTemp;
|
m_ctrlAFMInfo.SetItem(&Item);
|
m_ctrlAFMInfo.SetItemBkColour(Item.row, Item.col, RGB(248, 218, 169));
|
|
Item.row = nRowIdx++;
|
strTemp.Format(_T("ReviewFail"));
|
Item.strText = strTemp;
|
m_ctrlAFMInfo.SetItem(&Item);
|
m_ctrlAFMInfo.SetItemBkColour(Item.row, Item.col, RGB(248, 218, 169));
|
|
Item.row = nRowIdx++;
|
strTemp.Format(_T("Light_Error"));
|
Item.strText = strTemp;
|
m_ctrlAFMInfo.SetItem(&Item);
|
m_ctrlAFMInfo.SetItemBkColour(Item.row, Item.col, RGB(248, 218, 169));
|
|
Item.row = nRowIdx++;
|
strTemp.Format(_T("A/F_Error"));
|
Item.strText = strTemp;
|
m_ctrlAFMInfo.SetItem(&Item);
|
m_ctrlAFMInfo.SetItemBkColour(Item.row, Item.col, RGB(248, 218, 169));
|
|
Item.row = nRowIdx++;
|
strTemp.Format(_T(""));
|
Item.strText = strTemp;
|
m_ctrlAFMInfo.SetItem(&Item);
|
m_ctrlAFMInfo.SetItemBkColour(Item.row, Item.col, RGB(248, 218, 169));
|
|
Item.row = nRowIdx++;
|
strTemp.Format(_T(""));
|
Item.strText = strTemp;
|
m_ctrlAFMInfo.SetItem(&Item);
|
m_ctrlAFMInfo.SetItemBkColour(Item.row, Item.col, RGB(248, 218, 169));
|
|
Item.row = nRowIdx++;
|
strTemp.Format(_T(""));
|
Item.strText = strTemp;
|
m_ctrlAFMInfo.SetItem(&Item);
|
m_ctrlAFMInfo.SetItemBkColour(Item.row, Item.col, RGB(248, 218, 169));
|
}
|
for(int rowIdx = 0; rowIdx < PCControl_INFO_GRID_ROW_COUNT; rowIdx++)
|
{
|
m_ctrlAFMInfo.SetRowHeight(rowIdx, 21);
|
}
|
}
|
|
LRESULT CDlgAFMInfo::OnPCControlIOSignalUpdate(WPARAM wParam, LPARAM lParam)
|
{
|
if (m_pSignalIOStatus==NULL) return 1;
|
|
COLORREF nOffColor = RGB(255,255,255);
|
COLORREF nOnColor = RGB(255,150,150);
|
|
int nReadIdx = 1;
|
int nWriteIdx = 3;
|
|
for (int i=0; i<m_pSignalIOStatus->GetBitCount(); i++)
|
{
|
// read addr
|
if (m_pSignalIOStatus->GetReadSignal(i))
|
{
|
m_ctrlAFMInfo.GetCell(i, nReadIdx)->SetBackClr(nOnColor);
|
}
|
else
|
{
|
m_ctrlAFMInfo.GetCell(i, nReadIdx)->SetBackClr(nOffColor);
|
}
|
|
// write addr
|
if (m_pSignalIOStatus->GetWriteSignal(i))
|
{
|
m_ctrlAFMInfo.GetCell(i, nWriteIdx)->SetBackClr(nOnColor);
|
}
|
else
|
{
|
m_ctrlAFMInfo.GetCell(i, nWriteIdx)->SetBackClr(nOffColor);
|
}
|
}
|
|
m_ctrlAFMInfo.Invalidate(TRUE);
|
|
return 1;
|
}
|
|
void CDlgAFMInfo::UpdateSignalIOStatus(const SSignalIOStatus* pSignalIOStatus)
|
{
|
if (pSignalIOStatus==NULL) return;
|
|
m_pSignalIOStatus = pSignalIOStatus;
|
|
this->PostMessage(UM_SIGNAL_IO_SIGNAL_UPDATE);
|
}
|
|
BOOL CDlgAFMInfo::OnInitDialog()
|
{
|
CDialog::OnInitDialog();
|
|
//InitGridAFMInfo();
|
InitGridPCControlInfo();
|
|
return TRUE; // return TRUE unless you set the focus to a control
|
// 예외: OCX 속성 페이지는 FALSE를 반환해야 합니다.
|
}
|
|
BOOL CDlgAFMInfo::SetLineType(int nType)
|
{
|
m_nLineType = nType;
|
return TRUE;
|
}
|
|
BOOL CDlgAFMInfo::SetMachineType(int nType)
|
{
|
m_nMachineType = nType;
|
return TRUE;
|
}
|