From 6087507f5c9445055a38f7b861e40a22e82d3316 Mon Sep 17 00:00:00 2001
From: mrDarker <mr.darker@163.com>
Date: 星期五, 25 七月 2025 16:09:29 +0800
Subject: [PATCH] 1. ProfileInspect单独使用坐标转换参数,与全局的区分开。如果ProfileInspect没有设置,那么默认使用全局的

---
 ENRIT/View/ViewRecipeProfileView.cpp |   64 ++++++++++++++++++-------------
 1 files changed, 37 insertions(+), 27 deletions(-)

diff --git a/ENRIT/View/ViewRecipeProfileView.cpp b/ENRIT/View/ViewRecipeProfileView.cpp
index 1877287..50214a1 100644
--- a/ENRIT/View/ViewRecipeProfileView.cpp
+++ b/ENRIT/View/ViewRecipeProfileView.cpp
@@ -6,6 +6,7 @@
 #include "ViewRecipeProfileView.h"
 #include "afxdialogex.h"
 #include "Global_Define.h"
+#include "DlgCoordinateConvert.h"
 
 // CViewRecipeProfileView 措拳 惑磊涝聪促.
 
@@ -147,17 +148,15 @@
 	CDialogEx::DoDataExchange(pDX);
 }
 
-
 BEGIN_MESSAGE_MAP(CViewRecipeProfileView, CDialogEx)
 	ON_WM_SHOWWINDOW()
 END_MESSAGE_MAP()
 
 BEGIN_EVENTSINK_MAP(CViewRecipeProfileView, CDialogEx)
-	
+	ON_EVENT(CViewRecipeProfileView, IDC_BTN_PROFILE_TEST_RUN, DISPID_CLICK, CViewRecipeProfileView::ClickChkButProfileTestRun, VTS_NONE)
+	ON_EVENT(CViewRecipeProfileView, IDC_BTN_PROFILE_COORDINATE_CONVERT, DISPID_CLICK, CViewRecipeProfileView::ClickChkButCoordinateConvert, VTS_NONE)
 	ON_EVENT(CViewRecipeProfileView, IDC_BTN_PROFILE_MAKECAD, DISPID_CLICK, CViewRecipeProfileView::ClickChkButMakeCAD, VTS_NONE)
 	ON_EVENT(CViewRecipeProfileView, IDC_BTN_PROFILE_APPLY, DISPID_CLICK, CViewRecipeProfileView::ClickChkButProfileApplay, VTS_NONE)
-	ON_EVENT(CViewRecipeProfileView, IDC_BTN_PROFILE_TEST_RUN, DISPID_CLICK, CViewRecipeProfileView::ClickChkButProfileTestRun, VTS_NONE)
-
 END_EVENTSINK_MAP()
 
 BOOL CViewRecipeProfileView::OnInitDialog()
@@ -218,6 +217,36 @@
 	}
 
 	return CDialog::PreTranslateMessage(pMsg);
+}
+
+void CViewRecipeProfileView::ClickChkButProfileTestRun()
+{
+	if (m_pProfileProc == NULL)
+		return;
+
+	CString			str = _T("C:\\RCutProject\\Profile\\TEST5_B.prf");
+
+	m_pProfileProc->ReadProfileData(str);
+
+	CPoint		ptFirst, ptSecond;
+
+	ptFirst = CPoint(2160, 32512);
+	ptSecond = CPoint(2186, 66030);
+
+	//m_pProfileProc->RotateProfileData(ptFirst,ptSecond);
+}
+
+void CViewRecipeProfileView::ClickChkButCoordinateConvert()
+{
+	if (m_pProfileProc == NULL || m_pDlgRecipe == NULL) {
+		return;
+	}
+
+	CDlgCoordinateConvert dlg;
+	dlg.SetRecipe(m_pDlgRecipe);
+	if (dlg.DoModal() == IDOK) {
+		g_pLog->DisplayMessage(_T("User applied coordinate conversion!"));
+	}
 }
 
 void CViewRecipeProfileView::ClickChkButMakeCAD()
@@ -307,6 +336,10 @@
 	SetSlashText(GLOBAL_DEFINE::emHide, _T(""), RGB(0,0,0));
 }
 
+void CViewRecipeProfileView::ClickChkButProfileApplay()
+{
+	UpdateData(TRUE);
+}
 
 void CViewRecipeProfileView::OnShowWindow(BOOL bShow, UINT nStatus)
 {
@@ -314,29 +347,6 @@
 	{
 		UpdateData(FALSE);				
 	}
-}
-
-void CViewRecipeProfileView::ClickChkButProfileApplay()
-{
-	UpdateData(TRUE);
-}
-
-void CViewRecipeProfileView::ClickChkButProfileTestRun()
-{
-	if(m_pProfileProc == NULL)
-		return;
-
-	CString			str=_T("C:\\RCutProject\\Profile\\TEST5_B.prf");
-
-	m_pProfileProc->ReadProfileData(str);
-
-	CPoint		ptFirst,ptSecond;
-
-	ptFirst = CPoint(2160,32512);
-	ptSecond = CPoint(2186,66030);
-
-	//m_pProfileProc->RotateProfileData(ptFirst,ptSecond);
-
 }
 
 void CViewRecipeProfileView::SetRecipe(CHardwareSettings *pHW,CGlassRecipe *pRecipe)

--
Gitblit v1.9.3