mrDarker
2025-08-06 2379434200219132ee252f12d47a1e5efd160f42
EdgeInspector_App/MainFrm.cpp
@@ -1,5 +1,5 @@
// MainFrm.cpp : CMainFrame 努贰胶狼 备泅

// MainFrm.cpp : CMainFrame 努贰胶狼 备泅
//
#include "stdafx.h"
@@ -29,7 +29,7 @@
   ON_WM_GETMINMAXINFO()
END_MESSAGE_MAP()
// CMainFrame 积己/家戈
// CMainFrame 积己/家戈
CMainFrame::CMainFrame()
{
@@ -77,10 +77,10 @@
   return TRUE;
}
// CMainFrame 皋矫瘤 贸府扁
// CMainFrame 皋矫瘤 贸府扁
void CMainFrame::OnGetMinMaxInfo(MINMAXINFO* lpMMI)
{
   // TODO: 咯扁俊 皋矫瘤 贸府扁 内靛甫 眠啊 棺/肚绰 扁夯蔼阑 龋免钦聪促.
   // TODO: 咯扁俊 皋矫瘤 贸府扁 内靛甫 眠啊 棺/肚绰 扁夯蔼阑 龋免钦聪促.
   //CFrameWndEx::OnGetMinMaxInfo(lpMMI);
   lpMMI->ptMinTrackSize.x = TOTAL_WINDOW_SIZE_X;
@@ -90,7 +90,7 @@
   lpMMI->ptMaxTrackSize.y = TOTAL_WINDOW_SIZE_Y;
}
// CMainFrame 柳窜
// CMainFrame 柳窜
#ifdef _DEBUG
void CMainFrame::AssertValid() const
@@ -105,7 +105,7 @@
#endif //_DEBUG
// CMainFrame 皋矫瘤 贸府扁
// CMainFrame 皋矫瘤 贸府扁
void CMainFrame::SetView(CEdgeInspector_AppView   *pView)
{
   m_pView = pView;
@@ -200,7 +200,7 @@
   if (PathFileExists(strExePath) && PathFileExists(strConfigPath)) {
      LPCTSTR pszExeName = PathFindFileName(strExePath);
      // 去掉 .exe,并杀死进程
      // 去掉 .exe,并杀死进程
      TCHAR szNameWithoutExt[MAX_PATH] = { 0 };
      _tcscpy_s(szNameWithoutExt, pszExeName);
      PathRemoveExtension(szNameWithoutExt);
@@ -220,7 +220,7 @@
   if (PathFileExists(strExePath) && PathFileExists(strConfigPath)) {
      LPCTSTR pszExeName = PathFindFileName(strExePath);
      // 去掉 .exe,并杀死进程
      // 去掉 .exe,并杀死进程
      TCHAR szNameWithoutExt[MAX_PATH] = { 0 };
      _tcscpy_s(szNameWithoutExt, pszExeName);
      PathRemoveExtension(szNameWithoutExt);
@@ -307,7 +307,7 @@
{
   m_strReserveRecipe.Empty();
   if(!IsScanNow())      // 八荤 吝
   if(!IsScanNow())      // 八荤 吝
   {            
      if(LoadGlassRecipe(strRecipe,TRUE) == TRUE)
      {
@@ -331,8 +331,7 @@
BOOL CMainFrame::IV2M_SaveFullImage(CString strPath,int iSide,CPoint ptStart,int nLength)
{
   if(IsScanNow())
   {
   if(IsScanNow()) {
      g_pLog->DisplayMessage(_T("Doing Inspection"));
      return TRUE;
   }
@@ -341,7 +340,7 @@
   //SetSlashText(GLOBAL_DEFINE::emText, _T("Image Save Start"), RGB(0,0,0));
   BOOL bRet = SaveFullImage(strPath,iSide,ptStart,nLength);
   BOOL bRet = SaveFullImage(strPath, iSide, ptStart, nLength);
   SetSlashText(GLOBAL_DEFINE::emText, strPath, RGB(0,0,0));
@@ -511,7 +510,7 @@
   g_pBase->m_eProcessMode = PROC_MODE_SIMULATION_ONESIDE;
   m_eManualInspectSide = eDim;
   // 烙矫肺 阜澜
   // 烙矫肺 阜澜
   //return TRUE;
   AfxBeginThread(ManualInspectProcess,this);
@@ -551,20 +550,18 @@
BOOL CMainFrame::IV2M_SetLiveGrabCommand(DimensionDir eDim,BOOL bStop)
{
   if (IsScanNow())
   {
   if (IsScanNow()) {
      g_pLog->DisplayMessage(_T("Doing Inspection"));
      return TRUE;
   }
   // 4/13 MiniLED
   if(eDim < DIMENSION_A || eDim > DIMENSION_D)
   if (eDim < DIMENSION_A || eDim > DIMENSION_D_RIP) {
      return FALSE;
   }
   g_pLog->DisplayMessage(_T("Live Cam %d Start : Main"),(int)eDim);   
   BOOL bRet = SetLiveGrabCommand(eDim,bStop);
   g_pLog->DisplayMessage(_T("Live Cam %d End : Main"),(int)eDim);
   return bRet;
@@ -572,16 +569,18 @@
LPBYTE CMainFrame::IV2M_GetGrabBufferByDimension(DimensionDir eDim,int iVline)
{
   //    if(IsScanNow())
   //    {
   //       g_pLog->DisplayMessage(_T("Doing Inspection"));
   //       return NULL;
   //    }
   //if (IsScanNow()) {
   //   g_pLog->DisplayMessage(_T("Doing Inspection"));
   //   return NULL;
   //}
   if(eDim < DIMENSION_A || eDim > DIMENSION_D_DN)
   if (eDim < DIMENSION_A || eDim > DIMENSION_D_RIP) {
      return NULL;
   if(iVline < 0)
   }
   if (iVline < 0) {
      return NULL;
   }
   return GetGrabBuffer(eDim,iVline);
}
@@ -613,7 +612,6 @@
#ifndef _DEBUG
      SetSlashText(GLOBAL_DEFINE::emShow, _T(""), RGB(0,0,0));
#endif
      SetSlashText(GLOBAL_DEFINE::emText, _T("Image Loading Start"), RGB(0,0,0));
      if(iSide > -1)