#pragma once
|
|
#include "btnenh.h"
|
#include "General_Draw.h"
|
#include "FrameImg.h"
|
#include "Global_Define.h"
|
#include "ViewRecipeInspectionView.h"
|
#include "ViewRecipeProfileView.h"
|
#include "ViewRecipeChamferView.h"
|
|
// CViewRecipeSetting ´ëÈ »óÀÚÀÔ´Ï´Ù.
|
|
class CHardwareLightSettings;
|
class CGlassRecipe;
|
class CGlass_Data;
|
class CViewRecipeList;
|
class CViewUserDefectArea;
|
class CViewException;
|
class CViewLampControl;
|
class CViewRecipeSetting : public CDialogEx
|
,public IUserDefectInterface2Parent
|
, public IHoleRecipeView2Parent
|
, public IInspectRecipeView2Parent
|
{
|
DECLARE_DYNAMIC(CViewRecipeSetting)
|
|
public:
|
CViewRecipeSetting(CWnd* pParent = NULL); // Ç¥ÁØ »ý¼ºÀÚÀÔ´Ï´Ù.
|
virtual ~CViewRecipeSetting();
|
|
// ´ëÈ »óÀÚ µ¥ÀÌÅÍÀÔ´Ï´Ù.
|
enum { IDD = IDD_DLG_RECIPE_VIEW };
|
|
protected:
|
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV Áö¿øÀÔ´Ï´Ù.
|
virtual BOOL OnInitDialog();
|
virtual BOOL PreTranslateMessage(MSG* pMsg);
|
LRESULT OnProcessStatus(WPARAM wParam, LPARAM lParam);
|
afx_msg void OnPaint();
|
afx_msg void OnShowWindow(BOOL bShow, UINT nStatus);
|
afx_msg void OnHScroll(UINT nSBCode, UINT nPos, CScrollBar* pScrollBar);
|
afx_msg void OnVScroll(UINT nSBCode, UINT nPos, CScrollBar* pScrollBar);
|
afx_msg void OnNMCustomdrawSliderZoom2(NMHDR *pNMHDR, LRESULT *pResult);
|
afx_msg void OnNMReleasedcaptureSliderZoom2(NMHDR *pNMHDR, LRESULT *pResult);
|
afx_msg BOOL OnMouseWheel(UINT nFlags, short zDelta, CPoint pt);
|
afx_msg LRESULT OnSelectRecipe(WPARAM wParam, LPARAM lParam);
|
LRESULT OnLightApplyRecipe(WPARAM wParam, LPARAM lParam);
|
LRESULT OnAreaModify(WPARAM wParam, LPARAM lParam);
|
LRESULT OnAreaChange(WPARAM wParam, LPARAM lParam);
|
DECLARE_MESSAGE_MAP()
|
DECLARE_EVENTSINK_MAP()
|
|
protected:
|
CBtnEnh m_ctrlRecipeName,m_ctrlRecipList,m_ctrlRecipeComment;
|
IVisionEvent *m_pVisionEvent = nullptr;
|
|
public:
|
void SetRecipe(CHardwareSettings *pHW,CGlassRecipe *pRecipe);
|
void SetV2M(IViewInterface2Parent* pV2M);
|
void SetGlassData(CGlass_Data *pGlass);
|
void ViewRefresh(PROG_MSG ProcMsg);
|
void InitView();
|
|
static void onMsgVisionEvent(int code, int eDir);
|
static void onMsgLogEvent(int level, std::string strText);
|
void DispAllResult(void);
|
void SetFrameRegion(void);
|
|
protected:
|
enum eViewSelect {eRcp_Inspection=0, eRcp_Profile, eRcp_Chamfer, eRcp_End};
|
CBtnEnh m_ctrlCmdSelect[eRcp_End];
|
|
void ClickChkSelectlButton();
|
void SetButtonSelectEnableAll(const BOOL& bEnable);
|
void SetButtonSelectSel(eViewSelect eSelView, BOOL bEnable);
|
void ChangeRcpView(UINT nID);
|
void ChangeSelectView(UINT nViewID);
|
|
void ClickImgLoadButton();
|
void ClickImgSaveButton();
|
void ClickInitProcessButton();
|
void ClickInspectProcessButton();
|
void ClickRecipeSaveButton();
|
void ClickRecipeListButton();
|
void OnBnClickedBtnUserDefect();
|
void OnBnClickedBtnExpRegion();
|
void OnBnClickedBtnLightControl();
|
void OnClickButtonLang();
|
|
protected:
|
virtual void IU2P_DrawRect(BOOL bSet);
|
virtual CRect IU2P_GetCompareRect();
|
virtual void IU2P_DrawRefresh();
|
|
virtual void IE2P_SetExpArea(int iSide);
|
virtual POINT IE2P_GetFrameViewBasepoint();
|
virtual void IE2P_SetExpAreaTrackerReset();
|
virtual void IE2P_SetExpAreaDlgClose();
|
|
virtual BOOL IHoleRecipe2RecipeView_AddHoleArea(int& nSideIdx, CRect& rtArea);
|
virtual BOOL IHoleRecipe2RecipeView_GetHoleAreaImage(int nHoleIdx, IplImage** pImageBuffer);
|
virtual void IHoleRecipe2RecipeView_UpdateFrameView();
|
virtual void IHoleRecipe2RecipeView_SaveRecipe();
|
virtual BOOL IHoleRecipe2RecipeVIew_HoleInspectProcess(int nHoleIdx, IplImage** pImageBuffer);
|
virtual int IHoleRecipe2RecipeView_GetCurrentSetSide();
|
|
virtual BOOL IInspectRecipe2RecipeView_SetMarker(int nPos,int nMarkPos);
|
virtual void IInspectRecipe2RecipeView_SetMarkerPos(int nOff_X,int nOff_Y);
|
virtual void IInspectRecipe2RecipeView_ModifyMarker(BOOL bModify);
|
virtual void IInspectRecipe2RecipeView_ChangeSide(int iSide);
|
|
protected:
|
void InitScrollInfo(BOOL bInitPos = FALSE);
|
void UpdateZoom();
|
|
BOOL LoadLinkFile(CString strFilePath);
|
void DeleteVectorList();
|
BOOL WriteLinkFile(CString strFilePath);
|
void ChangeRecipe();
|
BOOL ReadRecipe(CString strRecipe);
|
|
protected:
|
CvPoint2D32f Get_MarkCenter(IplImage *IpScr,CvRect roi,int nMode,int nOffSet = 20);
|
CvRect Get_MaxPattern(IplImage *IpScr,CvRect roi,int nMode,int nOffSet = 20);
|
|
protected:
|
CHardwareSettings *m_pHardware;
|
CGlassRecipe *m_pRecipe;
|
CGlassRecipe *m_pDlgRecipe;
|
CGlass_Data *m_pGlassData;
|
CViewRecipeList *m_pViewRecipeList;
|
CViewUserDefectArea *m_pViewUserDefect;
|
CViewException *m_pViewExpArea;
|
CViewLampControl *m_pviewLightControl;
|
CViewRecipeInspectionView *m_pViewRecipeInspection;
|
CViewRecipeProfileView *m_pViewRecipeProfile;
|
CViewRecipeChamferView *m_pViewRecipeChamfer;
|
BOOL m_bShowExpArea;
|
|
VectorLinkList m_VectorLinkList;
|
IViewInterface2Parent *m_IV2M;
|
|
|
double m_dZoom;
|
CFrameImg m_frameImg;
|
CRect m_rcFrameImg;
|
CScrollBar m_ctrlScrollV,m_ctrlScrollH;
|
CSliderCtrl m_sliderZoom;
|
CString m_strRecipeName,m_strPPIDName;
|
|
CDialogEx* m_pVisionSetDlg;
|
|
int m_nCndRDSide;
|
int m_nCndSelect;
|
public:
|
void ClickButtonVisionSet();
|
};
|