You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

1053 lines
33 KiB
C++

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

#include "stdafx.h"
#include "DlgDeviceMain.h"
#include "afxdialogex.h"
#include "CommonFlowMgr.h"
#include "LogMgr.h"
#include "AuthorityMgr.h"
#include "DeviceStateMgr.h"
#include "AllThreadMgr.h"
#include "CStringFuc.h"
#include "GlobalFunction.h"
#include "DlgChildLaserPathState.h"
#include "DlgChildWaferHistory.h"
#include "DlgChildSysParaSet.h"
#include "DlgChildPCS.h"
#include "ProgramLaserTuiHuo.h"
#include "DeviceStateMgr.h"
#include "LogMgr.h"
#include "AuthorityMgr.h"
#include "DlgWarningList.h"
#include "WarningMgr.h"
#include "DlgChildRecipe.h"
#include "DlgAuthorityLogin.h"
#include "ProgramLaserTuiHuo.h"
#include "AllThreadMgr.h"
#include "DistanceMeterMgr.h"
#include "LaiPuLaser.h"
#include "MyDlgView.h"
#include "EncryptionMgr.h"
#include "Laser.h"
#include "GlobalDrawMgr.h"
#include "LanguageMgr.h"
#include "CommonFlowMgr.h"
#include "IO_CtrlMgr.h"
#include "DeviceStateMgr.h"
#include "TransferArmMgr.h"
#include "MarkArea.h"
#include "ManualTestMgr.h"
#include "FileMgr.h"
#include "DlgMarkArea.h"
#include "SemiSecsCommMgr.h"
#include "AnnealMonitoringMgr.h"
#include "JobQueueMgr.h"
#include "MeasureBeforeWorkMgr.h"
#include "DlgChildIOState.h"
#include "WorkCmdInvoker.h"
#include "DlgChildWorkPrepare.h"
#include "DlgChildWorkWaferCnt.h"
#include "DlgChildRobot.h"
#include "DlgChildLaserPowCheck.h"
#include "DlgChildDeviceMaintenance.h"
#include "DlgChildEventLog.h"
#include "DlgChildDataAnalysis.h"
#include "DlgLayerViewShow.h"
#include "GlobalDrawMgr.h"
#include "AlignerDyhMgr.h"
#include "MotionCtrl.h"
#include "AnnealMonitoringMgr.h"
#include "DlgSelectRecipe.h"
#include "MsgBox.h"
#include "DlgWorkCmdList.h"
#include "WorkCmdInvoker.h"
#include "DlgSecsModeCtrl.h"
#include "DeviceStateMgr.h"
#include "AllThreadMgr.h"
#include "AlamLightStateMgr.h"
#include "MyTest.h"
#include "ManualTestMgr.h"
#include "WarningMgr.h"
#include "CriticalSection.h"
#define UPDATE_INFO_TIMER 1
#define UPDATE_INFO_TIMER_DELAY 1000
#define SET_DLG_SIZE_TIMER 2
#define SET_DLG_SIZE_TIMER_DELAY 500
#define ID_READ_LASER_DIS_METER_TIMER 3
#define SWITCH_DLG_TIMER 4
#define SWITCH_DLG_TIMER_DELAY 100
#define MAX_MODULE_CHILD_VIEW_CNT 7
#define UPDATE_DATE_TIMER 5
#define UPDATE_DATE_TIMER_DELAY 200
#define ID_UPDATE_PROMPT_TIMER 6
#define UPDATE_PROMPT_TIMER_DELAY 300
#define LAIPU_APP_WNDS_NAME "LaiPuDrawing" //<2F><><EFBFBD>ҵĴ<D2B5><C4B4><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
#define MAX_PROMPT_LIST_ROWS 10 //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʾ<EFBFBD><CABE><EFBFBD><EFBFBD>
HWND gLaipuAppHwnd = 0;
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ھ<EFBFBD><DABE><EFBFBD>,<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ҫ<EFBFBD><D2AA><EFBFBD><EFBFBD><EFBFBD>ô<EFBFBD><C3B4>ڳ<EFBFBD><DAB3><EFBFBD>
BOOL CALLBACK EnumLaipuAppWnds( HWND hwnd, LPARAM lParam )
{
const int size1 = 1024;
char szClass[size1];
if( !GetWindow( hwnd, GW_OWNER ) && IsWindowVisible( hwnd ) ) // <20>˵<EFBFBD><CBB5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʾ<EFBFBD>Ĵ<EFBFBD><C4B4><EFBFBD>
{
GetClassName( hwnd, szClass, size1 );
// <20>˵<EFBFBD><CBB5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>// <20>˵<EFBFBD><CBB5><EFBFBD><EFBFBD><EFBFBD>
if( strcmp( szClass, "Shell_TrayWnd" ) != 0 && strcmp( szClass, "Progman" ) != 0 )
{
if(GetWindowLong(hwnd, GWL_EXSTYLE) & WS_EX_TOOLWINDOW)
{
return true;
}
char szTitle[size1];
GetWindowText( hwnd, szTitle,size1);
CString s(szTitle);
if(s.Find(_T(LAIPU_APP_WNDS_NAME), 0)!=-1)
{
gLaipuAppHwnd = hwnd;
}
}
}
return TRUE;
}
IMPLEMENT_DYNAMIC(CDlgDeviceMain, CMyDlgView)
BEGIN_MESSAGE_MAP(CDlgDeviceMain, CMyDlgView)
ON_WM_TIMER()
ON_BN_CLICKED(CHILD_DEVICE_STATE_BTN, &CDlgDeviceMain::OnBnClickedDeviceStateBtn)
ON_BN_CLICKED(CHILD_PCS_BTN, &CDlgDeviceMain::OnBnClickedPCS)
ON_BN_CLICKED(CHILD_LOGIN_BTN, &CDlgDeviceMain::OnBnClickedLoginBtn)
ON_BN_CLICKED(CHILD_CONFIG_BTN, &CDlgDeviceMain::OnBnClickedConfigBtn)
ON_BN_CLICKED(NEW_WARNING_LIST_BTN, &CDlgDeviceMain::OnBnClickedWarningListBtn)
ON_BN_CLICKED(CHILD_RECIPE_BTN, &CDlgDeviceMain::OnBnClickedRecipeBtn)
ON_BN_CLICKED(NEW_LOGO_BTN, &CDlgDeviceMain::OnBnClickedLogoBtn)
ON_BN_CLICKED(NEW_SYS_INIT_BTN, &CDlgDeviceMain::OnBnClickedSysInitBtn)
ON_BN_CLICKED(IDC_PCS_TEST_BTN, &CDlgDeviceMain::OnBnClickedPcsTestBtn)
ON_BN_CLICKED(NEW_SUB_MODULE_BTN1, &CDlgDeviceMain::OnBnClickedModuleChildViewBtn1)
ON_BN_CLICKED(NEW_SUB_MODULE_BTN2, &CDlgDeviceMain::OnBnClickedModuleChildViewBtn2)
ON_BN_CLICKED(NEW_SUB_MODULE_BTN3, &CDlgDeviceMain::OnBnClickedModuleChildViewBtn3)
ON_BN_CLICKED(NEW_SUB_MODULE_BTN4, &CDlgDeviceMain::OnBnClickedModuleChildViewBtn4)
ON_BN_CLICKED(NEW_SUB_MODULE_BTN5, &CDlgDeviceMain::OnBnClickedModuleChildViewBtn5)
ON_BN_CLICKED(NEW_SUB_MODULE_BTN6, &CDlgDeviceMain::OnBnClickedModuleChildViewBtn6)
ON_BN_CLICKED(NEW_SUB_MODULE_BTN7, &CDlgDeviceMain::OnBnClickedModuleChildViewBtn7)
ON_NOTIFY(NM_CUSTOMDRAW, NEW_PROMPT_MSG_LIST, &CDlgDeviceMain::OnDrawPromptMsgList)
ON_BN_CLICKED(NEW_CLEAR_PROMPT_LIST_BTN, &CDlgDeviceMain::OnBnClickedClearPromptListBtn)
ON_BN_CLICKED(NEW_SECS_CTRL_MODE_DLG__BTN, &CDlgDeviceMain::OnBnClickedSecsCtrlModeDlg)
ON_BN_CLICKED(CHILD_SHOW_WINDOW_MIN_BTN, &CDlgDeviceMain::OnBnClickedShowminimizedBtn)
END_MESSAGE_MAP()
CDlgDeviceMain *gDlgDeviceMain = NULL;
CDlgDeviceMain::CDlgDeviceMain(CWnd* pParent /*=NULL*/)
: CMyDlgView(CDlgDeviceMain::IDD, pParent)
{
m_TestStr1 = "33554431";
m_TestStr2 = "1";
m_WarningTimes = 0;//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ʊ<EFBFBD><C6B1><EFBFBD>ʱ<EFBFBD><CAB1>ť<EFBFBD><C5A5>˸
for(int k=0;k<MAX_MODULE_CHILD_VIEW_CNT;k++)
{
m_ModuleChildViewVec.push_back(_ChildView_NULL);
}
}
CDlgDeviceMain::~CDlgDeviceMain()
{
KillTimer(ID_READ_LASER_DIS_METER_TIMER);
KillTimer(UPDATE_INFO_TIMER);
KillTimer(ID_UPDATE_PROMPT_TIMER);
}
void CDlgDeviceMain::DoDataExchange(CDataExchange* pDX)
{
CDialogEx::DoDataExchange(pDX);
DDX_Control(pDX, IDC_EDIT_CHILD, m_EditChild);
DDX_Control(pDX, IDC_PCS_TEST_COMBO, m_PcsTestComb);
DDX_Control(pDX, NEW_SYS_INIT_BTN, m_DeviceInitBtn);
DDX_Control(pDX, NEW_WARNING_LIST_BTN, m_AlarmListBtn);
DDX_Control(pDX, NEW_PROMPT_MSG_LIST, m_PromptMsgList);
DDX_Control(pDX, NEW_CLEAR_PROMPT_LIST_BTN, m_ClearPormptBtn);
DDX_Control(pDX, NEW_SECS_CTRL_MODE_DLG__BTN, m_SleSecsCtrlModeBtn);
DDX_Text(pDX, IDC_PCS_TEST1_EDIT, m_TestStr1);
DDX_Text(pDX, IDC_PCS_TEST2_EDIT, m_TestStr2);
DDX_Control(pDX, NEW_LED_LIGHT_R, m_LedLightBtn_R);
DDX_Control(pDX, NEW_LED_LIGHT_Y, m_LedLightBtn_Y);
DDX_Control(pDX, NEW_LED_LIGHT_G, m_LedLightBtn_G);
DDX_Control(pDX, NEW_LED_LIGHT_B, m_LedLightBtn_B);
}
BOOL CDlgDeviceMain::OnInitDialog()
{
CMyDlgView::OnInitDialog();
// <20><>ʼ<EFBFBD><CABC><EFBFBD><EFBFBD><EFBFBD><EFBFBD>λ<EFBFBD><CEBB><EFBFBD><EFBFBD><EFBFBD><EFBFBD>С
InitChildArea();
gChildPCS = new CDlgChildPCS;
gChildLaserPathState = new CDlgChildLaserPathState;
gChildWaferHistory = new CDlgChildWaferHistory;
gChildSysParaSet = new CDlgChildSysParaSet;
gChildRecipe = new CDlgChildRecipe;
gChildIOState = new CDlgChildIOState;
gChildWorkWaferCnt = new CDlgChildWorkWaferCnt;
gChildWorkPrepare = new CDlgChildWorkPrepare;
gChildRobot = new CDlgChildRobot;
gChildLaserPowCheck = new CDlgChildLaserPowCheck;
gChildDeviceMaintenance = new CDlgChildDeviceMaintenance;
gChildEventLog = new CDlgChildEventLog;
gChildDataAnalysis = new CDlgChildDataAnalysis;
gChildPCS->Create(gChildPCS->GetIDD());
gChildLaserPathState->Create(gChildLaserPathState->GetIDD());
gChildWaferHistory->Create(gChildWaferHistory->GetIDD());
gChildSysParaSet->Create(gChildSysParaSet->GetIDD());
gChildRecipe->Create(gChildRecipe->GetIDD());
gChildIOState->Create(gChildIOState->GetIDD());
gChildWorkWaferCnt->Create(gChildWorkWaferCnt->GetIDD());
gChildWorkPrepare->Create(gChildWorkPrepare->GetIDD());
gChildRobot->Create(gChildRobot->GetIDD());
gChildLaserPowCheck->Create(gChildLaserPowCheck->GetIDD());
gChildDeviceMaintenance->Create(gChildDeviceMaintenance->GetIDD());
gChildEventLog->Create(gChildEventLog->GetIDD());
gChildDataAnalysis->Create(gChildDataAnalysis->GetIDD());
m_DeviceInitBtn.SetPictrueId1(IDB_BITMAP_INI);
m_DeviceInitBtn.SetPictrueId2(IDB_BTN_IMG12);
m_AlarmListBtn.SetPictrueId1(IDB_BTN_IMG3);//<2F><>
m_AlarmListBtn.SetPictrueId2(IDB_BTN_IMG13);//<2F><>
m_AlarmListBtn.SetPictrueId3(IDB_BTN_IMG14);//<2F><>
InitPcsTestComb();
m_ClearPormptBtn.SetUpColor(RGB_GRAY);
UpdateData(FALSE);
//״̬<D7B4><CCAC>Ϣˢ<CFA2><CBA2>
SetTimer(UPDATE_INFO_TIMER,UPDATE_INFO_TIMER_DELAY,NULL);
//ˢ<><CBA2>ʱ<EFBFBD><CAB1><EFBFBD><EFBFBD>timer
SetTimer(UPDATE_DATE_TIMER,UPDATE_DATE_TIMER_DELAY,NULL);
//<2F><><EFBFBD>öԻ<C3B6><D4BB><EFBFBD><EFBFBD>ijߴ<C4B3>
SetTimer(SET_DLG_SIZE_TIMER,SET_DLG_SIZE_TIMER_DELAY,NULL);
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ƕ<EFBFBD>ȡtimer
SetTimer(ID_READ_LASER_DIS_METER_TIMER,READ_LASER_DIS_METER_TIMER_DELAY,NULL);
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʾ<EFBFBD><CABE>ϢTIMER
SetTimer(ID_UPDATE_PROMPT_TIMER, UPDATE_PROMPT_TIMER_DELAY, NULL);
Sleep(1000);
SetActiveView(_ChildView_PCS);
return TRUE;
}
void CDlgDeviceMain::OnTimer(UINT nIDEvent)
{
if(nIDEvent == UPDATE_INFO_TIMER)
{
KillTimer(UPDATE_INFO_TIMER);
if(gAllThreadMgr.IsbStopAllThread())
{
gAllThreadMgr.SetThreadInfoState(_EThreadType_DlgDeviceMainTimer,false);
}
else
{
gAllThreadMgr.SetThreadInfoState(_EThreadType_DlgDeviceMainTimer,true);
UpdateInfoExt();
SetTimer(UPDATE_INFO_TIMER,UPDATE_INFO_TIMER_DELAY,NULL);
}
}
if(nIDEvent == UPDATE_DATE_TIMER)
{
//<2F><>ҪKillTimer <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʱ<EFBFBD><EFBFBD><E4BFB4><EFBFBD><EFBFBD><EFBFBD><EFBFBD><E1BFA8>
CWorkTime WorkTime;
SetItemText(IDC_CUR_DATE_TIME,WorkTime.GetDateTime("/",":"),false);
//<2F><><EFBFBD><EFBFBD>һ<EFBFBD><D2BB>log <20><>Ϣ
{
COperateCommStringPar OperatePar;
OperatePar.m_StringValType = _CommStringValType_LastLogMsg;
OperatePar.m_bReadOrWrite = _ReadOrWrite_Read;
gDeviceStateMgr->OperateCommString(OperatePar);
SetItemText(IDC_LAST_STATE_MSG,OperatePar.m_StringVal,false);
}
}
if(nIDEvent == SET_DLG_SIZE_TIMER)
{
KillTimer(SET_DLG_SIZE_TIMER);
SetWndSize();
}
if(nIDEvent == SWITCH_DLG_TIMER)
{
KillTimer(SWITCH_DLG_TIMER);
SetActiveView(m_SwitchChildViewType);
}
if(nIDEvent == ID_READ_LASER_DIS_METER_TIMER)
{
KillTimer(ID_READ_LASER_DIS_METER_TIMER);
if(gAllThreadMgr.IsbStopAllThread())
{
gAllThreadMgr.SetThreadInfoState(_EThreadType_LaserDisMeterReadTimer,false);
}
else
{
gAllThreadMgr.SetThreadInfoState(_EThreadType_LaserDisMeterReadTimer,true);
//<2F>Ǽӹ<C7BC><D3B9><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ȡ
if(!gCommonFlowMgr->IsbAutoRunning()&& gDistanceMeterMgr->CheckReadDisTimes())
{
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ȡ<EFBFBD><C8A1>ֵֻ<D6B5><D6BB><EFBFBD><EFBFBD><EFBFBD>۲<EFBFBD><DBB2><EFBFBD>,<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʱ<EFBFBD><CAB1><EFBFBD><EFBFBD><E1B5A5><EFBFBD><EFBFBD>ȡ
gDistanceMeterMgr->ReadDis();
}
else
{
Sleep(500);
}
SetTimer(ID_READ_LASER_DIS_METER_TIMER,READ_LASER_DIS_METER_TIMER_DELAY,NULL);
}
}
else if (nIDEvent == ID_UPDATE_PROMPT_TIMER)
{
UpdatePrompt();
}
CDialog::OnTimer(nIDEvent);
}
//<2F><><EFBFBD>öԻ<C3B6><D4BB><EFBFBD><EFBFBD>Ĵ<EFBFBD>С
void CDlgDeviceMain::SetWndSize()
{
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
//GetFrame()->ShowWindowMin();
//Sleep(1000);
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
//GetFrame()->ShowWindowMax();
//Ĭ<><C4AC>ѡ<EFBFBD><D1A1>PCS <20><><EFBFBD><EFBFBD>
OnBnClickedPCS();
//Ĭ<>ϵ<EFBFBD>¼<EFBFBD><C2BC><EFBFBD><EFBFBD>
if(!gAuthorityMgr->CheckAuthority(_Authority_Factory,false))
{
OnBnClickedLoginBtn();
}
}
//<2F><>ֹ<EFBFBD><D6B9><EFBFBD><EFBFBD>ر<EFBFBD>
void CDlgDeviceMain::OnCancel()
{
//CDialogEx::OnCancel();
}
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><E6B2BC>
void CDlgDeviceMain::AdjustLayout()
{
if(gEncryptionMgr->IsbRunAtNoteBook())
return;
}
void CDlgDeviceMain::SetTextCtrlItemID()
{
}
void CDlgDeviceMain::UpdateLanguageTxt()
{
}
void CDlgDeviceMain::UpdateInfoExt()
{
if(gExitApp)
return;
//<2F>û<EFBFBD><C3BB><EFBFBD>
{
COperateCommStringPar OperatePar;
OperatePar.m_StringValType = _CommStringValType_CurUserName;
OperatePar.m_bReadOrWrite = _ReadOrWrite_Read;
gDeviceStateMgr->OperateCommString(OperatePar);
SetItemText(IDC_CUR_USER_NAME,OperatePar.m_StringVal,false);
}
//<2F>˻<EFBFBD><CBBB><EFBFBD><EFBFBD><EFBFBD>
SetItemText(IDC_CUR_USER_AUTH,gAuthorityMgr->GetCurAccountName());
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ߵ<EFBFBD><DFB5><EFBFBD>ʱ
SetItemText(IDC_LASER_SLEEP_TIME,gLaser->GetCurSleepLeftTimes(1));
SetItemText(IDC_LASER_SLEEP_TIME2,gLaser->GetCurSleepLeftTimes(2));
//<2F><EFBFBD><E8B1B8><EFBFBD><EFBFBD>
SetItemText(IDC_DEVICE_ID,gSemiSecsCommMgr->GetEquipMDLN(),false);
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><E6B1BE>
SetItemText(IDC_CUR_SOFT_VISION,gProgramLaserTuiHuo->GetCurSoftVision(),false);
//ͨ<><CDA8>״̬
SetItemText(IDC_CUR_COMM_STATE,gSemiSecsCommMgr->GetCurCommStateStr(),false);
//<2F><><EFBFBD><EFBFBD>״̬
SetItemText(IDC_CUR_CTRL_STATE,gSemiSecsCommMgr->GetCurCtrlStateStr(),false);
//<2F><EFBFBD><E8B1B8><EFBFBD><EFBFBD>״̬<D7B4><CCAC>ť<EFBFBD><C5A5><EFBFBD><EFBFBD>ɫ
if(gWarningMgr->HasWarningMsg(_WarningType_All))
{
m_WarningTimes++;
if(m_WarningTimes<3)
{
m_AlarmListBtn.SetCurPicType(_EPicType_2);
}
else if(m_WarningTimes<6)
{
m_AlarmListBtn.SetCurPicType(_EPicType_1);
}
else
m_WarningTimes =0;
}
else
{
m_AlarmListBtn.SetCurPicType(_EPicType_3);
}
//<2F><>ʼ<EFBFBD><CABC><EFBFBD><EFBFBD>ť
if(gDeviceStateMgr->IsDeviceInitialize())
m_DeviceInitBtn.SetCurPicType(_EPicType_2);
else
m_DeviceInitBtn.SetCurPicType(_EPicType_1);
m_SleSecsCtrlModeBtn.SetButtomColor(RGB_YELLOW,RGB_GRAY2,(gSemiSecsCommMgr->IsbSecsInitSucc()));
int CurItemCount = m_PromptMsgList.GetItemCount();
if(CurItemCount>0)//<2F><>˸Ч<CBB8><D0A7>
m_ClearPormptBtn.SetButtomColor(RGB_YELLOW,RGB_GRAY,m_bLedFlashFlg);
else
m_ClearPormptBtn.SetUpColor(RGB_GRAY);
//Led <20>Ƶ<EFBFBD><C6B5><EFBFBD>ɫ
gAlamLightStateMgr->SetAlamLightBtnColor(m_LedLightBtn_R,_eLedLight_R,m_bLedFlashFlg);
gAlamLightStateMgr->SetAlamLightBtnColor(m_LedLightBtn_Y,_eLedLight_Y,m_bLedFlashFlg);
gAlamLightStateMgr->SetAlamLightBtnColor(m_LedLightBtn_G,_eLedLight_G,m_bLedFlashFlg);
gAlamLightStateMgr->SetAlamLightBtnColor(m_LedLightBtn_B,_eLedLight_B,m_bLedFlashFlg);
m_bLedFlashFlg = !m_bLedFlashFlg;
//<2F><><EFBFBD><EFBFBD>lock ״̬<D7B4>ı<EFBFBD>
ChangeItemState();
}
void CDlgDeviceMain::SwitchChildDlg(EChildViewType ViewType)
{
m_SwitchChildViewType = ViewType;//<2F>л<EFBFBD><D0BB><EFBFBD><EFBFBD>ӽ<EFBFBD><D3BD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
SetTimer(SWITCH_DLG_TIMER,SWITCH_DLG_TIMER_DELAY,NULL);
}
void CDlgDeviceMain::Prompt_CallBack(CString cstrPromptMsg, void *pUser)
{
CDlgDeviceMain *pThis = (CDlgDeviceMain*)pUser;
if (pThis)
{
//<2F>Ȱ<EFBFBD><C8B0><EFBFBD><EFBFBD>ݻ<EFBFBD><DDBB><EFBFBD>
pThis->InsertPrompt(cstrPromptMsg);
}
}
void CDlgDeviceMain::UpdatePrompt()
{
if (!m_PromptMsgList)
return;
gCriticalSection_PromptList.Lock();
m_PromptMsgList.DeleteAllItems();
int idx = 0;
for (auto prompt : m_quePrompt)
{
CString cstrPromptMsg = prompt;
//ͨ<><CDA8><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ַ<EFBFBD><D6B7><EFBFBD><EFBFBD><EFBFBD>ɾ<EFBFBD><C9BE><EFBFBD>б<EFBFBD>
if (-1 != cstrPromptMsg.Find("ClearPromptMsgList"))
{
m_quePrompt.clear();
m_PromptMsgList.DeleteAllItems();
break;//ɾ<><C9BE><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>˳<EFBFBD>ѭ<EFBFBD><D1AD>
}
else
{
//<2F>²<EFBFBD><C2B2><EFBFBD>һ<EFBFBD><D2BB>
m_PromptMsgList.InsertItem(idx, " ");//<2F><><EFBFBD><EFBFBD>һ<EFBFBD><D2BB>
m_PromptMsgList.SetItemText(idx, 0, cstrPromptMsg.GetBuffer());
cstrPromptMsg.ReleaseBuffer();
++idx;
//List.SetItemState(idx-1,LVIS_FOCUSED | LVIS_SELECTED,LVIS_FOCUSED | LVIS_SELECTED);
}
}
//<2F><>ʾ<EFBFBD><CABE><EFBFBD><EFBFBD>һ<EFBFBD><D2BB>
if (idx > 0 && m_quePrompt.size() > 0)
{
m_PromptMsgList.EnsureVisible(idx - 1, FALSE);
}
gCriticalSection_PromptList.Unlock();
}
void CDlgDeviceMain::InsertPrompt(CString cstrPromptMsg)
{
gCriticalSection_PromptList.Lock();
int size = m_quePrompt.size();//<2F><>ǰ<EFBFBD><C7B0><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
if (size >= MAX_PROMPT_LIST_ROWS)//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ɾ<EFBFBD><C9BE><EFBFBD><EFBFBD>һ<EFBFBD><D2BB>
{
m_quePrompt.pop_front();
}
CWorkTime WorkTime;
CString s = WorkTime.GetCurTime(":");
s += "->";
CString strMsg = s + cstrPromptMsg;
m_quePrompt.push_back(strMsg);
gCriticalSection_PromptList.Unlock();
}
#if 1
// <20><>ʼ<EFBFBD><CABC><EFBFBD><EFBFBD><EFBFBD><EFBFBD>λ<EFBFBD><CEBB><EFBFBD><EFBFBD><EFBFBD><EFBFBD>С(<28><>Ҫ<EFBFBD>ȸ<EFBFBD>m_EditChild <20>󶨿ؼ<F3B6A8BF>)
void CDlgDeviceMain::InitChildArea()
{
//<2F><>һ<EFBFBD><D2BB>eidt <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ӽ<EFBFBD><D3BD><EFBFBD><EFBFBD>Ĵ<EFBFBD>С
m_EditChild.GetWindowRect(m_rChildRect);
CRect rect;
GetWindowRect(rect);
// <20><><EFBFBD><EFBFBD><E3B3A4>
m_rChildRect.bottom -= m_rChildRect.top;
m_rChildRect.right -= m_rChildRect.left;
// <20><><EFBFBD><EFBFBD>λ<EFBFBD><CEBB>
m_rChildRect.left -= rect.left;
m_rChildRect.top -= rect.top;
m_rChildRect.bottom += m_rChildRect.top;
m_rChildRect.right += m_rChildRect.left;
}
CString CDlgDeviceMain::GetModuleChildViewName(EChildViewType ChildViewType)
{
CString Name;
switch(ChildViewType)
{
case _ChildView_PCS:
//Name = "Process";
Name = "<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>";
break;
case _ChildView_WorkPrepare:
Name = "Work Prepare";
break;
case _ChildView_WorkWaferCnt:
//Name = "Work Wafer Cnt";
Name = "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ͳ<EFBFBD><EFBFBD>";
break;
case _ChildView_Recipe:
//Name = "Recipe Edit";
Name = "Recipe <20>";
break;
case _ChildView_RecipeScanAreaEdit:
//Name = "Scan Area Edit";
Name = "ɨ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>";
break;
case _ChildView_LaserPathState:
//Name = "Laser Path State";
Name = "<EFBFBD>豸״̬";
break;
case _ChildView_Robot:
Name = "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ģ<EFBFBD><EFBFBD>";
break;
case _ChildView_IOState:
//Name = "IO State";
Name = "IO ״̬";
break;
case _ChildView_DeviceMaintenance:
Name = "Maintenance";
//Name = "IO ״̬";
break;
case _ChildView_LaserPowCheck:
Name = "Laser Pow Check";
break;
case _ChildView_SysParaSet:
Name = "ϵͳ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>";
break;
case _ChildView_EventLog:
Name = "<EFBFBD>¼<EFBFBD><EFBFBD><EFBFBD>¼";
break;
case _ChildView_WaferHistory:
Name = "Wafer<EFBFBD><EFBFBD>¼";
break;
case _ChildView_DataAnalysis:
Name = "<EFBFBD><EFBFBD><EFBFBD>ݷ<EFBFBD><EFBFBD><EFBFBD>";
break;
default:
break;
}
return Name;
}
#endif
#if 1
//<2F><><EFBFBD><EFBFBD>lock ״̬<D7B4>ı<EFBFBD>
void CDlgDeviceMain::ChangeItemState()
{
ChangeItemStateExt();
gChildPCS->ChangeItemState();
gChildLaserPathState->ChangeItemState();
gChildWaferHistory->ChangeItemState();
gChildSysParaSet->ChangeItemState();
gChildRecipe->ChangeItemState();
gChildIOState->ChangeItemState();
gChildWorkWaferCnt->ChangeItemState();
}
void CDlgDeviceMain::ChangeItemStateExt()
{
//test <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>cmd:98 <20><><EFBFBD>Դ<EFBFBD><D4B4><EFBFBD>
if(gManualTestMgr->IsbPcsTestFunc() || gEncryptionMgr->IsbRunAtNoteBook()||gAuthorityMgr->IsAutoFactory())
{
GetDlgItem(IDC_TEST_GROUP_STATIC)->ShowWindow(SW_SHOW);
GetDlgItem(IDC_PCS_TEST_BTN)->ShowWindow(SW_SHOW);
GetDlgItem(IDC_PCS_TEST_COMBO)->ShowWindow(SW_SHOW);
GetDlgItem(IDC_PCS_TEST1_EDIT)->ShowWindow(SW_SHOW);
GetDlgItem(IDC_PCS_TEST2_EDIT)->ShowWindow(SW_SHOW);
GetDlgItem(IDC_STATIC_TEST1)->ShowWindow(SW_SHOW);
GetDlgItem(IDC_STATIC_TEST2)->ShowWindow(SW_SHOW);
}
else
{
GetDlgItem(IDC_TEST_GROUP_STATIC)->ShowWindow(SW_HIDE);
GetDlgItem(IDC_PCS_TEST_BTN)->ShowWindow(SW_HIDE);
GetDlgItem(IDC_PCS_TEST_COMBO)->ShowWindow(SW_HIDE);
GetDlgItem(IDC_PCS_TEST1_EDIT)->ShowWindow(SW_HIDE);
GetDlgItem(IDC_PCS_TEST2_EDIT)->ShowWindow(SW_HIDE);
GetDlgItem(IDC_STATIC_TEST1)->ShowWindow(SW_HIDE);
GetDlgItem(IDC_STATIC_TEST2)->ShowWindow(SW_HIDE);
}
}
#endif
#if 1//<2F><><EFBFBD><EFBFBD><EFBFBD>л<EFBFBD>
void CDlgDeviceMain::ResetModuleChildView()
{
for(int k=0;k<MAX_MODULE_CHILD_VIEW_CNT;k++)
{
m_ModuleChildViewVec[k] = _ChildView_NULL;
}
}
//<2F><><EFBFBD><EFBFBD>ģ<EFBFBD><C4A3><EFBFBD>ӽ<EFBFBD><D3BD><EFBFBD>
void CDlgDeviceMain::UpdateModuleChildView()
{
COLORREF BkColor = RGB_BLACK;
int BtnId = 0;
for(int k=0;k<MAX_MODULE_CHILD_VIEW_CNT;k++)
{
CString ChildViewName = GetModuleChildViewName(m_ModuleChildViewVec[k]);
switch(k)
{
case 0:
BtnId = NEW_SUB_MODULE_BTN1;
break;
case 1:
BtnId = NEW_SUB_MODULE_BTN2;
break;
case 2:
BtnId = NEW_SUB_MODULE_BTN3;
break;
case 3:
BtnId = NEW_SUB_MODULE_BTN4;
break;
case 4:
BtnId = NEW_SUB_MODULE_BTN5;
break;
case 5:
BtnId = NEW_SUB_MODULE_BTN6;
break;
case 6:
BtnId = NEW_SUB_MODULE_BTN7;
break;
default:
break;
}
GetDlgItem(BtnId)->SetWindowText(ChildViewName);
if(ChildViewName!="")
GetDlgItem(BtnId)->EnableWindow(true);
else
GetDlgItem(BtnId)->EnableWindow(false);
}
//Ĭ<><C4AC>ѡ<EFBFBD><D1A1><EFBFBD><EFBFBD>һ<EFBFBD><D2BB>View
if(!m_ModuleChildViewVec.empty())
SetActiveView(m_ModuleChildViewVec[0]);
}
void CDlgDeviceMain::OnBnClickedPCS()
{
CLogInfo LogInfo;
LogInfo.m_ClassName = "CDlgDeviceMain";
LogInfo.m_FuncName = "OnBnClickedPCS";
gLogMgr->WriteLogInfo(LogInfo);
ResetModuleChildView();
int idx = 0;
m_ModuleChildViewVec[idx++] = _ChildView_PCS;
//m_ModuleChildViewVec[idx++] = _ChildView_WorkPrepare;
m_ModuleChildViewVec[idx++] = _ChildView_WorkWaferCnt;
UpdateModuleChildView();
}
void CDlgDeviceMain::OnBnClickedDeviceStateBtn()
{
CLogInfo LogInfo;
LogInfo.m_ClassName = "CDlgDeviceMain";
LogInfo.m_FuncName = "OnBnClickedDeviceStateBtn";
gLogMgr->WriteLogInfo(LogInfo);
ResetModuleChildView();
int idx = 0;
m_ModuleChildViewVec[idx++] = _ChildView_LaserPathState;
m_ModuleChildViewVec[idx++] = _ChildView_IOState;
//m_ModuleChildViewVec[idx++] = _ChildView_Robot;
UpdateModuleChildView();
}
void CDlgDeviceMain::OnBnClickedConfigBtn()
{
CLogInfo LogInfo;
LogInfo.m_ClassName = "CDlgDeviceMain";
LogInfo.m_FuncName = "OnBnClickedConfigBtn";
gLogMgr->WriteLogInfo(LogInfo);
ResetModuleChildView();
int idx = 0;
m_ModuleChildViewVec[idx++] = _ChildView_SysParaSet;
//m_ModuleChildViewVec[idx++] = _ChildView_DeviceMaintenance;
//m_ModuleChildViewVec[idx++] = _ChildView_LaserPowCheck;
UpdateModuleChildView();
}
void CDlgDeviceMain::OnBnClickedModuleChildViewBtn1()
{
CLogInfo LogInfo;
LogInfo.m_ClassName = "CDlgDeviceMain";
LogInfo.m_FuncName = "OnBnClickedModuleChildViewBtn1";
gLogMgr->WriteLogInfo(LogInfo);
SetActiveView(m_ModuleChildViewVec[0]);
}
void CDlgDeviceMain::OnBnClickedModuleChildViewBtn2()
{
CLogInfo LogInfo;
LogInfo.m_ClassName = "CDlgDeviceMain";
LogInfo.m_FuncName = "OnBnClickedModuleChildViewBtn2";
gLogMgr->WriteLogInfo(LogInfo);
if(_ChildView_RecipeScanAreaEdit == m_ModuleChildViewVec[1])
{
GetFrame()->m_DlgGraphEdit.ShowAllItem();
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>༭ͼ<E0BCAD><CDBC>
ShowWindow(SW_HIDE);
}
else
{
SetActiveView(m_ModuleChildViewVec[1]);
}
}
void CDlgDeviceMain::OnBnClickedModuleChildViewBtn3()
{
CLogInfo LogInfo;
LogInfo.m_ClassName = "CDlgDeviceMain";
LogInfo.m_FuncName = "OnBnClickedModuleChildViewBtn3";
gLogMgr->WriteLogInfo(LogInfo);
SetActiveView(m_ModuleChildViewVec[2]);
}
void CDlgDeviceMain::OnBnClickedModuleChildViewBtn4()
{
CLogInfo LogInfo;
LogInfo.m_ClassName = "CDlgDeviceMain";
LogInfo.m_FuncName = "OnBnClickedModuleChildViewBtn4";
gLogMgr->WriteLogInfo(LogInfo);
SetActiveView(m_ModuleChildViewVec[3]);
}
void CDlgDeviceMain::OnBnClickedModuleChildViewBtn5()
{
CLogInfo LogInfo;
LogInfo.m_ClassName = "CDlgDeviceMain";
LogInfo.m_FuncName = "OnBnClickedModuleChildViewBtn5";
gLogMgr->WriteLogInfo(LogInfo);
SetActiveView(m_ModuleChildViewVec[4]);
}
void CDlgDeviceMain::OnBnClickedModuleChildViewBtn6()
{
CLogInfo LogInfo;
LogInfo.m_ClassName = "CDlgDeviceMain";
LogInfo.m_FuncName = "OnBnClickedModuleChildViewBtn6";
gLogMgr->WriteLogInfo(LogInfo);
SetActiveView(m_ModuleChildViewVec[5]);
}
void CDlgDeviceMain::OnBnClickedModuleChildViewBtn7()
{
CLogInfo LogInfo;
LogInfo.m_ClassName = "CDlgDeviceMain";
LogInfo.m_FuncName = "OnBnClickedModuleChildViewBtn7";
gLogMgr->WriteLogInfo(LogInfo);
SetActiveView(m_ModuleChildViewVec[6]);
}
#endif
#if 1
//<2F>û<EFBFBD><C3BB><EFBFBD>¼
void CDlgDeviceMain::OnBnClickedLoginBtn()
{
CLogInfo LogInfo;
LogInfo.m_ClassName = "CDlgDeviceMain";
LogInfo.m_FuncName = "OnBnClickedLoginBtn";
gLogMgr->WriteLogInfo(LogInfo);
CDlgAuthorityLogin dlg;
dlg.DoModal();
}
//alarm <20><>ť
void CDlgDeviceMain::OnBnClickedWarningListBtn()
{
CLogInfo LogInfo;
LogInfo.m_ClassName = "CDlgDeviceMain";
LogInfo.m_FuncName = "OnBnClickedWarningListBtn";
gLogMgr->WriteLogInfo(LogInfo);
CDlgWarningList dlg;
dlg.DoModal();
}
void CDlgDeviceMain::OnBnClickedLogoBtn()
{
CLogInfo LogInfo;
LogInfo.m_ClassName = "CDlgDeviceMain";
LogInfo.m_FuncName = "OnBnClickedLogoBtn";
gLogMgr->WriteLogInfo(LogInfo);
//CAboutDlg dlg;
//dlg.DoModal();
}
//<2F>鿴Recipe
void CDlgDeviceMain::OnBnClickedRecipeBtn()
{
CLogInfo LogInfo;
LogInfo.m_ClassName = "CDlgDeviceMain";
LogInfo.m_FuncName = "OnBnClickedRecipeBtn";
gLogMgr->WriteLogInfo(LogInfo);
if(!gAuthorityMgr->CheckAuthorityByName("AUTHORITY_CheckRecipe",true))
return;
set<eCheckStateType> CheckStateSet;
CheckStateSet.insert(_CheckStateType_AutoRuning);
CheckStateSet.insert(_CheckStateType_AnnealExcuting);
CheckStateSet.insert(_CheckStateType_OnlineRemote);
if(!gDeviceStateMgr->ManualOperateStateCheck(CheckStateSet,true))
return;
CDlgSelectRecipe dlg;
dlg.SetbOnlyShowInfo(true);//ֻ<><D6BB>ʾ<EFBFBD><CABE>Ϣ,<2C><><EFBFBD>ڲ鿴rcp <20><><EFBFBD><EFBFBD>Ϣ
dlg.DoModal();
}
//<2F><EFBFBD>Ȼ<EFBFBD><C8BB><EFBFBD><EFBFBD><EFBFBD>
void CDlgDeviceMain::OnBnClickedSysInitBtn()
{
CLogInfo LogInfo;
LogInfo.m_ClassName = "CDlgDeviceMain";
LogInfo.m_FuncName = "OnBnClickedSysInitBtn";
gLogMgr->WriteLogInfo(LogInfo);
if(!gAuthorityMgr->CheckAuthorityByName("AUTHORITY_InitDev",true))
return;
set<eCheckStateType> CheckStateSet;
CheckStateSet.insert(_CheckStateType_AutoRuning);
CheckStateSet.insert(_CheckStateType_AnnealExcuting);
CheckStateSet.insert(_CheckStateType_OnlineRemote);
if(!gDeviceStateMgr->ManualOperateStateCheck(CheckStateSet,true))
return;
gAnnealMonitoringMgr->OpenPrepareWorkDlg(false);
}
#endif
#if 1
#define PCS_TEST_FUNC1 "test <20><><EFBFBD><EFBFBD>1"
#define PCS_TEST_FUNC2 "test <20><><EFBFBD><EFBFBD>2"
#define PCS_TEST_FUNC3 "StageVacOffTest"
#define PCS_TEST_FUNC4 "xxxxxxxxxxxxx"
#define PCS_TEST_FUNC5 "xxxxxxxxxxxxx"
#define PCS_TEST_FUNC6 "xxxxxxxxxxxxx"
#define PCS_TEST_FUNC7 "xxxxxxxxxxxxx"
#define PCS_TEST_FUNC8 "xxxxxxxxxxxxx"
#define PCS_TEST_FUNC9 "xxxxxxxxxxxxx"
#define PCS_TEST_FUNC10 "xxxxxxxxxxxxx"
#define PCS_TEST_FUNC11 "xxxxxxxxxxxxx"
#define PCS_TEST_FUNC12 "Alarm On By Code"
#define PCS_TEST_FUNC13 "ASSERT TEST"
#define PCS_TEST_FUNC14 "ShowWindow(SW_HIDE)"
#define PCS_TEST_FUNC15 "xxxxxxxxxxxxx"
#define PCS_TEST_FUNC16 "׼ֱ<D7BC><D6B1>Cmd Send"
void CDlgDeviceMain::InitPcsTestComb()
{
int Idx = 0;
m_PcsTestComb.InsertString(Idx++,PCS_TEST_FUNC1);
m_PcsTestComb.InsertString(Idx++,PCS_TEST_FUNC2);
m_PcsTestComb.InsertString(Idx++,PCS_TEST_FUNC3);
m_PcsTestComb.InsertString(Idx++,PCS_TEST_FUNC4);
m_PcsTestComb.InsertString(Idx++,PCS_TEST_FUNC5);
m_PcsTestComb.InsertString(Idx++,PCS_TEST_FUNC6);
m_PcsTestComb.InsertString(Idx++,PCS_TEST_FUNC7);
m_PcsTestComb.InsertString(Idx++,PCS_TEST_FUNC8);
m_PcsTestComb.InsertString(Idx++,PCS_TEST_FUNC9);
m_PcsTestComb.InsertString(Idx++,PCS_TEST_FUNC10);
m_PcsTestComb.InsertString(Idx++,PCS_TEST_FUNC11);
m_PcsTestComb.InsertString(Idx++,PCS_TEST_FUNC12);
m_PcsTestComb.InsertString(Idx++,PCS_TEST_FUNC13);
m_PcsTestComb.InsertString(Idx++,PCS_TEST_FUNC14);
m_PcsTestComb.InsertString(Idx++,PCS_TEST_FUNC15);
m_PcsTestComb.InsertString(Idx++,PCS_TEST_FUNC16);
}
//<2F><><EFBFBD>Թ<EFBFBD><D4B9><EFBFBD>
void CDlgDeviceMain::OnBnClickedPcsTestBtn()
{
if(gAuthorityMgr->CheckAuthority(_Authority_Factory,true)==false)
return;
if(!UpdateData(TRUE))
return;
CLogInfo LogInfo;
LogInfo.m_ClassName = "CDlgDeviceMain";
LogInfo.m_FuncName = "OnBnClickedPcsTestBtn";
CString CombStr;
GetDlgItem(IDC_PCS_TEST_COMBO)->GetWindowText(CombStr);
if(CombStr==PCS_TEST_FUNC1)
{
CMyTestPar MyTestPar;
MyTestPar.m_StringVal1 = m_TestStr1;
MyTestPar.m_StringVal2 = m_TestStr2;
CMyTest MyTest;
MyTest.MyTestFunc1(MyTestPar);
}
if(CombStr==PCS_TEST_FUNC2)
{
}
if(CombStr==PCS_TEST_FUNC3)
{
//prcess<73><73><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ģ<EFBFBD><C4A3><EFBFBD><EFBFBD><EFBFBD><EFBFBD>off
gManualTestMgr->SetbStageVacOffTest(true);
}
if(CombStr==PCS_TEST_FUNC4)
{
}
if(CombStr==PCS_TEST_FUNC5)
{
}
if(CombStr==PCS_TEST_FUNC6)
{
}
if(CombStr==PCS_TEST_FUNC7)
{
}
if(CombStr==PCS_TEST_FUNC8)
{
}
if(CombStr==PCS_TEST_FUNC9)
{
}
if(CombStr==PCS_TEST_FUNC10)
{
}
if(CombStr==PCS_TEST_FUNC11)
{
}
if(CombStr==PCS_TEST_FUNC12)
{
gWarningMgr->ManualSetAlarmStateByCode(CStringToInt(m_TestStr1));
}
if(CombStr==PCS_TEST_FUNC13)
{
LogInfo.m_LogMsg = "ASSERT";
gLogMgr->WriteLogInfo(LogInfo);
ASSERT(FALSE);
}
if(CombStr==PCS_TEST_FUNC14)
{
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>༭ͼ<E0BCAD><CDBC>
ShowWindow(SW_HIDE);
}
if(CombStr==PCS_TEST_FUNC15)
{
}
if(CombStr==PCS_TEST_FUNC16)
{
gAlignerDyhMgr->SendAlignerParCmd_ByStr(m_TestStr1);
}
}
#endif
#if 1
void CDlgDeviceMain::InitPromptMsgList()
{
//<2F><><EFBFBD>÷<EFBFBD><C3B7><EFBFBD>
m_PromptMsgList.SetExtendedStyle(LVS_EX_FULLROWSELECT | LVS_EX_GRIDLINES);
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
int idx = 0;
m_PromptMsgList.InsertColumn(idx, "<EFBFBD><EFBFBD>ʾ<EFBFBD><EFBFBD>Ϣ", LVCFMT_LEFT, 750, -1);
idx++;
//<2F><><EFBFBD><EFBFBD>֪ͨ<CDA8><D6AA>Ϣ<EFBFBD>Ļص<C4BB>,<2C><>Ϣ<EFBFBD><CFA2>ʾ<EFBFBD><CABE><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϣ<EFBFBD><CFA2>ʾ<EFBFBD><CABE>ʾ<EFBFBD><CABE><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ڳ<EFBFBD>ʼ<EFBFBD><CABC>ʱ<EFBFBD><CAB1><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>½<EFBFBD><C2BD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
gLogMgr->InitPromptList(Prompt_CallBack, this);
}
void CDlgDeviceMain::OnDrawPromptMsgList( NMHDR* pNMHDR, LRESULT* pResult )
{
NMLVCUSTOMDRAW* pLVCD = reinterpret_cast<NMLVCUSTOMDRAW*>( pNMHDR );
*pResult = CDRF_DODEFAULT;
if( CDDS_PREPAINT == pLVCD->nmcd.dwDrawStage )
{
*pResult = CDRF_NOTIFYITEMDRAW;
}
else if( CDDS_ITEMPREPAINT == pLVCD->nmcd.dwDrawStage )
{
*pResult = CDRF_NOTIFYSUBITEMDRAW;
}
else if((CDDS_ITEMPREPAINT | CDDS_SUBITEM) == pLVCD->nmcd.dwDrawStage )
{
COLORREF crText, crBkgnd;
crText = RGB_BLACK;
crBkgnd = RGB_WHITE;
int iRow = pLVCD->nmcd.dwItemSpec;//<2F>к<EFBFBD>
int iCol = 4;
int CurItemCount = m_PromptMsgList.GetItemCount();//<2F><>ǰ<EFBFBD><C7B0><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
if(iRow==(CurItemCount-1))
{
crBkgnd = RGB_YELLOW;
}
pLVCD->clrText = crText;
pLVCD->clrTextBk = crBkgnd;
*pResult = CDRF_DODEFAULT;
}
}
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʾ<EFBFBD><CABE>Ϣ
void CDlgDeviceMain::OnBnClickedClearPromptListBtn()
{
CLogInfo LogInfo;
LogInfo.m_ClassName = "CDlgDeviceMain";
LogInfo.m_FuncName = "OnBnClickedClearPromptListBtn";
gLogMgr->WriteLogInfo(LogInfo);
gLogMgr->InsertPromptList("ClearPromptMsgList");
}
#endif
void CDlgDeviceMain::OnBnClickedSecsCtrlModeDlg()
{
CLogInfo LogInfo;
LogInfo.m_ClassName = "CDlgDeviceMain";
LogInfo.m_FuncName = "OnBnClickedSecsCtrlModeDlg";
gLogMgr->WriteLogInfo(LogInfo);
if(!gAuthorityMgr->CheckAuthorityByName("AUTHORITY_SetContorMode",true))
return;
CDlgSecsModeCtrl dlg;
dlg.DoModal();
}
//<2F><>С<EFBFBD><D0A1><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
void CDlgDeviceMain::OnBnClickedShowminimizedBtn()
{
CLogInfo LogInfo;
LogInfo.m_ClassName = "CDlgDeviceMain";
LogInfo.m_FuncName = "OnBnClickedShowminimizedBtn";
gLogMgr->WriteLogInfo(LogInfo);
GetFrame()->ShowWindowMin();
}