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.
753 lines
23 KiB
C++
753 lines
23 KiB
C++
|
|
#include "stdafx.h"
|
|
#include "DlgDeviceMain.h"
|
|
#include "afxdialogex.h"
|
|
#include "CommonFlowMgr.h"
|
|
#include "LogMgr.h"
|
|
#include "AuthorityMgr.h"
|
|
#include "AllThreadMgr.h"
|
|
#include "CStringFuc.h"
|
|
#include "GlobalFunction.h"
|
|
#include "DlgChildWaferHistory.h"
|
|
#include "ProgramLaserTuiHuo.h"
|
|
#include "LogMgr.h"
|
|
#include "AuthorityMgr.h"
|
|
#include "WarningMgr.h"
|
|
#include "DlgChildRecipe.h"
|
|
#include "DlgAuthorityLogin.h"
|
|
#include "ProgramLaserTuiHuo.h"
|
|
#include "AllThreadMgr.h"
|
|
#include "LaiPuLaser.h"
|
|
#include "MyDlgView.h"
|
|
#include "EncryptionMgr.h"
|
|
#include "Laser.h"
|
|
#include "GlobalDrawMgr.h"
|
|
#include "LanguageMgr.h"
|
|
#include "CommonFlowMgr.h"
|
|
#include "MarkArea.h"
|
|
#include "FileMgr.h"
|
|
#include "WorkCmdInvoker.h"
|
|
#include "DlgChildEventLog.h"
|
|
#include "DlgChildDataAnalysis.h"
|
|
#include "DlgChildAlarmLog.h"
|
|
#include "DlgChildCheckHistory.h"
|
|
#include "DlgChildParaHistory.h"
|
|
#include "DlgChildRealTimeDataHistory.h"
|
|
#include "DlgChildBeamDataHistory.h"
|
|
#include "DlgChildConfigHistory.h"
|
|
#include "DlgAuthorityAccount.h"
|
|
#include "DlgChildLoginHistory.h"
|
|
#include "DlgChildJobHistory.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 12//子界面的最大数量
|
|
|
|
#define UPDATE_DATE_TIMER 5
|
|
#define UPDATE_DATE_TIMER_DELAY 200
|
|
|
|
#define LAIPU_APP_WNDS_NAME "LaiPuLaser" //查找的窗口名字
|
|
HWND gLaipuAppHwnd = 0;
|
|
//遍历窗口句柄,查找需要的外置窗口程序
|
|
BOOL CALLBACK EnumLaipuAppWnds( HWND hwnd, LPARAM lParam )
|
|
{
|
|
const int size1 = 1024;
|
|
char szClass[size1];
|
|
if( !GetWindow( hwnd, GW_OWNER ) && IsWindowVisible( hwnd ) ) // 滤掉不在任务栏显示的窗口
|
|
{
|
|
GetClassName( hwnd, szClass, size1 );
|
|
// 滤掉任务栏本身// 滤掉桌面
|
|
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_RECORD_BTN, &CDlgDeviceMain::OnBnClickedRecordBtn)
|
|
ON_BN_CLICKED(CHILD_CONFIG_BTN, &CDlgDeviceMain::OnBnClickedConfigBtn)
|
|
|
|
ON_BN_CLICKED(CHILD_RECIPE_BTN, &CDlgDeviceMain::OnBnClickedRecipeBtn)
|
|
ON_BN_CLICKED(NEW_LOGO_BTN, &CDlgDeviceMain::OnBnClickedLogoBtn)
|
|
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_BN_CLICKED(NEW_SUB_MODULE_BTN8, &CDlgDeviceMain::OnBnClickedModuleChildViewBtn8)
|
|
|
|
ON_BN_CLICKED(NEW_SUB_MODULE_BTN9, &CDlgDeviceMain::OnBnClickedModuleChildViewBtn9)
|
|
ON_BN_CLICKED(NEW_SUB_MODULE_BTN10, &CDlgDeviceMain::OnBnClickedModuleChildViewBtn10)
|
|
ON_BN_CLICKED(NEW_SUB_MODULE_BTN11, &CDlgDeviceMain::OnBnClickedModuleChildViewBtn11)
|
|
ON_BN_CLICKED(NEW_SUB_MODULE_BTN12, &CDlgDeviceMain::OnBnClickedModuleChildViewBtn12)
|
|
|
|
ON_BN_CLICKED(CHILD_CLOSE_APP_BTN, &CDlgDeviceMain::OnBnClickedCloseAppBtn)
|
|
ON_BN_CLICKED(CHILD_SHOW_WINDOW_MIN_BTN, &CDlgDeviceMain::OnBnClickedShowWindowMinBtn)
|
|
ON_BN_CLICKED(CHILD_USER_MGR_BTN, &CDlgDeviceMain::OnBnClickedUserMgrBtn)
|
|
END_MESSAGE_MAP()
|
|
|
|
CDlgDeviceMain *gDlgDeviceMain = NULL;
|
|
CDlgDeviceMain::CDlgDeviceMain(CWnd* pParent /*=NULL*/)
|
|
: CMyDlgView(CDlgDeviceMain::IDD, pParent)
|
|
{
|
|
//m_TestStr1 = "33554431";
|
|
m_TestStr1 = "0";
|
|
m_WarningTimes = 0;//用来控制报警时按钮闪烁
|
|
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);
|
|
}
|
|
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_Text(pDX, IDC_PCS_TEST1_EDIT, m_TestStr1);
|
|
DDX_Text(pDX, IDC_PCS_TEST2_EDIT, m_TestStr2);
|
|
}
|
|
BOOL CDlgDeviceMain::OnInitDialog()
|
|
{
|
|
CMyDlgView::OnInitDialog();
|
|
|
|
// 初始化窗口位置与大小
|
|
InitChildArea();
|
|
|
|
UpdateData(FALSE);
|
|
gChildRecipe = new CDlgChildRecipe;
|
|
gChildRecipe->Create(gChildRecipe->GetIDD());
|
|
gChildWaferHistory = new CDlgChildWaferHistory;
|
|
gChildWaferHistory->Create(gChildWaferHistory->GetIDD());
|
|
gChildEventLog = new CDlgChildEventLog;
|
|
gChildEventLog->Create(gChildEventLog->GetIDD());
|
|
gChildAlarmLog = new CDlgChildAlarmLog;
|
|
gChildAlarmLog->Create(gChildAlarmLog->GetIDD());
|
|
|
|
gChildCheckHistory = new CDlgChildCheckHistory;
|
|
gChildCheckHistory->Create(gChildCheckHistory->GetIDD());
|
|
|
|
gDlgChildRealTimeDataHistory = new CDlgChildRealTimeDataHistory;
|
|
gDlgChildRealTimeDataHistory->Create(gDlgChildRealTimeDataHistory->GetIDD());
|
|
|
|
gDlgChildBeamDataHistory = new CDlgChildBeamDataHistory;
|
|
gDlgChildBeamDataHistory->Create(gDlgChildBeamDataHistory->GetIDD());
|
|
|
|
gDlgChildConfigHistory = new CDlgChildConfigHistory;
|
|
gDlgChildConfigHistory->Create(gDlgChildConfigHistory->GetIDD());
|
|
|
|
gChildParaHistory = new CDlgChildParaHistory;
|
|
gChildParaHistory->Create(gChildParaHistory->GetIDD());
|
|
|
|
gDlgChildLoginHistory = new CDlgChildLoginHistory;
|
|
gDlgChildLoginHistory->Create(gDlgChildLoginHistory->GetIDD());
|
|
|
|
gDlgChildJobHistory = new CDlgChildJobHistory;
|
|
gDlgChildJobHistory->Create(gDlgChildJobHistory->GetIDD());
|
|
|
|
Sleep(200);
|
|
SetActiveView(_ChildView_Recipe);
|
|
//设置对话框的尺寸
|
|
SetTimer(SET_DLG_SIZE_TIMER,SET_DLG_SIZE_TIMER_DELAY,NULL);
|
|
|
|
SetTimer(UPDATE_INFO_TIMER,UPDATE_INFO_TIMER_DELAY,NULL);
|
|
return TRUE;
|
|
}
|
|
//防止界面被关闭
|
|
void CDlgDeviceMain::OnCancel()
|
|
{
|
|
//CDialogEx::OnCancel();
|
|
}
|
|
|
|
void CDlgDeviceMain::OnTimer(UINT nIDEvent)
|
|
{
|
|
if(nIDEvent == UPDATE_INFO_TIMER)
|
|
{
|
|
KillTimer(UPDATE_INFO_TIMER);
|
|
UpdateInfoExt();
|
|
SetTimer(UPDATE_INFO_TIMER,UPDATE_INFO_TIMER_DELAY,NULL);
|
|
}
|
|
if(nIDEvent == SET_DLG_SIZE_TIMER)
|
|
{
|
|
KillTimer(SET_DLG_SIZE_TIMER);
|
|
SetWndSize();
|
|
}
|
|
if(nIDEvent == SWITCH_DLG_TIMER)
|
|
{
|
|
KillTimer(SWITCH_DLG_TIMER);
|
|
SetActiveView(m_SwitchChildViewType);
|
|
}
|
|
|
|
CDialog::OnTimer(nIDEvent);
|
|
}
|
|
//设置对话框的大小
|
|
void CDlgDeviceMain::SetWndSize()
|
|
{
|
|
//窗口最大化
|
|
//GetFrame()->ShowWindowMin();
|
|
//Sleep(1000);
|
|
//窗口最大化
|
|
//GetFrame()->ShowWindowMax();
|
|
|
|
//默认选择rcp界面
|
|
//OnBnClickedRecipeBtn();
|
|
OnBnClickedRecordBtn();
|
|
|
|
//默认登录界面
|
|
if(!gAuthorityMgr->CheckAuthority(_Authority_Factory,false))
|
|
{
|
|
//OnBnClickedLoginBtn();//22-08-02
|
|
}
|
|
}
|
|
//调整界面布局
|
|
void CDlgDeviceMain::AdjustLayout()
|
|
{
|
|
if(gEncryptionMgr->IsbRunAtNoteBook())
|
|
return;
|
|
int w = gDraw->GetDlgMainWidth();
|
|
//GetFrame()->m_DeviceMainPane.MoveWindow(CRect(35,0,w,1100),TRUE,NULL);
|
|
}
|
|
void CDlgDeviceMain::SetTextCtrlItemID()
|
|
{
|
|
}
|
|
void CDlgDeviceMain::UpdateLanguageTxt()
|
|
{
|
|
|
|
}
|
|
|
|
void CDlgDeviceMain::UpdateInfoExt()
|
|
{
|
|
if(gExitApp)
|
|
return;
|
|
|
|
//用户名
|
|
SetItemText(IDC_CUR_USER_NAME,gAuthorityMgr->GetCurUserName());
|
|
//账户类型
|
|
SetItemText(IDC_CUR_USER_AUTH,gAuthorityMgr->GetCurAccountName());
|
|
//软件版本
|
|
SetItemText(IDC_CUR_SOFT_VISION,gProgramLaserTuiHuo->GetCurSoftVision());
|
|
}
|
|
void CDlgDeviceMain::SwitchChildDlg(EChildViewType ViewType)
|
|
{
|
|
m_SwitchChildViewType = ViewType;//切换的子界面类型
|
|
SetTimer(SWITCH_DLG_TIMER,SWITCH_DLG_TIMER_DELAY,NULL);
|
|
}
|
|
#if 1
|
|
// 初始化窗口位置与大小(需要先给m_EditChild 绑定控件)
|
|
void CDlgDeviceMain::InitChildArea()
|
|
{
|
|
//用一个eidt 来控制子界面的大小
|
|
m_EditChild.GetWindowRect(m_rChildRect);
|
|
CRect rect;
|
|
GetWindowRect(rect);
|
|
|
|
// 计算长宽
|
|
m_rChildRect.bottom -= m_rChildRect.top;
|
|
m_rChildRect.right -= m_rChildRect.left;
|
|
|
|
// 计算位置
|
|
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";
|
|
break;
|
|
case _ChildView_WorkPrepare:
|
|
Name = "Work Prepare";
|
|
break;
|
|
case _ChildView_WorkWaferCnt:
|
|
Name = "Work Wafer Cnt";
|
|
break;
|
|
case _ChildView_Recipe:
|
|
Name = "Recipe编辑";
|
|
break;
|
|
case _ChildView_RecipeScanAreaEdit:
|
|
Name = "图形编辑";
|
|
break;
|
|
case _ChildView_LaserPathState:
|
|
Name = "Laser Path State";
|
|
break;
|
|
case _ChildView_LaserDeviceState:
|
|
Name = "Laser Device State";
|
|
break;
|
|
case _ChildView_Robot:
|
|
Name = "Robot";
|
|
break;
|
|
case _ChildView_IOState:
|
|
Name = "IO State";
|
|
break;
|
|
case _ChildView_DeviceMaintenance:
|
|
Name = "Maintenance";
|
|
break;
|
|
case _ChildView_LaserPowCheck:
|
|
Name = "Laser Pow Check";
|
|
break;
|
|
case _ChildView_SysParaSet:
|
|
Name = "Sys Para Set";
|
|
break;
|
|
case _ChildView_EventLog:
|
|
Name = "Event";
|
|
break;
|
|
case _ChildView_AlarmLog:
|
|
Name = "Alarm History";
|
|
break;
|
|
case _ChildView_WaferHistory:
|
|
Name = "Wafer History";
|
|
break;
|
|
case _ChildView_CheckHistory:
|
|
Name = "Check History";
|
|
break;
|
|
case _ChildView_RealTimeDataHistory:
|
|
Name = "RealTime History";
|
|
break;
|
|
case _ChildView_BeamDataHistory:
|
|
Name = "BeamData History";
|
|
break;
|
|
case _ChildView_ConfigHistory:
|
|
Name = "Config History";
|
|
break;
|
|
case _ChildView_JobHistory:
|
|
Name = "Job History";
|
|
break;
|
|
case _ChildView_ParHistory:
|
|
Name = "Recipe History";
|
|
break;
|
|
case _ChildView_LoginHistory:
|
|
Name = "Login History";
|
|
break;
|
|
case _ChildView_DataAnalysis:
|
|
Name = "Data Analyse";
|
|
break;
|
|
default:
|
|
break;
|
|
}
|
|
return Name;
|
|
}
|
|
#endif
|
|
|
|
#if 1
|
|
//界面lock 状态改变
|
|
void CDlgDeviceMain::ChangeItemState()
|
|
{
|
|
ChangeItemStateExt();
|
|
|
|
gChildPCS->ChangeItemState();
|
|
gChildLaserPathState->ChangeItemState();
|
|
gChildWaferHistory->ChangeItemState();
|
|
gChildCheckHistory->ChangeItemState();
|
|
gDlgChildRealTimeDataHistory->ChangeItemState();
|
|
gDlgChildBeamDataHistory->ChangeItemState();
|
|
gDlgChildConfigHistory->ChangeItemState();
|
|
gChildSysParaSet->ChangeItemState();
|
|
gChildRecipe->ChangeItemState();
|
|
gChildIOState->ChangeItemState();
|
|
gChildParaHistory->ChangeItemState();
|
|
gDlgChildLoginHistory->ChangeItemState();
|
|
gDlgChildJobHistory->ChangeItemState();
|
|
}
|
|
void CDlgDeviceMain::ChangeItemStateExt()
|
|
{
|
|
|
|
}
|
|
#endif
|
|
#if 1//界面切换
|
|
void CDlgDeviceMain::ResetModuleChildView()
|
|
{
|
|
for(int k=0;k<MAX_MODULE_CHILD_VIEW_CNT;k++)
|
|
{
|
|
m_ModuleChildViewVec[k] = _ChildView_NULL;
|
|
}
|
|
}
|
|
//更新模块子界面
|
|
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;
|
|
case 7:
|
|
BtnId = NEW_SUB_MODULE_BTN8;
|
|
break;
|
|
case 8:
|
|
BtnId = NEW_SUB_MODULE_BTN9;
|
|
break;
|
|
case 9:
|
|
BtnId = NEW_SUB_MODULE_BTN10;
|
|
break;
|
|
case 10:
|
|
BtnId = NEW_SUB_MODULE_BTN11;
|
|
break;
|
|
case 11:
|
|
BtnId = NEW_SUB_MODULE_BTN12;
|
|
break;
|
|
default:
|
|
break;
|
|
}
|
|
GetDlgItem(BtnId)->SetWindowText(ChildViewName);
|
|
|
|
if(ChildViewName!="")
|
|
GetDlgItem(BtnId)->ShowWindow(SW_SHOW);
|
|
else
|
|
GetDlgItem(BtnId)->ShowWindow(SW_HIDE);
|
|
}
|
|
|
|
//默认选择第一个View
|
|
if(!m_ModuleChildViewVec.empty())
|
|
SetActiveView(m_ModuleChildViewVec[0]);
|
|
}
|
|
void CDlgDeviceMain::OnBnClickedPCS()
|
|
{
|
|
gLogMgr->WriteDebugLog("Func---->OnBnClickedPCS");
|
|
ResetModuleChildView();
|
|
int idx = 0;
|
|
m_ModuleChildViewVec[idx++] = _ChildView_PCS;
|
|
m_ModuleChildViewVec[idx++] = _ChildView_WorkPrepare;
|
|
m_ModuleChildViewVec[idx++] = _ChildView_WorkWaferCnt;
|
|
UpdateModuleChildView();
|
|
}
|
|
void CDlgDeviceMain::OnBnClickedRecipeBtn()
|
|
{
|
|
gLogMgr->WriteDebugLog("Func---->OnBnClickedRecipeBtn");
|
|
ResetModuleChildView();
|
|
int idx = 0;
|
|
m_ModuleChildViewVec[idx++] = _ChildView_Recipe;
|
|
m_ModuleChildViewVec[idx++] = _ChildView_RecipeScanAreaEdit;
|
|
UpdateModuleChildView();
|
|
}
|
|
void CDlgDeviceMain::OnBnClickedDeviceStateBtn()
|
|
{
|
|
gLogMgr->WriteDebugLog("Func---->OnBnClickedDeviceStateBtn");
|
|
ResetModuleChildView();
|
|
int idx = 0;
|
|
m_ModuleChildViewVec[idx++] = _ChildView_LaserPathState;
|
|
m_ModuleChildViewVec[idx++] = _ChildView_LaserDeviceState;
|
|
m_ModuleChildViewVec[idx++] = _ChildView_Robot;
|
|
m_ModuleChildViewVec[idx++] = _ChildView_IOState;
|
|
UpdateModuleChildView();
|
|
}
|
|
|
|
void CDlgDeviceMain::OnBnClickedRecordBtn()
|
|
{
|
|
gLogMgr->WriteDebugLog("Func---->OnBnClickedRecordBtn");
|
|
ResetModuleChildView();
|
|
int idx = 0;
|
|
m_ModuleChildViewVec[idx++] = _ChildView_EventLog;
|
|
m_ModuleChildViewVec[idx++] = _ChildView_WaferHistory;
|
|
m_ModuleChildViewVec[idx++] = _ChildView_CheckHistory;
|
|
m_ModuleChildViewVec[idx++] = _ChildView_ParHistory;
|
|
m_ModuleChildViewVec[idx++] = _ChildView_RealTimeDataHistory;
|
|
m_ModuleChildViewVec[idx++] = _ChildView_BeamDataHistory;
|
|
m_ModuleChildViewVec[idx++] = _ChildView_ConfigHistory;
|
|
m_ModuleChildViewVec[idx++] = _ChildView_AlarmLog;
|
|
m_ModuleChildViewVec[idx++] = _ChildView_LoginHistory;
|
|
m_ModuleChildViewVec[idx++] = _ChildView_JobHistory;
|
|
//m_ModuleChildViewVec[idx++] = _ChildView_DataAnalysis;
|
|
UpdateModuleChildView();
|
|
}
|
|
|
|
|
|
void CDlgDeviceMain::OnBnClickedModuleChildViewBtn1()
|
|
{
|
|
gLogMgr->WriteDebugLog("Func---->OnBnClickedModuleChildViewBtn1");
|
|
SetActiveView(m_ModuleChildViewVec[0]);
|
|
}
|
|
void CDlgDeviceMain::OnBnClickedModuleChildViewBtn2()
|
|
{
|
|
gLogMgr->WriteDebugLog("Func---->OnBnClickedModuleChildViewBtn2");
|
|
if(_ChildView_RecipeScanAreaEdit == m_ModuleChildViewVec[1])
|
|
{
|
|
if(!gAuthorityMgr->CheckAuthorityByName("AUTHORITY_EditScanArea",true))
|
|
return;
|
|
GetFrame()->m_DlgGraphEdit.ShowAllItem();
|
|
//隐藏主界面,编辑图形
|
|
ShowWindow(SW_HIDE);
|
|
}
|
|
else
|
|
{
|
|
SetActiveView(m_ModuleChildViewVec[1]);
|
|
}
|
|
}
|
|
void CDlgDeviceMain::OnBnClickedModuleChildViewBtn3()
|
|
{
|
|
gLogMgr->WriteDebugLog("Func---->OnBnClickedModuleChildViewBtn3");
|
|
SetActiveView(m_ModuleChildViewVec[2]);
|
|
}
|
|
void CDlgDeviceMain::OnBnClickedModuleChildViewBtn4()
|
|
{
|
|
gLogMgr->WriteDebugLog("Func---->OnBnClickedModuleChildViewBtn4");
|
|
SetActiveView(m_ModuleChildViewVec[3]);
|
|
}
|
|
void CDlgDeviceMain::OnBnClickedModuleChildViewBtn5()
|
|
{
|
|
gLogMgr->WriteDebugLog("Func---->OnBnClickedModuleChildViewBtn5");
|
|
SetActiveView(m_ModuleChildViewVec[4]);
|
|
}
|
|
void CDlgDeviceMain::OnBnClickedModuleChildViewBtn6()
|
|
{
|
|
gLogMgr->WriteDebugLog("Func---->OnBnClickedModuleChildViewBtn6");
|
|
SetActiveView(m_ModuleChildViewVec[5]);
|
|
}
|
|
void CDlgDeviceMain::OnBnClickedModuleChildViewBtn7()
|
|
{
|
|
gLogMgr->WriteDebugLog("Func---->OnBnClickedModuleChildViewBtn7");
|
|
SetActiveView(m_ModuleChildViewVec[6]);
|
|
}
|
|
void CDlgDeviceMain::OnBnClickedModuleChildViewBtn8()
|
|
{
|
|
gLogMgr->WriteDebugLog("Func---->OnBnClickedModuleChildViewBtn8");
|
|
SetActiveView(m_ModuleChildViewVec[7]);
|
|
}
|
|
void CDlgDeviceMain::OnBnClickedModuleChildViewBtn9()
|
|
{
|
|
gLogMgr->WriteDebugLog("Func---->OnBnClickedModuleChildViewBtn9");
|
|
SetActiveView(m_ModuleChildViewVec[8]);
|
|
}
|
|
void CDlgDeviceMain::OnBnClickedModuleChildViewBtn10()
|
|
{
|
|
gLogMgr->WriteDebugLog("Func---->OnBnClickedModuleChildViewBtn10");
|
|
SetActiveView(m_ModuleChildViewVec[9]);
|
|
}
|
|
void CDlgDeviceMain::OnBnClickedModuleChildViewBtn11()
|
|
{
|
|
gLogMgr->WriteDebugLog("Func---->OnBnClickedModuleChildViewBtn11");
|
|
SetActiveView(m_ModuleChildViewVec[10]);
|
|
}
|
|
void CDlgDeviceMain::OnBnClickedModuleChildViewBtn12()
|
|
{
|
|
gLogMgr->WriteDebugLog("Func---->OnBnClickedModuleChildViewBtn12");
|
|
SetActiveView(m_ModuleChildViewVec[11]);
|
|
}
|
|
|
|
|
|
|
|
|
|
#endif
|
|
#if 1
|
|
#define PCS_TEST_FUNC1 "test 入口"
|
|
#define PCS_TEST_FUNC2 "Init Port1 Wafer State"
|
|
#define PCS_TEST_FUNC3 "Init Port2 Wafer State"
|
|
#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 "xxxxxxxxxxxxx"
|
|
#define PCS_TEST_FUNC13 "AREA编辑"
|
|
#define PCS_TEST_FUNC14 "xxxxxxxxxxxxx"
|
|
#define PCS_TEST_FUNC15 "xxxxxxxxxxxxx"
|
|
#define PCS_TEST_FUNC16 "xxxxxxxxxxxxx"
|
|
|
|
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);
|
|
}
|
|
//调试功能
|
|
void CDlgDeviceMain::OnBnClickedPcsTestBtn()
|
|
{
|
|
if(gAuthorityMgr->CheckAuthority(_Authority_Factory,true)==false)
|
|
return;
|
|
if(!UpdateData(TRUE))
|
|
return;
|
|
|
|
vector<double> DBValVec;
|
|
CFileMgr FileMgr;
|
|
FileMgr.GetDoubleVal(m_TestStr1,DBValVec);
|
|
|
|
CString CombStr;
|
|
GetDlgItem(IDC_PCS_TEST_COMBO)->GetWindowText(CombStr);
|
|
if(CombStr==PCS_TEST_FUNC1)
|
|
{
|
|
ShowWindow(SW_HIDE);
|
|
}
|
|
if(CombStr==PCS_TEST_FUNC2)
|
|
{
|
|
}
|
|
if(CombStr==PCS_TEST_FUNC3)
|
|
{
|
|
|
|
}
|
|
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)
|
|
{
|
|
|
|
}
|
|
if(CombStr==PCS_TEST_FUNC13)
|
|
{
|
|
|
|
}
|
|
if(CombStr==PCS_TEST_FUNC14)
|
|
{
|
|
|
|
}
|
|
if(CombStr==PCS_TEST_FUNC15)
|
|
{
|
|
|
|
}
|
|
if(CombStr==PCS_TEST_FUNC16)
|
|
{
|
|
|
|
}
|
|
}
|
|
#endif
|
|
|
|
void CDlgDeviceMain::OnBnClickedCloseAppBtn()
|
|
{
|
|
if(!gAuthorityMgr->CheckAuthorityByName("AUTHORITY_CloseApp",true))
|
|
return;
|
|
gProgramLaserTuiHuo->CloseAppBySysMsg();
|
|
}
|
|
void CDlgDeviceMain::OnBnClickedConfigBtn()
|
|
{
|
|
gLogMgr->WriteDebugLog("Func---->OnBnClickedReStatrBtn");
|
|
|
|
gProgramLaserTuiHuo->ReStartApp();
|
|
}
|
|
|
|
void CDlgDeviceMain::OnBnClickedShowWindowMinBtn()
|
|
{
|
|
gLogMgr->WriteDebugLog("Func---->OnBnClickedShowWindowMinBtn");
|
|
GetFrame()->ShowWindowMin();
|
|
}
|
|
//用户管理
|
|
void CDlgDeviceMain::OnBnClickedUserMgrBtn()
|
|
{
|
|
gLogMgr->WriteDebugLog("Func---->OnBnClickedUserMgrBtn");
|
|
if(!gAuthorityMgr->CheckAuthorityByName("AUTHORITY_UserEdit",true))
|
|
return;
|
|
CDlgAuthorityAccount dlg;
|
|
dlg.DoModal();
|
|
}
|
|
//登录界面
|
|
void CDlgDeviceMain::OnBnClickedLoginBtn()
|
|
{
|
|
gLogMgr->WriteDebugLog("Func---->OnBnClickedLoginBtn");
|
|
CDlgAuthorityLogin dlg;
|
|
dlg.DoModal();
|
|
}
|
|
void CDlgDeviceMain::OnBnClickedLogoBtn()
|
|
{
|
|
|
|
}
|
|
|