JonYang 1 giorno fa
parent
commit
a6141fe4d3
42 ha cambiato i file con 2781 aggiunte e 15 eliminazioni
  1. 3 0
      .gitignore
  2. BIN
      Output/bin/x64/Control.dll
  3. BIN
      Output/bin/x64/Control.pdb
  4. BIN
      Output/bin/x64/JVisionLib.dll
  5. BIN
      Output/bin/x64/Module.dll
  6. BIN
      Output/bin/x64/Module.pdb
  7. BIN
      Output/bin/x64/configurations.db
  8. BIN
      Output/config/db/ModuleConfig.db
  9. BIN
      Output/dll/x64/Control.dll
  10. BIN
      Output/dll/x64/JVisionLib.dll
  11. BIN
      Output/dll/x64/Module.dll
  12. 6 2
      Output/inc/Control/CRunButton.h
  13. 2 0
      Output/inc/Control/CViewInterface.h
  14. 9 1
      Output/inc/Control/CViewMatrix.h
  15. 5 0
      Output/inc/Module/CBondMatrix.h
  16. 2 1
      Output/inc/Module/CPrStrategy.h
  17. 8 2
      Output/inc/Module/CProduct.h
  18. 2 0
      Output/inc/Module/CWaferTable.h
  19. 3 3
      Output/inc/Module/CWafflePackMatrix.h
  20. 1 1
      Output/inc/Module/ILocalizationManager.h
  21. 4 2
      Output/inc/Module/IPicOperate.h
  22. BIN
      Output/lib/x64/Common.lib
  23. BIN
      Output/lib/x64/Control.lib
  24. BIN
      Output/lib/x64/JVisionLib.lib
  25. BIN
      Output/lib/x64/Module.lib
  26. 57 2
      View/die-bonder-ui/OriginalWnd/DbTreeViewManager.cpp
  27. 5 0
      View/die-bonder-ui/OriginalWnd/DbTreeViewManager.h
  28. 13 0
      View/die-bonder-ui/SBTdie-bonder-ui.vcxproj
  29. 39 1
      View/die-bonder-ui/SBTdie-bonder-ui.vcxproj.filters
  30. 33 0
      View/die-bonder-ui/Src/BondMatrixProgramPage.cpp
  31. 78 0
      View/die-bonder-ui/Src/BondMatrixProgramPage.h
  32. 22 0
      View/die-bonder-ui/Src/BondMatrixProgramPage.ui
  33. 952 0
      View/die-bonder-ui/Src/ProgrammPage.cpp
  34. 74 0
      View/die-bonder-ui/Src/ProgrammPage.h
  35. 819 0
      View/die-bonder-ui/Src/ProgrammPage.ui
  36. 43 0
      View/die-bonder-ui/Src/RewriteControl/Controls/DoubleSpinBox.cpp
  37. 23 0
      View/die-bonder-ui/Src/RewriteControl/Controls/DoubleSpinBox.h
  38. 42 0
      View/die-bonder-ui/Src/RewriteControl/Controls/SpinBox.cpp
  39. 22 0
      View/die-bonder-ui/Src/RewriteControl/Controls/SpinBox.h
  40. 414 0
      View/die-bonder-ui/Src/WaffleProgramPage.cpp
  41. 56 0
      View/die-bonder-ui/Src/WaffleProgramPage.h
  42. 44 0
      View/die-bonder-ui/Src/WaffleProgramPage.ui

+ 3 - 0
.gitignore

@@ -26,3 +26,6 @@
 /Output/bin/x64/SBTdie-bonder-ui.ilk
 /View/die-bonder-ui/ui_SpeedAdjWnd.h
 /View/die-bonder-ui/ui_SpeedAdjPage.h
+/View/die-bonder-ui/ui_BondMatrixProgramPage.h
+/View/die-bonder-ui/ui_ProgrammPage.h
+/View/die-bonder-ui/ui_WaffleProgramPage.h

BIN
Output/bin/x64/Control.dll


BIN
Output/bin/x64/Control.pdb


BIN
Output/bin/x64/JVisionLib.dll


BIN
Output/bin/x64/Module.dll


BIN
Output/bin/x64/Module.pdb


BIN
Output/bin/x64/configurations.db


BIN
Output/config/db/ModuleConfig.db


BIN
Output/dll/x64/Control.dll


BIN
Output/dll/x64/JVisionLib.dll


BIN
Output/dll/x64/Module.dll


+ 6 - 2
Output/inc/Control/CRunButton.h

@@ -87,7 +87,9 @@ namespace ns_module
 			REGISTER_FUNCTION(Machine_SaveConfig),
 			REGISTER_FUNCTION(UltraHead_XY_Test),
 			REGISTER_FUNCTION(Machine_LoadConfig),
-			REGISTER_FUNCTION(Machine_SingnedBond),
+			REGISTER_FUNCTION(Machine_Wafer2Transfer),
+			REGISTER_FUNCTION(Machine_Waffle2Transfer),
+			REGISTER_FUNCTION(Machine_Transfer2BondTable),
 			REGISTER_FUNCTION(Machine_SingnedRun),
 			REGISTER_FUNCTION(BondHead_AccuracyTest),
 			REGISTER_FUNCTION(SaveDB),
@@ -172,7 +174,9 @@ namespace ns_module
 		long Machine_SaveConfig(ST_BUTTON_FUN stInfo);
 		long UltraHead_XY_Test(ST_BUTTON_FUN stInfo);
 		long Machine_LoadConfig(ST_BUTTON_FUN stInfo);
-		long Machine_SingnedBond(ST_BUTTON_FUN stInfo);
+		long Machine_Wafer2Transfer(ST_BUTTON_FUN stInfo);
+		long Machine_Waffle2Transfer(ST_BUTTON_FUN stInfo);
+		long Machine_Transfer2BondTable(ST_BUTTON_FUN stInfo);
 		long Machine_SingnedRun(ST_BUTTON_FUN stInfo);
 		long BondHead_AccuracyTest(ST_BUTTON_FUN stInfo);
 		long SaveDB(ST_BUTTON_FUN stInfo);

+ 2 - 0
Output/inc/Control/CViewInterface.h

@@ -102,6 +102,8 @@ namespace ns_module
 		//执行按钮命令
 		long RunButton(ST_BUTTON_FUN stInfo);
 
+		//仅供测试使用
+		long TestButton(ST_BUTTON_FUN stInfo);
 #pragma endregion
 	};
 

+ 9 - 1
Output/inc/Control/CViewMatrix.h

@@ -122,9 +122,10 @@ namespace ns_module
 		/// <summary>
 		/// 从底层获取模板图片
 		/// </summary>
+		/// <param name="iDieIndex"></param>
 		/// <param name="image">获取到的图片</param>
 		/// <returns>成功返回0,否则返回错误码</returns>
-		long GetBondRefImage(ImageInfo& image);
+		long GetBondRefImage(int iDieIndex,ImageInfo& image);
 
 		/// <summary>
 		/// 设置矩形边界
@@ -138,6 +139,13 @@ namespace ns_module
 		/// <returns></returns>
 		long SetBondRectBorder(int nPackMatrixId, int nDieMatrixId, int row1, int col1, int row2, int col2);
 
+		/**设置当前所有圆晶信息,菜单选中拖拽
+		* 这里分2种情况
+		*	1.点击一个发送当前选中的贴片信息(鼠标左键点击)
+		*	2.2个点确定一个矩形(可以选中多个贴片)(右键菜单选择)
+		*	3.鼠标左键按住不松开拖拽多个贴片(例:界面显示三个组合,三个组合都可以选中,(1,2都是一样))(拖拽)
+		 */
+		long SetBondAllSelectPointInfo(std::vector<POINT_INFO_STRUCT>& stPointInfo);
 
 #pragma endregion
 

+ 5 - 0
Output/inc/Module/CBondMatrix.h

@@ -101,6 +101,9 @@ namespace ns_mat
 		bool bAlnStatus;					//对点状态,是否已对点
 		bool bIsCheck;						//是否固后检测完成
 
+		XY_DOUBLE_STRUCT stPcbLeftTop;		//PCB矩阵左上角坐标(界面用)
+		XY_DOUBLE_STRUCT stPtLeftTop;		//PT矩阵左上角坐标(界面用)
+
 		X_Y_ANGLE_STRUCT stLookUpOffset;	//上视拍照偏差结果
 		XY_DOUBLE_STRUCT stSetBondPosition;	//程序设置的固晶位置
 		XY_DOUBLE_STRUCT stAlnBondPosition;	//对点后的固晶位置
@@ -115,6 +118,8 @@ namespace ns_mat
 			bPickStatus = NO_PICK;
 			bAlnStatus = false;
 			bIsCheck = false;
+			stPcbLeftTop = 0;
+			stPtLeftTop = 0;
 			stSetBondPosition = 0;
 			stAlnBondPosition = 0;
 			dAlnAngle = 0;

+ 2 - 1
Output/inc/Module/CPrStrategy.h

@@ -101,7 +101,8 @@ namespace ns_pr
          */
         LONG CreatePrStrategy(vector<UINT> vecTemplateId);
 
-        static LONG EditTemplate(UINT iTemplateId);
+        static LONG GetPrMethodByTemplate(UINT iId,UINT &iPrMethod);
+        static LONG EditTemplate(UINT iId);
     };
 
 }

+ 8 - 2
Output/inc/Module/CProduct.h

@@ -286,15 +286,17 @@ namespace ns_db
 
 
 
-#pragma region Program_DieMatrix 用于wafer
+#pragma region Program_DieMatrix 用于wafer 和 waffle
 	private:
 		std::vector<PROGRAM_DIE_MATRIX_STRUCT> m_VecDieMatrix;
 		//加载用户编程数据表
 		LONG LoadDieMatrix();
+		LONG SaveDieMatrix();
 	public:
 		LONG GetDieMatrix(UINT nModuleId, std::vector<PROGRAM_DIE_MATRIX_STRUCT>& vecDieMatrix);
 		LONG GetDieMatrix(UINT iMatrixId, PROGRAM_DIE_MATRIX_STRUCT& stDieMatrix);
 		LONG SetDieMatrix(std::vector<PROGRAM_DIE_MATRIX_STRUCT> stDieMatrix, bool bAppend = false);
+		LONG DeleteDieMatrix(int matrixId);
 
 
 #pragma endregion
@@ -318,8 +320,12 @@ namespace ns_db
 		std::vector<PROGRAM_WAFFLE_MATRIX_STRUCT> m_VecWaffleMatrix;
 		//加载用户编程数据表
 		LONG LoadWaffleMatrix();
+		LONG SaveWaffleMatrix();
 	public:
 		std::vector<PROGRAM_WAFFLE_MATRIX_STRUCT> GetWaffleMatrix() { return m_VecWaffleMatrix; };
+		LONG SetWaffleMatrix(int id, PROGRAM_WAFFLE_MATRIX_STRUCT matrix);
+		LONG AddWaffleMatrix(PROGRAM_WAFFLE_MATRIX_STRUCT newMatrix, int& newId);
+		LONG DeleteWaffleMatrix(int matrixID);
 
 #pragma endregion
 
@@ -337,7 +343,7 @@ namespace ns_db
 
 #pragma endregion
 
-#pragma region Program_PointMatrix 表
+#pragma region Program_PointMatrix 表  用于Bond
 	private:
 		std::vector<PROGRAM_POINT_MATRIX_STRUCT> m_VecPointMatrix;
 		//加载用户编程数据表

+ 2 - 0
Output/inc/Module/CWaferTable.h

@@ -48,6 +48,7 @@ class __declspec(dllexport) CWaferTable :  public CModule
 
         UINT DieLong;                               //晶片长 um
         UINT DieWide;                               //晶片宽 um
+        DOUBLE RingAngle;                           //晶环当前角度
 
         X_Y_Z_R_STRUCT SafePosition;                //安全位置
         X_Y_Z_R_STRUCT DownRingPosition;            //上、下晶环位置
@@ -106,6 +107,7 @@ public:
     LONG CreateTemplate(SEARCH_OUT eResultSelect, UINT& iTemplateId);
     LONG CreatePrStrategy(vector<UINT> vecTemplateId);
     UINT GetDieTemplateId() { return m_stConfig.TemplateId; };
+    DOUBLE GetRingAngle() { return m_stConfig.RingAngle; };
 private:
     CAxis* m_pXAxis = nullptr;
     CAxis* m_pYAxis = nullptr;

+ 3 - 3
Output/inc/Module/CWafflePackMatrix.h

@@ -31,7 +31,7 @@ namespace ns_mat
 	{
 		UINT iCurrentBondIndex;			//当前点
 		UINT iBondAmount;				//Die总数
-		vector <WAFFLE_MATRIX_POINT_STRUCT> vetWaffleMatrix;
+		vector <WAFFLE_MATRIX_POINT_STRUCT> vetPoints;
 	} WAFFLE_MATRIX_INFO_STRUCT; //固晶点
 
 	class WAFFLE_PACK_DLL_API CWafflePackMatrix
@@ -71,8 +71,8 @@ namespace ns_mat
 
 		CProduct* m_pCProduct = nullptr; //产品数据库
 
-		vector<PROGRAM_WAFFLE_MATRIX_STRUCT> m_vetWaffleMatrix;
-		map<int, WAFFLE_MATRIX_INFO_STRUCT> m_mapWaffleMatrixInfo;
+		std::vector<PROGRAM_WAFFLE_MATRIX_STRUCT> m_vetWaffleMatrix;
+		std::map<int, WAFFLE_MATRIX_INFO_STRUCT> m_mapWaffleMatrixInfo;//保存所有的点
 
 	private:
 		void SortDir_Z();

+ 1 - 1
Output/inc/Module/ILocalizationManager.h

@@ -67,7 +67,7 @@ namespace JVision
 
 		/**
 		 * @brief 获取算法
-		 * @param index[in] 算法索引
+		 * @param[in] index 算法索引
 		 *
 		 * @return 算法
 		 */

+ 4 - 2
Output/inc/Module/IPicOperate.h

@@ -54,13 +54,15 @@ namespace JVision
 		/**
 		 * @brief 获取模板图像
 		 *
-		 * @param[in] index 方案索引
+		 * @param[in] rootDir	方案所在的根目录
+		 * @param[in] index		方案的索引号
 		 * @param[out] imageOut 传出JVisison图像结构体的数组
 		 * @return ResultCode        0表示成功 其余表示失败
 		 *
 		 * @note 对应的错误码类型可以通过ExecuteErrorCode中接口获取失败信息
 		 */
-		virtual JVision::ResultCode GetModelImage(int index,
+		virtual JVision::ResultCode GetModelImage(const std::string& rootDir,
+			const int index,
 			std::vector<JVision::ImageInfo>& imageOut) = 0;
 
 		/**

BIN
Output/lib/x64/Common.lib


BIN
Output/lib/x64/Control.lib


BIN
Output/lib/x64/JVisionLib.lib


BIN
Output/lib/x64/Module.lib


+ 57 - 2
View/die-bonder-ui/OriginalWnd/DbTreeViewManager.cpp

@@ -120,6 +120,8 @@ void DbTreeViewManager::Init()
     m_sqlOper       = &SqlOperation::GetInstance();
 
     m_pTreeCViewInterface = ns_module::CViewInterface::GetInstance();
+
+    m_pProgrammPage = new ProgrammPage();
 }
 
 // 创建横线样式
@@ -275,7 +277,59 @@ void DbTreeViewManager::initializeTree(QString name, const int &userPrivilege)
             buttonLeft->setIcon(QIcon(":/images/home_left.png"));
         }
 
-    } 
+    }
+    else if (name == "Programme")
+    {
+        // 隐藏目录树和分隔线
+        m_pTreeViewDown->hide();
+        for (auto separator : m_mapFirstLevelSeparators)
+        {
+            if (separator)
+            {
+                separator->hide();
+            }
+        }
+        // 隐藏导航栏
+        m_pNavigationWidget->hide();
+
+        // 隐藏按钮
+        updateButtonsVisibility(); // 将按钮隐藏
+
+        // 隐藏特定的分隔线 lineFrame1
+        if (m_pLineFrame1)
+        {
+            m_pLineFrame1->hide();
+        }
+        // 若已有第三层窗口,先关闭并释放
+        if (m_thirdLevelFieldWnd)
+        {
+            m_thirdLevelFieldWnd->close();
+            m_thirdLevelFieldWnd->deleteLater();
+            m_thirdLevelFieldWnd = nullptr;
+        }
+
+        // 清理之前的控件列表
+        m_fieldWidgets.clear();
+
+        // 创建新的 "字段展示" 窗口,并赋值给 m_thirdLevelFieldWnd
+        m_thirdLevelFieldWnd = new QWidget(m_pOriginalWndMenuPage);
+        m_thirdLevelFieldWnd->setWindowTitle("字段展示");
+        m_thirdLevelFieldWnd->setStyleSheet("background-color: transparent;");
+
+        // 填满 widget2
+        m_thirdLevelFieldWnd->setGeometry(0, 0, m_pOriginalWndMenuPage->width(), m_pOriginalWndMenuPage->height());
+
+
+
+        QVBoxLayout* mainLayout = new QVBoxLayout(m_thirdLevelFieldWnd);
+        mainLayout->setContentsMargins(0, 0, 0, 0);
+        mainLayout->addWidget(m_pProgrammPage);
+
+        m_thirdLevelFieldWnd->setLayout(mainLayout);
+
+        m_thirdLevelFieldWnd->show();
+
+    }
     else 
     {
         // **其他配置逻辑**
@@ -1002,7 +1056,8 @@ void DbTreeViewManager::setupButton()
 
 void DbTreeViewManager::updateButtonsVisibility()
 {
-    if (m_currentConfigName == "Home") {
+    if (m_currentConfigName == "Home" || m_currentConfigName == "Programme")
+    {
         // Home 界面,隐藏所有按钮
         ButtonBack->hide();
         buttonUp->hide();

+ 5 - 0
View/die-bonder-ui/OriginalWnd/DbTreeViewManager.h

@@ -2,6 +2,7 @@
 #define DBTREEVIEWMANAGER_H
 #define NOMINMAX
 #include "TreeViewManager/TreeViewManagerHead.h"
+#include "Src/ProgrammPage.h"
 
 class OriginalWnd;
 
@@ -148,6 +149,10 @@ private:
     void Level3MenuAllSaveBut(QVBoxLayout* pVBox);
 
 private:
+    /** 编程界面
+    */
+    ProgrammPage* m_pProgrammPage = nullptr;
+
     /**OriginalWnd 窗口
      */
     OriginalWnd* m_originalWnd = nullptr;

+ 13 - 0
View/die-bonder-ui/SBTdie-bonder-ui.vcxproj

@@ -238,19 +238,23 @@
     <ClCompile Include="OriginalWnd\chartline.cpp" />
     <ClCompile Include="main.cpp" />
     <ClCompile Include="OriginalWnd\TreeViewManager\JIoMapPage.cpp" />
+    <ClCompile Include="Src\BondMatrixProgramPage.cpp" />
     <ClCompile Include="Src\CameraBind.cpp" />
     <ClCompile Include="Src\common\GlobalUse\JMouseMonitorThread.cpp" />
     <ClCompile Include="Src\common\JLogAllOutput.cpp" />
     <ClCompile Include="Src\common\JMessageTip.cpp" />
     <ClCompile Include="Src\common\JQCommon.cpp" />
     <ClCompile Include="Src\common\JUserAccountsData.cpp" />
+    <ClCompile Include="Src\ProgrammPage.cpp" />
     <ClCompile Include="Src\RewriteControl\ControlOperationPage.cpp">
       <DynamicSource Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">input</DynamicSource>
       <QtMocFileName Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(Filename).moc</QtMocFileName>
       <DynamicSource Condition="'$(Configuration)|$(Platform)'=='Release|x64'">input</DynamicSource>
       <QtMocFileName Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(Filename).moc</QtMocFileName>
     </ClCompile>
+    <ClCompile Include="Src\RewriteControl\Controls\DoubleSpinBox.cpp" />
     <ClCompile Include="Src\RewriteControl\Controls\JReLineEdit.cpp" />
+    <ClCompile Include="Src\RewriteControl\Controls\SpinBox.cpp" />
     <ClCompile Include="Src\RewriteControl\JoystickPage.cpp" />
     <ClCompile Include="Src\RewriteControl\LightJoystickSwitchPage.cpp" />
     <ClCompile Include="Src\RewriteControl\MsgDlg\CustomMessageDlg.cpp" />
@@ -263,8 +267,10 @@
     <ClCompile Include="Src\SystemInfoPage\PageWnd\AddUserAccountWnd.cpp" />
     <ClCompile Include="Src\SystemInfoPage\PageWnd\LanguageSwitchWnd.cpp" />
     <ClCompile Include="Src\SystemInfoPage\SystemInfoPage.cpp" />
+    <ClCompile Include="Src\WaffleProgramPage.cpp" />
   </ItemGroup>
   <ItemGroup>
+    <QtMoc Include="Src\WaffleProgramPage.h" />
     <QtMoc Include="Src\SystemInfoPage\PageWnd\LanguageSwitchWnd.h" />
     <QtMoc Include="Src\SystemInfoPage\PageWnd\AddUserAccountWnd.h" />
     <QtMoc Include="Src\SystemInfoPage\PageWnd\AccountMaintenanceWnd.h" />
@@ -280,6 +286,7 @@
     <QtMoc Include="Src\common\GlobalUse\JMouseMonitorThread.h" />
     <QtMoc Include="OriginalWnd\TreeViewManager\JIoMapPage.h" />
     <ClInclude Include="OriginalWnd\TreeViewManager\TreeViewManagerHead.h" />
+    <QtMoc Include="Src\BondMatrixProgramPage.h" />
     <ClInclude Include="Src\common\JLogAllOutput.h" />
     <QtMoc Include="Src\common\JMessageTip.h" />
     <QtMoc Include="Src\common\JQCommon.h" />
@@ -293,6 +300,9 @@
     <QtMoc Include="Src\RewriteControl\SpeedAdjWnd.h" />
     <QtMoc Include="Src\RewriteControl\SpeedAdjPage.h" />
     <QtMoc Include="Src\RewriteControl\Controls\JReLineEdit.h" />
+    <QtMoc Include="Src\RewriteControl\Controls\DoubleSpinBox.h" />
+    <QtMoc Include="Src\RewriteControl\Controls\SpinBox.h" />
+    <QtMoc Include="Src\ProgrammPage.h" />
     <ClInclude Include="Src\Sql\GetUiConfigFormDB.h" />
     <ClInclude Include="Src\Sql\SqlOperation.h" />
     <QtMoc Include="Src\CameraBind.h" />
@@ -370,6 +380,8 @@
     </QtUic>
     <QtUic Include="OriginalWnd\SingleCameraOperationWnd.ui">
     </QtUic>
+    <QtUic Include="Src\BondMatrixProgramPage.ui" />
+    <QtUic Include="Src\ProgrammPage.ui" />
     <QtUic Include="Src\RewriteControl\ControlOperationPage.ui" />
     <QtUic Include="Src\RewriteControl\LightJoystickSwitchPage.ui" />
     <QtUic Include="Src\RewriteControl\MsgDlg\CustomMessageDlg.ui" />
@@ -379,6 +391,7 @@
     <QtUic Include="Src\SystemInfoPage\PageWnd\AddUserAccountWnd.ui" />
     <QtUic Include="Src\SystemInfoPage\PageWnd\LanguageSwitchWnd.ui" />
     <QtUic Include="Src\SystemInfoPage\SystemInfoPage.ui" />
+    <QtUic Include="Src\WaffleProgramPage.ui" />
   </ItemGroup>
   <ItemGroup>
     <None Include="images\Participation display\BlackDiamond.png" />

+ 39 - 1
View/die-bonder-ui/SBTdie-bonder-ui.vcxproj.filters

@@ -291,6 +291,21 @@
     <ClCompile Include="Src\Sql\GetUiConfigFormDB.cpp">
       <Filter>Source Files\Src\Sql</Filter>
     </ClCompile>
+    <ClCompile Include="Src\RewriteControl\Controls\DoubleSpinBox.cpp">
+      <Filter>Source Files\Src\RewriteControl\Controls</Filter>
+    </ClCompile>
+    <ClCompile Include="Src\RewriteControl\Controls\SpinBox.cpp">
+      <Filter>Source Files\Src\RewriteControl\Controls</Filter>
+    </ClCompile>
+    <ClCompile Include="Src\BondMatrixProgramPage.cpp">
+      <Filter>Source Files\Src</Filter>
+    </ClCompile>
+    <ClCompile Include="Src\ProgrammPage.cpp">
+      <Filter>Source Files\Src</Filter>
+    </ClCompile>
+    <ClCompile Include="Src\WaffleProgramPage.cpp">
+      <Filter>Source Files\Src</Filter>
+    </ClCompile>
   </ItemGroup>
   <ItemGroup>
     <QtMoc Include="ImageWidget.h">
@@ -401,6 +416,21 @@
     <QtMoc Include="OriginalWnd\TreeViewManager\JIoMapPage.h">
       <Filter>Header Files\OriginalWnd\TreeViewManager</Filter>
     </QtMoc>
+    <QtMoc Include="Src\RewriteControl\Controls\DoubleSpinBox.h">
+      <Filter>Source Files\Src\RewriteControl\Controls</Filter>
+    </QtMoc>
+    <QtMoc Include="Src\RewriteControl\Controls\SpinBox.h">
+      <Filter>Source Files\Src\RewriteControl\Controls</Filter>
+    </QtMoc>
+    <QtMoc Include="Src\BondMatrixProgramPage.h">
+      <Filter>Source Files\Src</Filter>
+    </QtMoc>
+    <QtMoc Include="Src\ProgrammPage.h">
+      <Filter>Source Files\Src</Filter>
+    </QtMoc>
+    <QtMoc Include="Src\WaffleProgramPage.h">
+      <Filter>Source Files\Src</Filter>
+    </QtMoc>
   </ItemGroup>
   <ItemGroup>
     <CustomBuild Include="debug\moc_predefs.h.cbt">
@@ -465,6 +495,15 @@
     <QtUic Include="Src\RewriteControl\SpeedAdjPage.ui">
       <Filter>Source Files\Src\RewriteControl</Filter>
     </QtUic>
+    <QtUic Include="Src\BondMatrixProgramPage.ui">
+      <Filter>Source Files\Src</Filter>
+    </QtUic>
+    <QtUic Include="Src\ProgrammPage.ui">
+      <Filter>Source Files\Src</Filter>
+    </QtUic>
+    <QtUic Include="Src\WaffleProgramPage.ui">
+      <Filter>Source Files\Src</Filter>
+    </QtUic>
   </ItemGroup>
   <ItemGroup>
     <None Include="images\Participation display\BlackDiamond.png">
@@ -773,7 +812,6 @@
     <None Include="dark.qss" />
     <None Include="dark.qss" />
     <None Include="dark.qss" />
-    <None Include="dark.qss" />
     <None Include="dark.qss">
       <Filter>Resource Files</Filter>
     </None>

+ 33 - 0
View/die-bonder-ui/Src/BondMatrixProgramPage.cpp

@@ -0,0 +1,33 @@
+#include "BondMatrixProgramPage.h"
+
+#include "Src/RewriteControl/Controls/SpinBox.h"
+#include "Src/RewriteControl/Controls/DoubleSpinBox.h"
+#include <QPushButton>
+
+BondMatrixProgramPage::BondMatrixProgramPage(QWidget* parent) :
+	QWidget(parent)
+{
+	ui.setupUi(this);
+
+	setStyleSheet(
+		"QDoubleSpinBox{background: #FFFFFF;border: 1px solid #BABBDC;border - radius: 6px;padding: 2px 5px;}"
+		"QSpinBox{background: #FFFFFF;border: 1px solid #BABBDC;border - radius: 6px;padding: 2px 5px;}"
+		"QLineEdit{background: #FFFFFF;border: 1px solid #BABBDC;border - radius: 6px;padding: 2px 5px;}"
+		"QCheckBox::indicator{width: 20px;height: 20px;}"
+		"QCheckBox::indicator:unchecked{background - color: #FFFFFF;border-radius: 2px;}"
+		"QComboBox{background: #FFFFFF;border: 1px solid #BABBDC;border - radius: 6px;padding: 2px 5px;}"
+		"QComboBox::drop - down{width: 20px;}"
+	);
+
+	m_manageDB = CManageDB::GetInstance();
+	if (m_manageDB == nullptr) return;
+	m_pProduct = m_manageDB->GetCProduct();
+	if (m_pProduct == nullptr) return;
+
+	//initPage();
+}
+
+
+BondMatrixProgramPage::~BondMatrixProgramPage()
+{
+}

+ 78 - 0
View/die-bonder-ui/Src/BondMatrixProgramPage.h

@@ -0,0 +1,78 @@
+#pragma once
+
+#include <QWidget>
+#include "ui_BondMatrixProgramPage.h"
+#include "CViewInterface.h"
+
+class BondMatrixProgramPage : public QWidget
+{
+	Q_OBJECT
+
+public:
+	BondMatrixProgramPage(QWidget* parent = nullptr);
+	~BondMatrixProgramPage();
+
+private:
+
+
+	//新增矩阵界面
+	void AddMatrixPage(int bondMatrixVectorIndex, int vectorIndex, PROGRAM_POINT_MATRIX_STRUCT matrixData);
+
+	void AddOutMatrixPage(int vectorIndex, PROGRAM_BOND_MATRIX_STRUCT matrixData);
+
+	//往后端新增矩阵数据
+	void AddMatrixParam();
+
+	//更新参数,根据选择的点更新界面参数显示
+	void UpdatePageParam();
+
+	//参数被修改后发送给后端
+	void ParamChangeEvent();
+
+	//参数被修改后发送给后端
+	void MatrixChangeEvent();
+
+	//更新取晶参数
+	void UpdatePagePickParam();
+
+	//更新固晶参数
+	void UpdatePageBondParam();
+
+	void initPage();
+
+private:
+	Ui::BondMatrixProgramPageClass ui;
+
+	CManageDB* m_manageDB = nullptr;
+
+	CProduct* m_pProduct = nullptr;
+
+	//当前界面显示的参数
+	ns_db::BOND_INFO_STRUCT m_curBondInfo;
+
+	ns_db::PICKBOND_PARAM_STRUCT m_curWaferPickParam;
+
+	ns_db::PICKBOND_PARAM_STRUCT m_curCalibPlaceParam;
+
+	ns_db::PICKBOND_PARAM_STRUCT m_curCalibPickParam;
+
+	ns_db::PICKBOND_PARAM_STRUCT m_curBondParam;
+
+	ns_mat::POINT_INFO_STRUCT m_curPointInfo;
+
+	std::vector<ns_db::PICKBOND_PARAM_STRUCT> m_vecParam;
+
+	std::vector<ns_db::PROGRAM_BOND_MATRIX_STRUCT> m_vectBondMatrixs;
+
+	std::vector<ns_db::PROGRAM_POINT_MATRIX_STRUCT> m_vecSubMatrixs;
+
+	//子矩阵控件,ID从1开始
+	QMap<int, QVector<QObject*>> m_mapSubMatrixControls;
+
+	int m_curPtIndex = 0;
+
+
+
+
+
+};

+ 22 - 0
View/die-bonder-ui/Src/BondMatrixProgramPage.ui

@@ -0,0 +1,22 @@
+<UI version="4.0" >
+ <class>BondMatrixProgramPageClass</class>
+ <widget class="QWidget" name="BondMatrixProgramPageClass" >
+  <property name="objectName" >
+   <string notr="true">BondMatrixProgramPageClass</string>
+  </property>
+  <property name="geometry" >
+   <rect>
+	<x>0</x>
+	<y>0</y>
+	<width>600</width>
+	<height>400</height>
+   </rect>
+  </property>
+  <property name="windowTitle" >
+   <string>BondMatrixProgramPage</string>
+  </property>$centralwidget$
+ </widget>
+ <layoutDefault spacing="6" margin="11" />
+ <pixmapfunction></pixmapfunction>
+ <connections/>
+</UI>

+ 952 - 0
View/die-bonder-ui/Src/ProgrammPage.cpp

@@ -0,0 +1,952 @@
+#include "ProgrammPage.h"
+#include "Src/RewriteControl/Controls/SpinBox.h"
+#include "Src/RewriteControl/Controls/DoubleSpinBox.h"
+#include <QPushButton>
+
+ProgrammPage::ProgrammPage(QWidget *parent)
+	: QWidget(parent)
+{
+	ui.setupUi(this);
+
+
+	ui.spinBoxRow->setVisible(false);
+	ui.spinBoxCol->setVisible(false);
+	ui.doubleSpinBoxLeftTopX->setVisible(false);
+	ui.doubleSpinBoxLeftTopY->setVisible(false);
+	ui.doubleSpinBoxRightTopX->setVisible(false);
+	ui.doubleSpinBoxRightTopY->setVisible(false);
+	ui.doubleSpinBoxRightButtomX->setVisible(false);
+	ui.doubleSpinBoxRightButtomY->setVisible(false);
+	ui.lineEditNoBondPts->setVisible(false);
+	ui.label->setVisible(false);
+	ui.label_18->setVisible(false);
+	ui.label_2->setVisible(false);
+	ui.label_79->setVisible(false);
+	ui.label_80->setVisible(false);
+	ui.label_81->setVisible(false);
+	ui.label_82->setVisible(false);
+
+	ui.frame->setFrameShape(QFrame::NoFrame); // 盧뇜칵훰움솥
+	ui.frame->setFixedHeight(2);         // �零미땍멕똑
+	ui.frame->setStyleSheet("background-color: #C7CAEB;");
+
+	setStyleSheet(
+		"QDoubleSpinBox{background: #FFFFFF;border: 1px solid #BABBDC;border - radius: 6px;padding: 2px 5px;}"
+		"QSpinBox{background: #FFFFFF;border: 1px solid #BABBDC;border - radius: 6px;padding: 2px 5px;}"
+		"QLineEdit{background: #FFFFFF;border: 1px solid #BABBDC;border - radius: 6px;padding: 2px 5px;}"
+		"QCheckBox::indicator{width: 20px;height: 20px;}"
+		"QCheckBox::indicator:unchecked{background - color: #FFFFFF;border-radius: 2px;}"
+		"QComboBox{background: #FFFFFF;border: 1px solid #BABBDC;border - radius: 6px;padding: 2px 5px;}"
+		"QComboBox::drop - down{width: 20px;}"
+	);
+
+
+	ui.tab->setStyleSheet("background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, stop: 0 #F1F4FD, stop: 1 #E5E4F6)");
+
+	m_pWaffleProgrammPage = new WaffleProgramPage(this);
+	m_manageDB = CManageDB::GetInstance();
+
+	initPage();
+
+	connect(ui.pushButtonSave, &QPushButton::clicked, this, [=] {
+		ParamChangeEvent();
+		MatrixChangeEvent();
+		});
+
+	//앤黎鑒앴
+	connect(ui.spinBoxRow, &SpinBox::editingFinished, this, [=]() {
+		});
+
+	connect(ui.spinBoxCol, &SpinBox::editingFinished, this, [=]() {
+		});
+
+	connect(ui.doubleSpinBoxLeftTopX, &DoubleSpinBox::editDone, this, [=]() {
+		});
+
+	connect(ui.doubleSpinBoxLeftTopY, &DoubleSpinBox::editDone, this, [=]() {
+		});
+
+	connect(ui.doubleSpinBoxRightTopX, &DoubleSpinBox::editDone, this, [=]() {
+		});
+
+	connect(ui.doubleSpinBoxRightTopY, &DoubleSpinBox::editDone, this, [=]() {
+		});
+
+	connect(ui.doubleSpinBoxRightButtomX, &DoubleSpinBox::editDone, this, [=]() {
+		});
+
+	connect(ui.doubleSpinBoxRightButtomY, &DoubleSpinBox::editDone, this, [=]() {
+		});
+
+	//꽝鑒
+	connect(ui.comboBoxDieSource, QOverload<int>::of(&QComboBox::currentIndexChanged), this, [=](int index) {
+		if (index == 0)
+		{
+			m_curBondInfo.eDieSource = DIE_SOURCE::BY_WAFFLE;
+		} else if (index == 1)
+		{
+			m_curBondInfo.eDieSource = DIE_SOURCE::BY_WAFER;
+		}
+		ParamChangeEvent();
+		});
+
+	connect(ui.checkBoxIsCalib, &QCheckBox::clicked, this, [=](bool isChecked) {
+
+		});
+
+	connect(ui.spinBoxPickTempID, &SpinBox::editDone, this, [=]() {
+		m_curBondInfo.iPickPRStrategyId = ui.spinBoxPickTempID->value();
+		ParamChangeEvent();
+		});
+
+	connect(ui.spinBoxPickNozzleID, &SpinBox::editDone, this, [=]() {
+		m_curBondInfo.iPickHeadId = ui.spinBoxPickNozzleID->value();
+		ParamChangeEvent();
+		});
+
+	connect(ui.spinBoxPreBondTemp, &SpinBox::editDone, this, [=]() {
+		m_curBondInfo.iBondFrontPRStrategyId = ui.spinBoxPreBondTemp->value();
+		ParamChangeEvent();
+		});
+
+	connect(ui.spinBoxPostBondTemp, &SpinBox::editDone, this, [=]() {
+		m_curBondInfo.iBondBackPRStrategyId = ui.spinBoxPostBondTemp->value();
+		ParamChangeEvent();
+		});
+
+	connect(ui.spinBoxBondTemp, &SpinBox::editDone, this, [=]() {
+		m_curBondInfo.iBondPRStrategyId = ui.spinBoxBondTemp->value();
+		ParamChangeEvent();
+		});
+
+	connect(ui.spinBoxLookUpTemp, &SpinBox::editDone, this, [=]() {
+		m_curBondInfo.iLookUpPRStrategyId = ui.spinBoxLookUpTemp->value();
+		ParamChangeEvent();
+		});
+
+	connect(ui.spinBoxCalibPickTemp, &SpinBox::editDone, this, [=]() {
+		m_curBondInfo.iCalibPRStrategyId = ui.spinBoxCalibPickTemp->value();
+		ParamChangeEvent();
+		});
+
+	connect(ui.spinBoxBondNozzleID, &SpinBox::editDone, this, [=]() {
+		m_curBondInfo.iBondHeadId = ui.spinBoxBondNozzleID->value();
+		ParamChangeEvent();
+		});
+	connect(ui.doubleSpinBoxBondOffsetX, &DoubleSpinBox::editDone, this, [=]() {
+		m_curBondInfo.stOffset.x = ui.doubleSpinBoxBondOffsetX->value();
+		ParamChangeEvent();
+		});
+	connect(ui.doubleSpinBoxBondOffsetY, &DoubleSpinBox::editDone, this, [=]() {
+		m_curBondInfo.stOffset.y = ui.doubleSpinBoxBondOffsetY->value();
+		ParamChangeEvent();
+		});
+	connect(ui.doubleSpinBoxBondOffsetAngle, &DoubleSpinBox::editDone, this, [=]() {
+		m_curBondInfo.stOffset.a = ui.doubleSpinBoxBondOffsetAngle->value();
+		ParamChangeEvent();
+		});
+
+	connect(ui.comboBoxPickParamType, &QComboBox::currentTextChanged, this, [=]() {
+		UpdatePagePickParam();
+		});
+	connect(ui.checkBoxPickBlockCheck, &QCheckBox::clicked, this, [=](bool isChecked) {
+
+		if (ui.comboBoxPickParamType->currentIndex() == 0)//빽뤼분
+		{
+			m_curWaferPickParam.bCheckBlock = ui.checkBoxPickBlockCheck->isChecked();
+		}
+		else if (ui.comboBoxPickParamType->currentIndex() == 1)//쑨途憩
+		{
+			m_curCalibPickParam.bCheckBlock = ui.checkBoxPickBlockCheck->isChecked();
+		}
+		ParamChangeEvent();
+		});
+	connect(ui.checkBoxPickLoseCheck, &QCheckBox::clicked, this, [=](bool isChecked) {
+		if (ui.comboBoxPickParamType->currentIndex() == 0)//빽뤼분
+		{
+			m_curWaferPickParam.bCheckLose = ui.checkBoxPickLoseCheck->isChecked();
+		} else if (ui.comboBoxPickParamType->currentIndex() == 1)//쑨途憩
+		{
+			m_curCalibPickParam.bCheckLose = ui.checkBoxPickLoseCheck->isChecked();
+		}
+		ParamChangeEvent();
+		});
+	connect(ui.checkBoxPickFindForceCheck, &QCheckBox::clicked, this, [=](bool isChecked) {
+		if (ui.comboBoxPickParamType->currentIndex() == 0)//빽뤼분
+		{
+			m_curWaferPickParam.bFindForce = ui.checkBoxPickFindForceCheck->isChecked();
+		} else if (ui.comboBoxPickParamType->currentIndex() == 1)//쑨途憩
+		{
+			m_curCalibPickParam.bFindForce = ui.checkBoxPickFindForceCheck->isChecked();
+		}
+		ParamChangeEvent();
+		});
+	connect(ui.doubleSpinBoxPrePickZ, &DoubleSpinBox::editDone, this, [=]() {
+		if (ui.comboBoxPickParamType->currentIndex() == 0)//빽뤼분
+		{
+			m_curWaferPickParam.dPreLev = ui.doubleSpinBoxPrePickZ->value();
+		} else if (ui.comboBoxPickParamType->currentIndex() == 1)//쑨途憩
+		{
+			m_curCalibPickParam.dPreLev = ui.doubleSpinBoxPrePickZ->value();
+		}
+		ParamChangeEvent();
+		});
+	connect(ui.doubleSpinBoxPickForce, &DoubleSpinBox::editDone, this, [=]() {
+		if (ui.comboBoxPickParamType->currentIndex() == 0)//빽뤼분
+		{
+			m_curWaferPickParam.dForce = ui.doubleSpinBoxPickForce->value();
+		} else if (ui.comboBoxPickParamType->currentIndex() == 1)//쑨途憩
+		{
+			m_curCalibPickParam.dForce = ui.doubleSpinBoxPickForce->value();
+		}
+		ParamChangeEvent();
+		});
+	connect(ui.doubleSpinBoxPickPosZ, &DoubleSpinBox::editDone, this, [=]() {
+		if (ui.comboBoxPickParamType->currentIndex() == 0)//빽뤼분
+		{
+			m_curWaferPickParam.dPickOrBondLev = ui.doubleSpinBoxPickPosZ->value();
+		} else if (ui.comboBoxPickParamType->currentIndex() == 1)//쑨途憩
+		{
+			m_curCalibPickParam.dPickOrBondLev = ui.doubleSpinBoxPickPosZ->value();
+		}
+		ParamChangeEvent();
+		});
+	connect(ui.spinBoxPickGrabDelay, &SpinBox::editDone, this, [=]() {
+		if (ui.comboBoxPickParamType->currentIndex() == 0)//빽뤼분
+		{
+			m_curWaferPickParam.iGrabDelay = ui.spinBoxPickGrabDelay->value();
+		} else if (ui.comboBoxPickParamType->currentIndex() == 1)//쑨途憩
+		{
+			m_curCalibPickParam.iGrabDelay = ui.spinBoxPickGrabDelay->value();
+		}
+		ParamChangeEvent();
+		});
+	connect(ui.spinBox_PickDelay, &SpinBox::editDone, this, [=]() {
+		if (ui.comboBoxPickParamType->currentIndex() == 0)//빽뤼분
+		{
+			m_curWaferPickParam.iPickOrBondDelay = ui.spinBox_PickDelay->value();
+		} else if (ui.comboBoxPickParamType->currentIndex() == 1)//쑨途憩
+		{
+			m_curCalibPickParam.iPickOrBondDelay = ui.spinBox_PickDelay->value();
+		}
+		ParamChangeEvent();
+		});
+	connect(ui.spinBoxPickBlockCheckDelay, &SpinBox::editDone, this, [=]() {
+		if (ui.comboBoxPickParamType->currentIndex() == 0)//빽뤼분
+		{
+			m_curWaferPickParam.iBlockOrLoseDelay = ui.spinBoxPickBlockCheckDelay->value();
+		} else if (ui.comboBoxPickParamType->currentIndex() == 1)//쑨途憩
+		{
+			m_curCalibPickParam.iBlockOrLoseDelay = ui.spinBoxPickBlockCheckDelay->value();
+		}
+		ParamChangeEvent();
+		});
+	connect(ui.spinBoxPickVacDelay, &SpinBox::editDone, this, [=]() {
+		if (ui.comboBoxPickParamType->currentIndex() == 0)//빽뤼분
+		{
+			m_curWaferPickParam.iVacuumDelay = ui.spinBoxPickVacDelay->value();
+		} else if (ui.comboBoxPickParamType->currentIndex() == 1)//쑨途憩
+		{
+			m_curCalibPickParam.iVacuumDelay = ui.spinBoxPickVacDelay->value();
+		}
+		ParamChangeEvent();
+		});
+	connect(ui.spinBoxPickBlowDelay, &SpinBox::editDone, this, [=]() {
+		if (ui.comboBoxPickParamType->currentIndex() == 0)//빽뤼분
+		{
+			m_curWaferPickParam.iBlowDelay = ui.spinBoxPickBlowDelay->value();
+		} else if (ui.comboBoxPickParamType->currentIndex() == 1)//쑨途憩
+		{
+			m_curCalibPickParam.iBlowDelay = ui.spinBoxPickBlowDelay->value();
+		}
+		ParamChangeEvent();
+		});
+
+
+	connect(ui.comboBoxBondParamType, &QComboBox::currentTextChanged, this, [=]() {
+		UpdatePageBondParam();
+		});
+	connect(ui.checkBoxBondBlockCheck, &QCheckBox::clicked, this, [=](bool isChecked) {
+		if (ui.comboBoxBondParamType->currentIndex() == 0)//櫓瘻憩렴쑨
+		{
+			m_curCalibPlaceParam.bCheckBlock = ui.checkBoxBondBlockCheck->isChecked();
+		} else if (ui.comboBoxBondParamType->currentIndex() == 1)//미쑨憩미쑨
+		{
+			m_curBondParam.bCheckBlock = ui.checkBoxBondBlockCheck->isChecked();
+		}
+		ParamChangeEvent();
+		});
+	connect(ui.checkBoxBondLoseCheck, &QCheckBox::clicked, this, [=](bool isChecked) {
+		if (ui.comboBoxBondParamType->currentIndex() == 0)//櫓瘻憩렴쑨
+		{
+			m_curCalibPlaceParam.bCheckLose = ui.checkBoxBondLoseCheck->isChecked();
+		} else if (ui.comboBoxBondParamType->currentIndex() == 1)//미쑨憩미쑨
+		{
+			m_curBondParam.bCheckLose = ui.checkBoxBondLoseCheck->isChecked();
+		}
+		ParamChangeEvent();
+		});
+	connect(ui.checkBoxBondFindForce, &QCheckBox::clicked, this, [=](bool isChecked) {
+		if (ui.comboBoxBondParamType->currentIndex() == 0)//櫓瘻憩렴쑨
+		{
+			m_curCalibPlaceParam.bFindForce = ui.checkBoxBondFindForce->isChecked();
+		} else if (ui.comboBoxBondParamType->currentIndex() == 1)//미쑨憩미쑨
+		{
+			m_curBondParam.bFindForce = ui.checkBoxBondFindForce->isChecked();
+		}
+		ParamChangeEvent();
+		});
+	connect(ui.doubleSpinBoxPreBondPosZ, &DoubleSpinBox::editDone, this, [=]() {
+		if (ui.comboBoxBondParamType->currentIndex() == 0)//櫓瘻憩렴쑨
+		{
+			m_curCalibPlaceParam.dPreLev = ui.doubleSpinBoxPreBondPosZ->value();
+		} else if (ui.comboBoxBondParamType->currentIndex() == 1)//미쑨憩미쑨
+		{
+			m_curBondParam.dPreLev = ui.doubleSpinBoxPreBondPosZ->value();
+		}
+		ParamChangeEvent();
+		});
+
+	connect(ui.doubleSpinBoxBondForce, &DoubleSpinBox::editDone, this, [=]() {
+		if (ui.comboBoxBondParamType->currentIndex() == 0)//櫓瘻憩렴쑨
+		{
+			m_curCalibPlaceParam.dForce = ui.doubleSpinBoxBondForce->value();
+		} else if (ui.comboBoxBondParamType->currentIndex() == 1)//미쑨憩미쑨
+		{
+			m_curBondParam.dForce = ui.doubleSpinBoxBondForce->value();
+		}
+		ParamChangeEvent();
+		});
+
+	connect(ui.doubleSpinBoxBondPosZ, &DoubleSpinBox::editDone, this, [=]() {
+		if (ui.comboBoxBondParamType->currentIndex() == 0)//櫓瘻憩렴쑨
+		{
+			m_curCalibPlaceParam.dPickOrBondLev = ui.doubleSpinBoxBondPosZ->value();
+		} else if (ui.comboBoxBondParamType->currentIndex() == 1)//미쑨憩미쑨
+		{
+			m_curBondParam.dPickOrBondLev = ui.doubleSpinBoxBondPosZ->value();
+		}
+		ParamChangeEvent();
+		});
+	connect(ui.spinBoxBondGrabDelay, &SpinBox::editDone, this, [=]() {
+		if (ui.comboBoxBondParamType->currentIndex() == 0)//櫓瘻憩렴쑨
+		{
+			m_curCalibPlaceParam.iGrabDelay = ui.spinBoxBondGrabDelay->value();
+		} else if (ui.comboBoxBondParamType->currentIndex() == 1)//미쑨憩미쑨
+		{
+			m_curBondParam.iGrabDelay = ui.spinBoxBondGrabDelay->value();
+		}
+		ParamChangeEvent();
+		});
+	connect(ui.spinBoxBondBlockCheckDelay, &SpinBox::editDone, this, [=]() {
+		if (ui.comboBoxBondParamType->currentIndex() == 0)//櫓瘻憩렴쑨
+		{
+			m_curCalibPlaceParam.iBlockOrLoseDelay = ui.spinBoxBondBlockCheckDelay->value();
+		} else if (ui.comboBoxBondParamType->currentIndex() == 1)//미쑨憩미쑨
+		{
+			m_curBondParam.iBlockOrLoseDelay = ui.spinBoxBondBlockCheckDelay->value();
+		}
+		ParamChangeEvent();
+		});
+	connect(ui.spinBoxBondDelay, &SpinBox::editDone, this, [=]() {
+		if (ui.comboBoxBondParamType->currentIndex() == 0)//櫓瘻憩렴쑨
+		{
+			m_curCalibPlaceParam.iPickOrBondDelay = ui.spinBoxBondDelay->value();
+		} else if (ui.comboBoxBondParamType->currentIndex() == 1)//미쑨憩미쑨
+		{
+			m_curBondParam.iPickOrBondDelay = ui.spinBoxBondDelay->value();
+		}
+		ParamChangeEvent();
+		});
+	connect(ui.spinBoxBondVacDelay, &SpinBox::editDone, this, [=]() {
+		if (ui.comboBoxBondParamType->currentIndex() == 0)//櫓瘻憩렴쑨
+		{
+			m_curCalibPlaceParam.iVacuumDelay = ui.spinBoxBondVacDelay->value();
+		} else if (ui.comboBoxBondParamType->currentIndex() == 1)//미쑨憩미쑨
+		{
+			m_curBondParam.iVacuumDelay = ui.spinBoxBondVacDelay->value();
+		}
+		ParamChangeEvent();
+		});
+	connect(ui.spinBoxBondBlowDelay, &SpinBox::editDone, this, [=]() {
+		if (ui.comboBoxBondParamType->currentIndex() == 0)//櫓瘻憩렴쑨
+		{
+			m_curCalibPlaceParam.iBlowDelay = ui.spinBoxBondBlowDelay->value();
+		} else if (ui.comboBoxBondParamType->currentIndex() == 1)//미쑨憩미쑨
+		{
+			m_curBondParam.iBlowDelay = ui.spinBoxBondBlowDelay->value();
+		}
+		ParamChangeEvent();
+		});
+}
+
+ProgrammPage::~ProgrammPage()
+{}
+
+void ProgrammPage::AddMatrixPage(int bondMatrixVectorIndex, int vectorIndex, PROGRAM_POINT_MATRIX_STRUCT matrixData)
+{
+	int matrixNum = m_mapSubMatrixControls.size();
+	int newMatrixID = ++matrixNum;
+	QVector<QObject*> vecControls;
+
+	QGridLayout* subGridLayout = new QGridLayout();
+	subGridLayout->setSpacing(6);
+	subGridLayout->setObjectName(QString::fromUtf8("subGridLayout"));
+
+	QFrame* line = new QFrame();
+	line->setFrameShape(QFrame::NoFrame); // 盧뇜칵훰움솥
+	line->setFixedHeight(2);         // �零미땍멕똑
+	line->setStyleSheet("background-color: #C7CAEB;");
+	ui.verticalLayout_2->addWidget(line);
+
+	QLabel* labelTitle = new QLabel(this);
+	labelTitle->setObjectName(QString::fromUtf8("labelTitle"));
+	labelTitle->setText(tr("Sub Matrix ")+ QString::number(vectorIndex));
+	subGridLayout->addWidget(labelTitle, 0, 0, 1, 1);
+	vecControls.push_back(labelTitle);
+
+	QLabel* labelRow = new QLabel(this);
+	labelRow->setObjectName(QString::fromUtf8("labelRow"));
+	labelRow->setText(tr("Row "));
+	subGridLayout->addWidget(labelRow, 1, 0, 1, 1);
+	vecControls.push_back(labelRow);
+
+	SpinBox* spinBoxRow = new SpinBox(this);
+	spinBoxRow->setObjectName(QString::fromUtf8("spinBoxRow"));
+	subGridLayout->addWidget(spinBoxRow, 1, 1, 1, 1);
+	vecControls.push_back(spinBoxRow);
+
+	QLabel* labelCol = new QLabel(this);
+	labelCol->setObjectName(QString::fromUtf8("labelCol"));
+	labelCol->setText(tr("Cow "));
+	subGridLayout->addWidget(labelCol, 2, 0, 1, 1);
+	vecControls.push_back(labelCol);
+
+	SpinBox* spinBoxCol = new SpinBox(this);
+	spinBoxCol->setObjectName(QString::fromUtf8("spinBoxCol"));
+	subGridLayout->addWidget(spinBoxCol, 2, 1, 1, 1);
+	vecControls.push_back(spinBoxCol);
+
+	QLabel* labelLeftTop = new QLabel(this);
+	labelLeftTop->setObjectName(QString::fromUtf8("labelLeftTop"));
+	labelLeftTop->setText(tr("Left Top Pos "));
+	subGridLayout->addWidget(labelLeftTop, 4, 0, 1, 1);
+	vecControls.push_back(labelLeftTop);
+
+	DoubleSpinBox* doubleSpinBoxLeftTopX = new DoubleSpinBox(this);
+	doubleSpinBoxLeftTopX->setObjectName(QString::fromUtf8("doubleSpinBoxLeftTopX"));
+	subGridLayout->addWidget(doubleSpinBoxLeftTopX, 4, 1, 1, 1);
+	vecControls.push_back(doubleSpinBoxLeftTopX);
+
+	DoubleSpinBox* doubleSpinBoxLeftTopY = new DoubleSpinBox(this);
+	doubleSpinBoxLeftTopY->setObjectName(QString::fromUtf8("doubleSpinBoxLeftTopY"));
+	subGridLayout->addWidget(doubleSpinBoxLeftTopY, 4, 2, 1, 1);
+	vecControls.push_back(doubleSpinBoxLeftTopY);
+
+	QLabel* labelRightTopPos = new QLabel(this);
+	labelRightTopPos->setObjectName(QString::fromUtf8("labelRightTopPos"));
+	labelRightTopPos->setText(tr("Right Top Pos "));
+	subGridLayout->addWidget(labelRightTopPos, 5, 0, 1, 1);
+	vecControls.push_back(labelRightTopPos);
+
+	DoubleSpinBox* doubleSpinBoxRightTopX = new DoubleSpinBox(this);
+	doubleSpinBoxRightTopX->setObjectName(QString::fromUtf8("doubleSpinBoxRightTopX"));
+	subGridLayout->addWidget(doubleSpinBoxRightTopX, 5, 1, 1, 1);
+	vecControls.push_back(doubleSpinBoxRightTopX);
+
+	DoubleSpinBox* doubleSpinBoxRightTopY = new DoubleSpinBox(this);
+	doubleSpinBoxRightTopY->setObjectName(QString::fromUtf8("doubleSpinBoxRightTopY"));
+	subGridLayout->addWidget(doubleSpinBoxRightTopY, 5, 2, 1, 1);
+	vecControls.push_back(doubleSpinBoxRightTopY);
+
+	QLabel* labelRightButtomPos = new QLabel(this);
+	labelRightButtomPos->setObjectName(QString::fromUtf8("labelRightButtomPos"));
+	labelRightButtomPos->setText(tr("Right Buttom pos"));
+	subGridLayout->addWidget(labelRightButtomPos, 6, 0, 1, 1);
+	vecControls.push_back(labelRightButtomPos);
+
+	DoubleSpinBox* doubleSpinBoxRightButtomX = new DoubleSpinBox(this);
+	doubleSpinBoxRightButtomX->setObjectName(QString::fromUtf8("doubleSpinBoxRightButtomX"));
+	subGridLayout->addWidget(doubleSpinBoxRightButtomX, 6, 1, 1, 1);
+	vecControls.push_back(doubleSpinBoxRightButtomX);
+
+	DoubleSpinBox* doubleSpinBoxRightButtomY = new DoubleSpinBox(this);
+	doubleSpinBoxRightButtomY->setObjectName(QString::fromUtf8("doubleSpinBoxRightButtomY"));
+	subGridLayout->addWidget(doubleSpinBoxRightButtomY, 6, 2, 1, 1);
+	vecControls.push_back(doubleSpinBoxRightTopX);
+
+	QLabel* labelNoBondPts = new QLabel(this);
+	labelNoBondPts->setObjectName(QString::fromUtf8("labelNoBondPts"));
+	labelNoBondPts->setText(tr("No Bond Points"));
+	subGridLayout->addWidget(labelNoBondPts, 7, 0, 1, 1);
+	vecControls.push_back(labelNoBondPts);
+
+	QLineEdit* lineEditNoBondPts = new QLineEdit(this);
+	lineEditNoBondPts->setObjectName(QString::fromUtf8("lineEditNoBondPts"));
+	subGridLayout->addWidget(lineEditNoBondPts, 7, 1, 1, 2);
+	vecControls.push_back(lineEditNoBondPts);
+
+	m_mapSubMatrixControls.insert(newMatrixID, vecControls);
+
+	ui.verticalLayout_2->addLayout(subGridLayout);
+
+	spinBoxRow->setValue(matrixData.MatrixRow);
+	spinBoxCol->setValue(matrixData.MatrixCol);
+	doubleSpinBoxLeftTopX->setValue(matrixData.LeftTopPoint.x);
+	doubleSpinBoxLeftTopY->setValue(matrixData.LeftTopPoint.y);
+	doubleSpinBoxRightTopX->setValue(matrixData.RightTopPoint.x);
+	doubleSpinBoxRightTopY->setValue(matrixData.RightTopPoint.y);
+	doubleSpinBoxRightButtomX->setValue(matrixData.RightBottomPoint.x);
+	doubleSpinBoxRightButtomY->setValue(matrixData.RightBottomPoint.y);
+
+	QString noBondPts = "";
+	bool firstTime = false;
+	for (XY_LONG_STRUCT pt : matrixData.VecNoBondPt)
+	{
+		if (!firstTime)
+		{
+			noBondPts += "(" + QString::number(pt.x) + "," + QString::number(pt.y) + ")";
+			firstTime = true;
+			continue;
+		}
+		noBondPts += ";(" + QString::number(pt.x) + "," + QString::number(pt.y) + ")";
+	}
+	lineEditNoBondPts->setText(noBondPts);
+
+
+	connect(spinBoxRow, &SpinBox::editDone, this, [=]() {
+		m_vecSubMatrixs[vectorIndex].MatrixRow = spinBoxRow->value();
+		MatrixChangeEvent();
+		});
+
+	connect(spinBoxCol, &SpinBox::editDone, this, [=]() {
+		m_vecSubMatrixs[vectorIndex].MatrixCol = spinBoxCol->value();
+		MatrixChangeEvent();
+		});
+
+	connect(doubleSpinBoxLeftTopX, &DoubleSpinBox::editDone, this, [=]() {
+		m_vecSubMatrixs[vectorIndex].LeftTopPoint.x = doubleSpinBoxLeftTopX->value();
+		MatrixChangeEvent();
+		});
+	connect(doubleSpinBoxLeftTopY, &DoubleSpinBox::editDone, this, [=]() {
+		m_vecSubMatrixs[vectorIndex].LeftTopPoint.y = doubleSpinBoxLeftTopY->value();
+		MatrixChangeEvent();
+		});
+	connect(doubleSpinBoxRightTopX, &DoubleSpinBox::editDone, this, [=]() {
+		m_vecSubMatrixs[vectorIndex].RightTopPoint.x = doubleSpinBoxRightTopX->value();
+		MatrixChangeEvent();
+		});
+	connect(doubleSpinBoxRightTopY, &DoubleSpinBox::editDone, this, [=]() {
+		m_vecSubMatrixs[vectorIndex].RightTopPoint.y = doubleSpinBoxRightTopY->value();
+		MatrixChangeEvent();
+		});
+	connect(doubleSpinBoxRightButtomX, &DoubleSpinBox::editDone, this, [=]() {
+		m_vecSubMatrixs[vectorIndex].RightBottomPoint.x = doubleSpinBoxRightButtomX->value();
+		MatrixChangeEvent();
+		});
+	connect(doubleSpinBoxRightButtomY, &DoubleSpinBox::editDone, this, [=]() {
+		m_vecSubMatrixs[vectorIndex].RightBottomPoint.y = doubleSpinBoxRightButtomY->value();
+		MatrixChangeEvent();
+		});
+
+
+	connect(lineEditNoBondPts, &QLineEdit::textChanged, this, [=]() {
+
+		});
+
+
+
+}
+
+void ProgrammPage::AddOutMatrixPage(int vectorIndex, PROGRAM_BOND_MATRIX_STRUCT matrixData)
+{
+	int matrixNum = m_mapSubMatrixControls.size();
+	int newMatrixID = ++matrixNum;
+	QVector<QObject*> vecControls;
+
+	QFrame* line = new QFrame();
+	line->setFrameShape(QFrame::NoFrame); // 盧뇜칵훰움솥
+	line->setFixedHeight(4);         // �零미땍멕똑
+	line->setStyleSheet("background-color: #C7CAEB;");
+
+	ui.verticalLayout_2->addWidget(line);
+
+	QGridLayout* matrixGridLayout = new QGridLayout();
+	matrixGridLayout->setSpacing(6);
+	matrixGridLayout->setObjectName(QString::fromUtf8("matrixGridLayout"));
+
+	QLabel* labelTitle = new QLabel(this);
+	labelTitle->setObjectName(QString::fromUtf8("labelRow"));
+	labelTitle->setText(tr("Matrix_")+ QString::number(vectorIndex));
+	matrixGridLayout->addWidget(labelTitle, 0, 0, 1, 1);
+	vecControls.push_back(labelTitle);
+
+
+	QLabel* labelRow = new QLabel(this);
+	labelRow->setObjectName(QString::fromUtf8("labelRow"));
+	labelRow->setText(tr("Row "));
+	matrixGridLayout->addWidget(labelRow, 1, 0, 1, 1);
+	vecControls.push_back(labelRow);
+
+	SpinBox* spinBoxRow = new SpinBox(this);
+	spinBoxRow->setObjectName(QString::fromUtf8("spinBoxRow"));
+	matrixGridLayout->addWidget(spinBoxRow, 1, 1, 1, 1);
+	vecControls.push_back(spinBoxRow);
+
+	QLabel* labelCol = new QLabel(this);
+	labelCol->setObjectName(QString::fromUtf8("labelCol"));
+	labelCol->setText(tr("Cow "));
+	matrixGridLayout->addWidget(labelCol, 2, 0, 1, 1);
+	vecControls.push_back(labelCol);
+
+	SpinBox* spinBoxCol = new SpinBox(this);
+	spinBoxCol->setObjectName(QString::fromUtf8("spinBoxCol"));
+	matrixGridLayout->addWidget(spinBoxCol, 2, 1, 1, 1);
+	vecControls.push_back(spinBoxCol);
+
+	QLabel* labelLeftTop = new QLabel(this);
+	labelLeftTop->setObjectName(QString::fromUtf8("labelLeftTop"));
+	labelLeftTop->setText(tr("Left Top Pos "));
+	matrixGridLayout->addWidget(labelLeftTop, 4, 0, 1, 1);
+	vecControls.push_back(labelLeftTop);
+
+	DoubleSpinBox* doubleSpinBoxLeftTopX = new DoubleSpinBox(this);
+	doubleSpinBoxLeftTopX->setObjectName(QString::fromUtf8("doubleSpinBoxLeftTopX"));
+	matrixGridLayout->addWidget(doubleSpinBoxLeftTopX, 4, 1, 1, 1);
+	vecControls.push_back(doubleSpinBoxLeftTopX);
+
+	DoubleSpinBox* doubleSpinBoxLeftTopY = new DoubleSpinBox(this);
+	doubleSpinBoxLeftTopY->setObjectName(QString::fromUtf8("doubleSpinBoxLeftTopY"));
+	matrixGridLayout->addWidget(doubleSpinBoxLeftTopY, 4, 2, 1, 1);
+	vecControls.push_back(doubleSpinBoxLeftTopY);
+
+	QLabel* labelRightTopPos = new QLabel(this);
+	labelRightTopPos->setObjectName(QString::fromUtf8("labelRightTopPos"));
+	labelRightTopPos->setText(tr("Right Top Pos "));
+	matrixGridLayout->addWidget(labelRightTopPos, 5, 0, 1, 1);
+	vecControls.push_back(labelRightTopPos);
+
+	DoubleSpinBox* doubleSpinBoxRightTopX = new DoubleSpinBox(this);
+	doubleSpinBoxRightTopX->setObjectName(QString::fromUtf8("doubleSpinBoxRightTopX"));
+	matrixGridLayout->addWidget(doubleSpinBoxRightTopX, 5, 1, 1, 1);
+	vecControls.push_back(doubleSpinBoxRightTopX);
+
+	DoubleSpinBox* doubleSpinBoxRightTopY = new DoubleSpinBox(this);
+	doubleSpinBoxRightTopY->setObjectName(QString::fromUtf8("doubleSpinBoxRightTopY"));
+	matrixGridLayout->addWidget(doubleSpinBoxRightTopY, 5, 2, 1, 1);
+	vecControls.push_back(doubleSpinBoxRightTopY);
+
+	QLabel* labelRightButtomPos = new QLabel(this);
+	labelRightButtomPos->setObjectName(QString::fromUtf8("labelRightButtomPos"));
+	labelRightButtomPos->setText(tr("Right Buttom pos"));
+	matrixGridLayout->addWidget(labelRightButtomPos, 6, 0, 1, 1);
+	vecControls.push_back(labelRightButtomPos);
+
+	DoubleSpinBox* doubleSpinBoxRightButtomX = new DoubleSpinBox(this);
+	doubleSpinBoxRightButtomX->setObjectName(QString::fromUtf8("doubleSpinBoxRightButtomX"));
+	matrixGridLayout->addWidget(doubleSpinBoxRightButtomX, 6, 1, 1, 1);
+	vecControls.push_back(doubleSpinBoxRightButtomX);
+
+	DoubleSpinBox* doubleSpinBoxRightButtomY = new DoubleSpinBox(this);
+	doubleSpinBoxRightButtomY->setObjectName(QString::fromUtf8("doubleSpinBoxRightButtomY"));
+	matrixGridLayout->addWidget(doubleSpinBoxRightButtomY, 6, 2, 1, 1);
+	vecControls.push_back(doubleSpinBoxRightTopX);
+
+	QLabel* labelNoBondPts = new QLabel(this);
+	labelNoBondPts->setObjectName(QString::fromUtf8("labelNoBondPts"));
+	labelNoBondPts->setText(tr("No Bond Points"));
+	matrixGridLayout->addWidget(labelNoBondPts, 7, 0, 1, 1);
+	vecControls.push_back(labelNoBondPts);
+
+	QLineEdit* lineEditNoBondPts = new QLineEdit(this);
+	lineEditNoBondPts->setObjectName(QString::fromUtf8("lineEditNoBondPts"));
+	matrixGridLayout->addWidget(lineEditNoBondPts, 7, 1, 1, 2);
+	vecControls.push_back(lineEditNoBondPts);
+
+	m_mapSubMatrixControls.insert(newMatrixID, vecControls);
+
+	ui.verticalLayout_2->addLayout(matrixGridLayout);
+
+	spinBoxRow->setValue(matrixData.BondMatrixRow);
+	spinBoxCol->setValue(matrixData.BondMatrixCol);
+	doubleSpinBoxLeftTopX->setValue(matrixData.LeftTopPoint.x);
+	doubleSpinBoxLeftTopY->setValue(matrixData.LeftTopPoint.y);
+	doubleSpinBoxRightTopX->setValue(matrixData.RightTopPoint.x);
+	doubleSpinBoxRightTopY->setValue(matrixData.RightTopPoint.y);
+	doubleSpinBoxRightButtomX->setValue(matrixData.RightBottomPoint.x);
+	doubleSpinBoxRightButtomY->setValue(matrixData.RightBottomPoint.y);
+
+	QString noBondPts = "";
+	bool firstTime = false;
+	for (XY_LONG_STRUCT pt : m_vectBondMatrixs[0].VecNoBondPt)
+	{
+		if (firstTime)
+		{
+			noBondPts += "(" + QString::number(pt.x) + "," + QString::number(pt.y) + ")";
+			firstTime = true;
+			continue;
+		}
+		noBondPts += ";(" + QString::number(pt.x) + "," + QString::number(pt.y) + ")";
+	}
+	lineEditNoBondPts->setText(noBondPts);
+
+	connect(spinBoxRow, &SpinBox::editDone, this, [=]() {
+		m_vectBondMatrixs[vectorIndex].BondMatrixRow = spinBoxRow->value();
+		MatrixChangeEvent();
+		});
+
+	connect(spinBoxCol, &SpinBox::editDone, this, [=]() {
+		m_vectBondMatrixs[vectorIndex].BondMatrixCol = spinBoxCol->value();
+		MatrixChangeEvent();
+		});
+
+	connect(doubleSpinBoxLeftTopX, &DoubleSpinBox::editDone, this, [=]() {
+		m_vectBondMatrixs[vectorIndex].LeftTopPoint.x = doubleSpinBoxLeftTopX->value();
+		MatrixChangeEvent();
+		});
+	connect(doubleSpinBoxLeftTopY, &DoubleSpinBox::editDone, this, [=]() {
+		m_vectBondMatrixs[vectorIndex].LeftTopPoint.y = doubleSpinBoxLeftTopY->value();
+		MatrixChangeEvent();
+		});
+	connect(doubleSpinBoxRightTopX, &DoubleSpinBox::editDone, this, [=]() {
+		m_vectBondMatrixs[vectorIndex].RightTopPoint.x = doubleSpinBoxRightTopX->value();
+		MatrixChangeEvent();
+		});
+	connect(doubleSpinBoxRightTopY, &DoubleSpinBox::editDone, this, [=]() {
+		m_vectBondMatrixs[vectorIndex].RightTopPoint.y = doubleSpinBoxRightTopY->value();
+		MatrixChangeEvent();
+		});
+	connect(doubleSpinBoxRightButtomX, &DoubleSpinBox::editDone, this, [=]() {
+		m_vectBondMatrixs[vectorIndex].RightBottomPoint.x = doubleSpinBoxRightButtomX->value();
+		MatrixChangeEvent();
+		});
+	connect(doubleSpinBoxRightButtomY, &DoubleSpinBox::editDone, this, [=]() {
+		m_vectBondMatrixs[vectorIndex].RightBottomPoint.y = doubleSpinBoxRightButtomY->value();
+		MatrixChangeEvent();
+		});
+
+
+	connect(lineEditNoBondPts, &QLineEdit::textChanged, this, [=]() {
+
+		});
+
+}
+
+void ProgrammPage::AddMatrixParam()
+{
+
+}
+
+void ProgrammPage::UpdatePageParam()
+{
+	int dieSourceIndex = 0;
+	if (m_curBondInfo.eDieSource == DIE_SOURCE::BY_WAFER)
+	{
+		dieSourceIndex = 1;
+	} else if (m_curBondInfo.eDieSource == DIE_SOURCE::BY_WAFFLE)
+	{
+		dieSourceIndex = 0;
+	}
+	ui.comboBoxDieSource->setCurrentIndex(dieSourceIndex);
+	ui.spinBoxPickTempID->setValue(m_curBondInfo.iPickPRStrategyId);
+	ui.spinBoxPickNozzleID->setValue(m_curBondInfo.iPickHeadId);
+	ui.spinBoxPreBondTemp->setValue(m_curBondInfo.iBondFrontPRStrategyId);
+	ui.spinBoxPostBondTemp->setValue(m_curBondInfo.iBondBackPRStrategyId);
+	ui.spinBoxBondTemp->setValue(m_curBondInfo.iBondPRStrategyId);
+	ui.spinBoxLookUpTemp->setValue(m_curBondInfo.iLookUpPRStrategyId);
+	ui.spinBoxCalibPickTemp->setValue(m_curBondInfo.iCalibPRStrategyId);
+	ui.doubleSpinBoxBondOffsetX->setValue(m_curBondInfo.stOffset.x);
+	ui.doubleSpinBoxBondOffsetY->setValue(m_curBondInfo.stOffset.y);
+	ui.doubleSpinBoxBondOffsetAngle->setValue(m_curBondInfo.stOffset.a);
+
+	UpdatePagePickParam();
+
+	UpdatePageBondParam();
+
+}
+
+void ProgrammPage::ParamChangeEvent()
+{
+	m_manageDB->GetCProduct()->SetBondInfoData(m_curBondInfo.iInfoId, m_curBondInfo);
+	m_manageDB->GetCProduct()->SetBondParam(m_curWaferPickParam.iId, m_curWaferPickParam);
+	m_manageDB->GetCProduct()->SetBondParam(m_curCalibPlaceParam.iId, m_curCalibPlaceParam);
+	m_manageDB->GetCProduct()->SetBondParam(m_curCalibPickParam.iId, m_curCalibPickParam);
+	m_manageDB->GetCProduct()->SetBondParam(m_curBondParam.iId, m_curBondParam);
+
+}
+
+void ProgrammPage::MatrixChangeEvent()
+{
+	for (PROGRAM_BOND_MATRIX_STRUCT& bondMatrix : m_vectBondMatrixs)
+	{
+		m_manageDB->GetCProduct()->SetBondMatrix(bondMatrix.BondMatrixId, bondMatrix);
+	}
+
+	for (PROGRAM_POINT_MATRIX_STRUCT& pointMatrix : m_vecSubMatrixs)
+	{
+		m_manageDB->GetCProduct()->SetPointMatrix(pointMatrix.MatrixId, pointMatrix);
+	}
+
+}
+
+void ProgrammPage::UpdatePagePickParam()
+{
+	//"혤쑨庫혤쑨"
+	if (ui.comboBoxPickParamType->currentIndex() == 0)
+	{
+		ui.checkBoxPickBlockCheck->setChecked(m_curWaferPickParam.bCheckBlock);
+		ui.checkBoxPickLoseCheck->setChecked(m_curWaferPickParam.bCheckLose);
+		ui.checkBoxPickFindForceCheck->setChecked(m_curWaferPickParam.bFindForce);
+		ui.doubleSpinBoxPrePickZ->setValue(m_curWaferPickParam.dPreLev);
+		ui.doubleSpinBoxPickForce->setValue(m_curWaferPickParam.dForce);
+		ui.doubleSpinBoxPickPosZ->setValue(m_curWaferPickParam.dPickOrBondLev);
+		ui.spinBoxPickGrabDelay->setValue(m_curWaferPickParam.iGrabDelay);
+		ui.spinBox_PickDelay->setValue(m_curWaferPickParam.iPickOrBondDelay);
+		ui.spinBoxPickBlockCheckDelay->setValue(m_curWaferPickParam.iBlockOrLoseDelay);
+		ui.spinBoxPickVacDelay->setValue(m_curWaferPickParam.iVacuumDelay);
+		ui.spinBoxPickBlowDelay->setValue(m_curWaferPickParam.iBlowDelay);
+	}
+	//"櫓瘻憩혤쑨"
+	else if (ui.comboBoxPickParamType->currentIndex() == 1)
+	{
+		ui.checkBoxPickBlockCheck->setChecked(m_curCalibPickParam.bCheckBlock);
+		ui.checkBoxPickLoseCheck->setChecked(m_curCalibPickParam.bCheckLose);
+		ui.checkBoxPickFindForceCheck->setChecked(m_curCalibPickParam.bFindForce);
+		ui.doubleSpinBoxPrePickZ->setValue(m_curCalibPickParam.dPreLev);
+		ui.doubleSpinBoxPickForce->setValue(m_curCalibPickParam.dForce);
+		ui.doubleSpinBoxPickPosZ->setValue(m_curCalibPickParam.dPickOrBondLev);
+		ui.spinBoxPickGrabDelay->setValue(m_curCalibPickParam.iGrabDelay);
+		ui.spinBox_PickDelay->setValue(m_curCalibPickParam.iPickOrBondDelay);
+		ui.spinBoxPickBlockCheckDelay->setValue(m_curCalibPickParam.iBlockOrLoseDelay);
+		ui.spinBoxPickVacDelay->setValue(m_curCalibPickParam.iVacuumDelay);
+		ui.spinBoxPickBlowDelay->setValue(m_curCalibPickParam.iBlowDelay);
+	}
+}
+
+void ProgrammPage::UpdatePageBondParam()
+{
+	//"櫓瘻憩렴쑨"
+	if (ui.comboBoxBondParamType->currentIndex() == 0)
+	{
+		ui.checkBoxBondBlockCheck->setChecked(m_curCalibPlaceParam.bCheckBlock);
+		ui.checkBoxBondLoseCheck->setChecked(m_curCalibPlaceParam.bCheckLose);
+		ui.checkBoxBondFindForce->setChecked(m_curCalibPlaceParam.bFindForce);
+		ui.doubleSpinBoxPreBondPosZ->setValue(m_curCalibPlaceParam.dPreLev);
+		ui.doubleSpinBoxBondForce->setValue(m_curCalibPlaceParam.dForce);
+		ui.doubleSpinBoxBondPosZ->setValue(m_curCalibPlaceParam.dPickOrBondLev);
+		ui.spinBoxBondGrabDelay->setValue(m_curCalibPlaceParam.iGrabDelay);
+		ui.spinBoxBondDelay->setValue(m_curCalibPlaceParam.iPickOrBondDelay);
+		ui.spinBoxBondBlockCheckDelay->setValue(m_curCalibPlaceParam.iBlockOrLoseDelay);
+		ui.spinBoxBondVacDelay->setValue(m_curCalibPlaceParam.iVacuumDelay);
+		ui.spinBoxBondBlowDelay->setValue(m_curCalibPlaceParam.iBlowDelay);
+		
+	} 
+	//"미쑨憩미쑨"
+	else if (ui.comboBoxBondParamType->currentIndex() == 1)
+	{
+		ui.checkBoxBondBlockCheck->setChecked(m_curBondParam.bCheckBlock);
+		ui.checkBoxBondLoseCheck->setChecked(m_curBondParam.bCheckLose);
+		ui.checkBoxBondFindForce->setChecked(m_curBondParam.bFindForce);
+		ui.doubleSpinBoxPreBondPosZ->setValue(m_curBondParam.dPreLev);
+		ui.doubleSpinBoxBondForce->setValue(m_curBondParam.dForce);
+		ui.doubleSpinBoxBondPosZ->setValue(m_curBondParam.dPickOrBondLev);
+		ui.spinBoxBondGrabDelay->setValue(m_curBondParam.iGrabDelay);
+		ui.spinBoxBondDelay->setValue(m_curBondParam.iPickOrBondDelay);
+		ui.spinBoxBondBlockCheckDelay->setValue(m_curBondParam.iBlockOrLoseDelay);
+		ui.spinBoxBondVacDelay->setValue(m_curBondParam.iVacuumDelay);
+		ui.spinBoxBondBlowDelay->setValue(m_curBondParam.iBlowDelay);
+	}
+}
+
+void ProgrammPage::initPage()
+{
+	if (m_manageDB == nullptr)
+	{
+		return;
+	}
+	//닒빈똥삿혤鑒앴
+	m_vectBondMatrixs = m_manageDB->GetCProduct()->GetBondMatrix();
+	if (m_vectBondMatrixs.size() == 0)
+	{		
+		return;
+	}
+
+	for (int i = 0; i < m_vectBondMatrixs.size(); i++)
+	{
+		AddOutMatrixPage(i, m_vectBondMatrixs[i]);
+		for (int j = 0; j < m_vectBondMatrixs[i].VecPointMatrixId.size(); j++)
+		{
+			PROGRAM_POINT_MATRIX_STRUCT subMatrix;
+			m_manageDB->GetCProduct()->GetPointMatrix(m_vectBondMatrixs[i].VecPointMatrixId[j], subMatrix);
+			m_vecSubMatrixs.push_back(subMatrix);
+			AddMatrixPage(i, j, subMatrix);
+
+		}
+	}
+
+
+	//for (int i = 0; i < m_vectBondMatrixs[0].VecPointMatrixId.size(); ++i)
+	//{
+	//	PROGRAM_POINT_MATRIX_STRUCT subMatrix;
+	//	m_manageDB->GetCProduct()->GetPointMatrix(m_vectBondMatrixs[0].VecPointMatrixId[i], subMatrix);
+	//	m_vecSubMatrixs.push_back(subMatrix);
+	//}
+
+	//m_manageDB->GetCProduct()->GetDieMatrix(m_vectBondMatrixs[0].VecPointMatrixId[0], m_vecSubMatrixs);
+
+	//鞫刻앤黎鑒앴
+	ui.spinBoxRow->setValue(m_vectBondMatrixs[0].BondMatrixRow);
+	ui.spinBoxCol->setValue(m_vectBondMatrixs[0].BondMatrixCol);
+	ui.doubleSpinBoxLeftTopX->setValue(m_vectBondMatrixs[0].LeftTopPoint.x);
+	ui.doubleSpinBoxLeftTopY->setValue(m_vectBondMatrixs[0].LeftTopPoint.y);
+	ui.doubleSpinBoxRightTopX->setValue(m_vectBondMatrixs[0].RightTopPoint.x);
+	ui.doubleSpinBoxRightTopY->setValue(m_vectBondMatrixs[0].RightTopPoint.y);
+	ui.doubleSpinBoxRightButtomX->setValue(m_vectBondMatrixs[0].RightBottomPoint.x);
+	ui.doubleSpinBoxRightButtomY->setValue(m_vectBondMatrixs[0].RightBottomPoint.y);
+	QString noBondPts = "";
+	bool firstTime = false;
+	for (XY_LONG_STRUCT& pt : m_vectBondMatrixs[0].VecNoBondPt)
+	{
+		if (firstTime)
+		{
+			noBondPts += "(" + QString::number(pt.x) + "," + QString::number(pt.y) + ")";
+			firstTime = true;
+
+		}
+		noBondPts += ";(" + QString::number(pt.x) + "," + QString::number(pt.y) + ")";
+
+	}
+	ui.lineEditNoBondPts->setText(noBondPts);
+
+	//鞫刻綾앤黎섟鑒앴
+	//for (PROGRAM_POINT_MATRIX_STRUCT& subMatrix : m_vecSubMatrixs)
+	//{
+	//	AddMatrixPage(subMatrix);
+	//}
+
+	//닒빈똥삿혤꽝鑒, 寧敬鑒앴
+	CResources* pResources = CResources::GetInstance();
+	if (pResources == nullptr)
+	{
+		return ;
+	}
+	CBondMatrix* pBondMatrix = pResources->GetBondMatrix();
+	if (pBondMatrix == nullptr)
+	{
+		return ;
+	}
+	
+	//pBondMatrix->GetPintInfoByIndex(0, m_curPointInfo);
+	m_manageDB->GetCProduct()->GetBondInfoData(m_vectBondMatrixs[0].BondInfoId, m_curBondInfo);
+	m_manageDB->GetCProduct()->GetBondParam(m_curBondInfo.iPickParamId, m_curWaferPickParam);
+	m_manageDB->GetCProduct()->GetBondParam(m_curBondInfo.iCalibBondParamId, m_curCalibPlaceParam);
+	m_manageDB->GetCProduct()->GetBondParam(m_curBondInfo.iCalibPickParamId, m_curCalibPickParam);
+	m_manageDB->GetCProduct()->GetBondParam(m_curBondInfo.iBondParamId, m_curBondParam);
+
+	//鞫刻썹충꽝鑒
+	UpdatePageParam();
+
+	ui.verticalLayoutWaffleMatrix->addWidget(m_pWaffleProgrammPage);
+
+
+}

+ 74 - 0
View/die-bonder-ui/Src/ProgrammPage.h

@@ -0,0 +1,74 @@
+#pragma once
+
+#include <QWidget>
+#include "ui_ProgrammPage.h"
+#include "CViewInterface.h"
+#include "WaffleProgramPage.h"
+
+class ProgrammPage : public QWidget
+{
+	Q_OBJECT
+
+public:
+	ProgrammPage(QWidget *parent = nullptr);
+	~ProgrammPage();
+
+private:
+	//新增矩阵界面
+	void AddMatrixPage(int bondMatrixVectorIndex, int vectorIndex, PROGRAM_POINT_MATRIX_STRUCT matrixData);
+
+	void AddOutMatrixPage(int vectorIndex, PROGRAM_BOND_MATRIX_STRUCT matrixData);
+
+	//往后端新增矩阵数据
+	void AddMatrixParam();
+
+	//更新参数,根据选择的点更新界面参数显示
+	void UpdatePageParam();
+
+	//参数被修改后发送给后端
+	void ParamChangeEvent();
+
+	//参数被修改后发送给后端
+	void MatrixChangeEvent();
+
+	//更新取晶参数
+	void UpdatePagePickParam();
+
+	//更新固晶参数
+	void UpdatePageBondParam();
+
+	void initPage();
+
+private:
+	Ui::ProgrammPageClass ui;
+
+	CManageDB* m_manageDB = nullptr;
+
+	//当前界面显示的参数
+	ns_db::BOND_INFO_STRUCT m_curBondInfo;
+
+	ns_db::PICKBOND_PARAM_STRUCT m_curWaferPickParam;
+
+	ns_db::PICKBOND_PARAM_STRUCT m_curCalibPlaceParam;
+
+	ns_db::PICKBOND_PARAM_STRUCT m_curCalibPickParam;
+
+	ns_db::PICKBOND_PARAM_STRUCT m_curBondParam;
+
+	ns_mat::POINT_INFO_STRUCT m_curPointInfo;
+
+	std::vector<ns_db::PICKBOND_PARAM_STRUCT> m_vecParam;
+
+	std::vector<ns_db::PROGRAM_BOND_MATRIX_STRUCT> m_vectBondMatrixs;
+
+	std::vector<ns_db::PROGRAM_POINT_MATRIX_STRUCT> m_vecSubMatrixs;
+
+	//子矩阵控件,ID从1开始
+	QMap<int, QVector<QObject*>> m_mapSubMatrixControls;
+
+	int m_curPtIndex = 0;
+
+	WaffleProgramPage* m_pWaffleProgrammPage = nullptr;
+
+	
+};

+ 819 - 0
View/die-bonder-ui/Src/ProgrammPage.ui

@@ -0,0 +1,819 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
+ <class>ProgrammPageClass</class>
+ <widget class="QWidget" name="ProgrammPageClass">
+  <property name="geometry">
+   <rect>
+    <x>0</x>
+    <y>0</y>
+    <width>797</width>
+    <height>1178</height>
+   </rect>
+  </property>
+  <property name="windowTitle">
+   <string>ProgrammPage</string>
+  </property>
+  <layout class="QVBoxLayout" name="verticalLayout_3">
+   <item>
+    <widget class="QTabWidget" name="tabWidget">
+     <property name="currentIndex">
+      <number>1</number>
+     </property>
+     <widget class="QWidget" name="tab">
+      <attribute name="title">
+       <string>固晶点编程</string>
+      </attribute>
+      <layout class="QVBoxLayout" name="verticalLayout_4">
+       <item>
+        <layout class="QHBoxLayout" name="horizontalLayout">
+         <item>
+          <spacer name="horizontalSpacer">
+           <property name="orientation">
+            <enum>Qt::Horizontal</enum>
+           </property>
+           <property name="sizeHint" stdset="0">
+            <size>
+             <width>40</width>
+             <height>20</height>
+            </size>
+           </property>
+          </spacer>
+         </item>
+         <item>
+          <widget class="QPushButton" name="pushButtonSave">
+           <property name="minimumSize">
+            <size>
+             <width>150</width>
+             <height>0</height>
+            </size>
+           </property>
+           <property name="text">
+            <string>Save</string>
+           </property>
+          </widget>
+         </item>
+        </layout>
+       </item>
+       <item>
+        <widget class="QFrame" name="frame_2">
+         <property name="frameShape">
+          <enum>QFrame::StyledPanel</enum>
+         </property>
+         <property name="frameShadow">
+          <enum>QFrame::Raised</enum>
+         </property>
+        </widget>
+       </item>
+       <item>
+        <widget class="QScrollArea" name="scrollArea_2">
+         <property name="sizePolicy">
+          <sizepolicy hsizetype="Expanding" vsizetype="Preferred">
+           <horstretch>0</horstretch>
+           <verstretch>0</verstretch>
+          </sizepolicy>
+         </property>
+         <property name="widgetResizable">
+          <bool>true</bool>
+         </property>
+         <widget class="QWidget" name="scrollAreaWidgetMatrix">
+          <property name="geometry">
+           <rect>
+            <x>0</x>
+            <y>0</y>
+            <width>745</width>
+            <height>243</height>
+           </rect>
+          </property>
+          <layout class="QVBoxLayout" name="verticalLayout_2">
+           <item>
+            <layout class="QGridLayout" name="gridLayout">
+             <property name="spacing">
+              <number>10</number>
+             </property>
+             <item row="5" column="1">
+              <widget class="DoubleSpinBox" name="doubleSpinBoxRightTopX">
+               <property name="minimum">
+                <double>-1000000000.000000000000000</double>
+               </property>
+               <property name="maximum">
+                <double>1000000000.000000000000000</double>
+               </property>
+              </widget>
+             </item>
+             <item row="6" column="2">
+              <widget class="DoubleSpinBox" name="doubleSpinBoxRightButtomY">
+               <property name="minimum">
+                <double>-1000000000.000000000000000</double>
+               </property>
+               <property name="maximum">
+                <double>1000000000.000000000000000</double>
+               </property>
+              </widget>
+             </item>
+             <item row="5" column="0">
+              <widget class="QLabel" name="label_79">
+               <property name="text">
+                <string>右上角</string>
+               </property>
+              </widget>
+             </item>
+             <item row="5" column="2">
+              <widget class="DoubleSpinBox" name="doubleSpinBoxRightTopY">
+               <property name="minimum">
+                <double>-1000000000.000000000000000</double>
+               </property>
+               <property name="maximum">
+                <double>1000000000.000000000000000</double>
+               </property>
+              </widget>
+             </item>
+             <item row="4" column="1">
+              <widget class="DoubleSpinBox" name="doubleSpinBoxLeftTopX">
+               <property name="maximum">
+                <double>1000000000.000000000000000</double>
+               </property>
+              </widget>
+             </item>
+             <item row="1" column="0">
+              <widget class="QLabel" name="label">
+               <property name="text">
+                <string>行数</string>
+               </property>
+              </widget>
+             </item>
+             <item row="6" column="0">
+              <widget class="QLabel" name="label_80">
+               <property name="text">
+                <string>右下角</string>
+               </property>
+              </widget>
+             </item>
+             <item row="6" column="1">
+              <widget class="DoubleSpinBox" name="doubleSpinBoxRightButtomX">
+               <property name="minimum">
+                <double>-1000000000.000000000000000</double>
+               </property>
+               <property name="maximum">
+                <double>1000000000.000000000000000</double>
+               </property>
+              </widget>
+             </item>
+             <item row="7" column="0">
+              <widget class="QLabel" name="label_81">
+               <property name="text">
+                <string>不固晶点</string>
+               </property>
+              </widget>
+             </item>
+             <item row="4" column="2">
+              <widget class="DoubleSpinBox" name="doubleSpinBoxLeftTopY">
+               <property name="minimum">
+                <double>-1000000000.000000000000000</double>
+               </property>
+               <property name="maximum">
+                <double>1000000000.000000000000000</double>
+               </property>
+              </widget>
+             </item>
+             <item row="2" column="1">
+              <widget class="SpinBox" name="spinBoxCol"/>
+             </item>
+             <item row="1" column="1">
+              <widget class="SpinBox" name="spinBoxRow"/>
+             </item>
+             <item row="4" column="0">
+              <widget class="QLabel" name="label_18">
+               <property name="text">
+                <string>左上角</string>
+               </property>
+              </widget>
+             </item>
+             <item row="7" column="1" colspan="2">
+              <widget class="QLineEdit" name="lineEditNoBondPts"/>
+             </item>
+             <item row="2" column="0">
+              <widget class="QLabel" name="label_2">
+               <property name="text">
+                <string>列数</string>
+               </property>
+              </widget>
+             </item>
+             <item row="0" column="0" colspan="3">
+              <widget class="QLabel" name="label_82">
+               <property name="text">
+                <string>一维矩阵:</string>
+               </property>
+              </widget>
+             </item>
+            </layout>
+           </item>
+          </layout>
+         </widget>
+        </widget>
+       </item>
+       <item>
+        <widget class="QFrame" name="frame">
+         <property name="frameShape">
+          <enum>QFrame::StyledPanel</enum>
+         </property>
+         <property name="frameShadow">
+          <enum>QFrame::Raised</enum>
+         </property>
+        </widget>
+       </item>
+       <item>
+        <widget class="QScrollArea" name="scrollArea">
+         <property name="sizePolicy">
+          <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
+           <horstretch>0</horstretch>
+           <verstretch>0</verstretch>
+          </sizepolicy>
+         </property>
+         <property name="widgetResizable">
+          <bool>true</bool>
+         </property>
+         <widget class="QWidget" name="scrollAreaWidgetParam">
+          <property name="geometry">
+           <rect>
+            <x>0</x>
+            <y>0</y>
+            <width>724</width>
+            <height>1282</height>
+           </rect>
+          </property>
+          <layout class="QVBoxLayout" name="verticalLayout">
+           <item>
+            <layout class="QGridLayout" name="gridLayout_2">
+             <property name="spacing">
+              <number>10</number>
+             </property>
+             <item row="8" column="1">
+              <widget class="SpinBox" name="spinBoxCalibPickTemp"/>
+             </item>
+             <item row="36" column="0">
+              <widget class="QLabel" name="label_38">
+               <property name="text">
+                <string>固晶高度</string>
+               </property>
+              </widget>
+             </item>
+             <item row="35" column="1">
+              <widget class="DoubleSpinBox" name="doubleSpinBoxBondForce">
+               <property name="minimum">
+                <double>-1000000000.000000000000000</double>
+               </property>
+               <property name="maximum">
+                <double>1000000000.000000000000000</double>
+               </property>
+              </widget>
+             </item>
+             <item row="17" column="0">
+              <widget class="QLabel" name="label_13">
+               <property name="text">
+                <string>取晶参数:</string>
+               </property>
+              </widget>
+             </item>
+             <item row="23" column="0">
+              <widget class="QLabel" name="label_75">
+               <property name="text">
+                <string>取晶高度</string>
+               </property>
+              </widget>
+             </item>
+             <item row="9" column="1">
+              <widget class="SpinBox" name="spinBoxBondNozzleID"/>
+             </item>
+             <item row="20" column="1">
+              <widget class="QCheckBox" name="checkBoxPickFindForceCheck">
+               <property name="text">
+                <string>CheckBox</string>
+               </property>
+              </widget>
+             </item>
+             <item row="2" column="0">
+              <widget class="QLabel" name="label_77">
+               <property name="text">
+                <string>取晶模板ID</string>
+               </property>
+              </widget>
+             </item>
+             <item row="31" column="1">
+              <widget class="QCheckBox" name="checkBoxBondBlockCheck">
+               <property name="text">
+                <string>CheckBox</string>
+               </property>
+              </widget>
+             </item>
+             <item row="25" column="1">
+              <widget class="SpinBox" name="spinBox_PickDelay"/>
+             </item>
+             <item row="3" column="1">
+              <widget class="SpinBox" name="spinBoxPickNozzleID"/>
+             </item>
+             <item row="24" column="0">
+              <widget class="QLabel" name="label_20">
+               <property name="text">
+                <string>拍照延时</string>
+               </property>
+              </widget>
+             </item>
+             <item row="33" column="1">
+              <widget class="QCheckBox" name="checkBoxBondFindForce">
+               <property name="text">
+                <string>CheckBox</string>
+               </property>
+              </widget>
+             </item>
+             <item row="18" column="0">
+              <widget class="QLabel" name="label_14">
+               <property name="text">
+                <string>阻塞检测</string>
+               </property>
+              </widget>
+             </item>
+             <item row="22" column="1">
+              <widget class="DoubleSpinBox" name="doubleSpinBoxPickForce">
+               <property name="minimum">
+                <double>-1000000000.000000000000000</double>
+               </property>
+               <property name="maximum">
+                <double>1000000000.000000000000000</double>
+               </property>
+              </widget>
+             </item>
+             <item row="11" column="0">
+              <widget class="QLabel" name="label_11">
+               <property name="text">
+                <string>固晶点补偿Y</string>
+               </property>
+              </widget>
+             </item>
+             <item row="1" column="0">
+              <widget class="QLabel" name="label_76">
+               <property name="text">
+                <string>是否中转</string>
+               </property>
+              </widget>
+             </item>
+             <item row="1" column="1">
+              <widget class="QCheckBox" name="checkBoxIsCalib">
+               <property name="text">
+                <string>CheckBox</string>
+               </property>
+              </widget>
+             </item>
+             <item row="41" column="0">
+              <widget class="QLabel" name="label_37">
+               <property name="text">
+                <string>吹气延时</string>
+               </property>
+              </widget>
+             </item>
+             <item row="34" column="0">
+              <widget class="QLabel" name="label_31">
+               <property name="text">
+                <string>预固晶高度</string>
+               </property>
+              </widget>
+             </item>
+             <item row="24" column="1">
+              <widget class="SpinBox" name="spinBoxPickGrabDelay"/>
+             </item>
+             <item row="25" column="0">
+              <widget class="QLabel" name="label_21">
+               <property name="text">
+                <string>取晶延时</string>
+               </property>
+              </widget>
+             </item>
+             <item row="0" column="0">
+              <widget class="QLabel" name="label_3">
+               <property name="text">
+                <string>晶粒来源</string>
+               </property>
+              </widget>
+             </item>
+             <item row="29" column="1">
+              <widget class="QLabel" name="label_73">
+               <property name="text">
+                <string/>
+               </property>
+              </widget>
+             </item>
+             <item row="17" column="1">
+              <widget class="QComboBox" name="comboBoxPickParamType">
+               <item>
+                <property name="text">
+                 <string>取晶头取晶</string>
+                </property>
+               </item>
+               <item>
+                <property name="text">
+                 <string>中转台取晶</string>
+                </property>
+               </item>
+              </widget>
+             </item>
+             <item row="29" column="0">
+              <widget class="QLabel" name="label_29">
+               <property name="text">
+                <string/>
+               </property>
+              </widget>
+             </item>
+             <item row="36" column="1">
+              <widget class="DoubleSpinBox" name="doubleSpinBoxBondPosZ">
+               <property name="minimum">
+                <double>-1000000000.000000000000000</double>
+               </property>
+               <property name="maximum">
+                <double>1000000000.000000000000000</double>
+               </property>
+              </widget>
+             </item>
+             <item row="39" column="1">
+              <widget class="SpinBox" name="spinBoxBondBlockCheckDelay"/>
+             </item>
+             <item row="38" column="1">
+              <widget class="SpinBox" name="spinBoxBondDelay"/>
+             </item>
+             <item row="34" column="1">
+              <widget class="DoubleSpinBox" name="doubleSpinBoxPreBondPosZ">
+               <property name="minimum">
+                <double>-1000000000.000000000000000</double>
+               </property>
+               <property name="maximum">
+                <double>1000000000.000000000000000</double>
+               </property>
+              </widget>
+             </item>
+             <item row="13" column="1">
+              <widget class="QLabel" name="label_74">
+               <property name="text">
+                <string/>
+               </property>
+              </widget>
+             </item>
+             <item row="35" column="0">
+              <widget class="QLabel" name="label_32">
+               <property name="text">
+                <string>固晶压力</string>
+               </property>
+              </widget>
+             </item>
+             <item row="41" column="1">
+              <widget class="SpinBox" name="spinBoxBondBlowDelay"/>
+             </item>
+             <item row="27" column="1">
+              <widget class="SpinBox" name="spinBoxPickVacDelay"/>
+             </item>
+             <item row="38" column="0">
+              <widget class="QLabel" name="label_34">
+               <property name="text">
+                <string>固晶延时</string>
+               </property>
+              </widget>
+             </item>
+             <item row="7" column="0">
+              <widget class="QLabel" name="label_7">
+               <property name="text">
+                <string>上视对点模板ID</string>
+               </property>
+              </widget>
+             </item>
+             <item row="23" column="1">
+              <widget class="DoubleSpinBox" name="doubleSpinBoxPickPosZ">
+               <property name="minimum">
+                <double>-1000000000.000000000000000</double>
+               </property>
+               <property name="maximum">
+                <double>1000000000.000000000000000</double>
+               </property>
+              </widget>
+             </item>
+             <item row="10" column="1">
+              <widget class="DoubleSpinBox" name="doubleSpinBoxBondOffsetX">
+               <property name="minimum">
+                <double>-1000000000.000000000000000</double>
+               </property>
+               <property name="maximum">
+                <double>1000000000.000000000000000</double>
+               </property>
+              </widget>
+             </item>
+             <item row="27" column="0">
+              <widget class="QLabel" name="label_23">
+               <property name="text">
+                <string>真空延时</string>
+               </property>
+              </widget>
+             </item>
+             <item row="39" column="0">
+              <widget class="QLabel" name="label_35">
+               <property name="text">
+                <string>阻塞/漏晶检测延时</string>
+               </property>
+              </widget>
+             </item>
+             <item row="13" column="0">
+              <widget class="QLabel" name="label_30">
+               <property name="text">
+                <string/>
+               </property>
+              </widget>
+             </item>
+             <item row="8" column="0">
+              <widget class="QLabel" name="label_8">
+               <property name="text">
+                <string>中转台取晶模板ID</string>
+               </property>
+              </widget>
+             </item>
+             <item row="12" column="0">
+              <widget class="QLabel" name="label_12">
+               <property name="text">
+                <string>固晶点补偿角度</string>
+               </property>
+              </widget>
+             </item>
+             <item row="33" column="0">
+              <widget class="QLabel" name="label_28">
+               <property name="text">
+                <string>是否寻压</string>
+               </property>
+              </widget>
+             </item>
+             <item row="6" column="0">
+              <widget class="QLabel" name="label_6">
+               <property name="text">
+                <string>固晶对点模板ID</string>
+               </property>
+              </widget>
+             </item>
+             <item row="3" column="0">
+              <widget class="QLabel" name="label_78">
+               <property name="text">
+                <string>取晶吸嘴号</string>
+               </property>
+              </widget>
+             </item>
+             <item row="26" column="1">
+              <widget class="SpinBox" name="spinBoxPickBlockCheckDelay"/>
+             </item>
+             <item row="30" column="0">
+              <widget class="QLabel" name="label_25">
+               <property name="text">
+                <string>固晶台固晶参数:</string>
+               </property>
+              </widget>
+             </item>
+             <item row="37" column="0">
+              <widget class="QLabel" name="label_33">
+               <property name="text">
+                <string>拍照延时</string>
+               </property>
+              </widget>
+             </item>
+             <item row="28" column="0">
+              <widget class="QLabel" name="label_24">
+               <property name="text">
+                <string>吹气延时</string>
+               </property>
+              </widget>
+             </item>
+             <item row="37" column="1">
+              <widget class="SpinBox" name="spinBoxBondGrabDelay"/>
+             </item>
+             <item row="11" column="1">
+              <widget class="DoubleSpinBox" name="doubleSpinBoxBondOffsetY">
+               <property name="minimum">
+                <double>-1000000000.000000000000000</double>
+               </property>
+               <property name="maximum">
+                <double>1000000000.000000000000000</double>
+               </property>
+              </widget>
+             </item>
+             <item row="5" column="0">
+              <widget class="QLabel" name="label_5">
+               <property name="text">
+                <string>固后检测模板ID</string>
+               </property>
+              </widget>
+             </item>
+             <item row="21" column="1">
+              <widget class="DoubleSpinBox" name="doubleSpinBoxPrePickZ">
+               <property name="minimum">
+                <double>-1000000000.000000000000000</double>
+               </property>
+               <property name="maximum">
+                <double>1000000000.000000000000000</double>
+               </property>
+              </widget>
+             </item>
+             <item row="22" column="0">
+              <widget class="QLabel" name="label_19">
+               <property name="text">
+                <string>取晶压力</string>
+               </property>
+              </widget>
+             </item>
+             <item row="12" column="1">
+              <widget class="DoubleSpinBox" name="doubleSpinBoxBondOffsetAngle">
+               <property name="minimum">
+                <double>-1000000000.000000000000000</double>
+               </property>
+               <property name="maximum">
+                <double>1000000000.000000000000000</double>
+               </property>
+              </widget>
+             </item>
+             <item row="32" column="0">
+              <widget class="QLabel" name="label_27">
+               <property name="text">
+                <string>漏晶检测</string>
+               </property>
+              </widget>
+             </item>
+             <item row="32" column="1">
+              <widget class="QCheckBox" name="checkBoxBondLoseCheck">
+               <property name="text">
+                <string>CheckBox</string>
+               </property>
+              </widget>
+             </item>
+             <item row="4" column="0">
+              <widget class="QLabel" name="label_4">
+               <property name="text">
+                <string>固前检测模板ID</string>
+               </property>
+              </widget>
+             </item>
+             <item row="21" column="0">
+              <widget class="QLabel" name="label_17">
+               <property name="text">
+                <string>预拾取高度</string>
+               </property>
+              </widget>
+             </item>
+             <item row="6" column="1">
+              <widget class="SpinBox" name="spinBoxBondTemp"/>
+             </item>
+             <item row="30" column="1">
+              <widget class="QComboBox" name="comboBoxBondParamType">
+               <item>
+                <property name="text">
+                 <string>中转台放晶</string>
+                </property>
+               </item>
+               <item>
+                <property name="text">
+                 <string>固晶台固晶</string>
+                </property>
+               </item>
+              </widget>
+             </item>
+             <item row="9" column="0">
+              <widget class="QLabel" name="label_9">
+               <property name="text">
+                <string>固晶吸嘴号</string>
+               </property>
+              </widget>
+             </item>
+             <item row="40" column="1">
+              <widget class="SpinBox" name="spinBoxBondVacDelay"/>
+             </item>
+             <item row="0" column="1">
+              <widget class="QComboBox" name="comboBoxDieSource">
+               <item>
+                <property name="text">
+                 <string>华夫盒</string>
+                </property>
+               </item>
+               <item>
+                <property name="text">
+                 <string>晶圆台</string>
+                </property>
+               </item>
+              </widget>
+             </item>
+             <item row="5" column="1">
+              <widget class="SpinBox" name="spinBoxPostBondTemp"/>
+             </item>
+             <item row="26" column="0">
+              <widget class="QLabel" name="label_22">
+               <property name="text">
+                <string>阻塞/漏晶检测延时</string>
+               </property>
+              </widget>
+             </item>
+             <item row="31" column="0">
+              <widget class="QLabel" name="label_26">
+               <property name="text">
+                <string>阻塞检测</string>
+               </property>
+              </widget>
+             </item>
+             <item row="18" column="1">
+              <widget class="QCheckBox" name="checkBoxPickBlockCheck">
+               <property name="text">
+                <string>CheckBox</string>
+               </property>
+              </widget>
+             </item>
+             <item row="28" column="1">
+              <widget class="SpinBox" name="spinBoxPickBlowDelay"/>
+             </item>
+             <item row="20" column="0">
+              <widget class="QLabel" name="label_16">
+               <property name="text">
+                <string>是否寻压</string>
+               </property>
+              </widget>
+             </item>
+             <item row="4" column="1">
+              <widget class="SpinBox" name="spinBoxPreBondTemp"/>
+             </item>
+             <item row="40" column="0">
+              <widget class="QLabel" name="label_36">
+               <property name="text">
+                <string>真空延时</string>
+               </property>
+              </widget>
+             </item>
+             <item row="7" column="1">
+              <widget class="SpinBox" name="spinBoxLookUpTemp"/>
+             </item>
+             <item row="2" column="1">
+              <widget class="SpinBox" name="spinBoxPickTempID"/>
+             </item>
+             <item row="10" column="0">
+              <widget class="QLabel" name="label_10">
+               <property name="text">
+                <string>固晶点补偿X</string>
+               </property>
+              </widget>
+             </item>
+             <item row="19" column="1">
+              <widget class="QCheckBox" name="checkBoxPickLoseCheck">
+               <property name="text">
+                <string>CheckBox</string>
+               </property>
+              </widget>
+             </item>
+             <item row="19" column="0">
+              <widget class="QLabel" name="label_15">
+               <property name="text">
+                <string>漏晶检测</string>
+               </property>
+              </widget>
+             </item>
+            </layout>
+           </item>
+          </layout>
+         </widget>
+        </widget>
+       </item>
+      </layout>
+     </widget>
+     <widget class="QWidget" name="tabWaferMatrix">
+      <attribute name="title">
+       <string>晶圆编程</string>
+      </attribute>
+      <layout class="QVBoxLayout" name="verticalLayout_6">
+       <item>
+        <layout class="QVBoxLayout" name="verticalLayoutWaferMatrix"/>
+       </item>
+      </layout>
+     </widget>
+     <widget class="QWidget" name="tabWaffleMatrix">
+      <attribute name="title">
+       <string>华夫盒编程</string>
+      </attribute>
+      <layout class="QVBoxLayout" name="verticalLayout_8">
+       <item>
+        <layout class="QVBoxLayout" name="verticalLayoutWaffleMatrix"/>
+       </item>
+      </layout>
+     </widget>
+    </widget>
+   </item>
+  </layout>
+ </widget>
+ <layoutdefault spacing="6" margin="11"/>
+ <customwidgets>
+  <customwidget>
+   <class>SpinBox</class>
+   <extends>QSpinBox</extends>
+   <header>Src/RewriteControl/Controls/SpinBox.h</header>
+  </customwidget>
+  <customwidget>
+   <class>DoubleSpinBox</class>
+   <extends>QDoubleSpinBox</extends>
+   <header>Src/RewriteControl/Controls/doublespinbox.h</header>
+  </customwidget>
+ </customwidgets>
+ <resources/>
+ <connections/>
+</ui>

+ 43 - 0
View/die-bonder-ui/Src/RewriteControl/Controls/DoubleSpinBox.cpp

@@ -0,0 +1,43 @@
+#include "DoubleSpinBox.h"
+#include <QLineEdit>
+#include <QEvent>
+#include <QDebug>
+
+DoubleSpinBox::DoubleSpinBox(QWidget *parent)
+	: QDoubleSpinBox(parent)
+{
+	setButtonSymbols(QAbstractSpinBox::NoButtons);
+	installEventFilter(this);
+	setMaximum(1000000000);
+	setMinimum(-100000000);
+
+	m_lineEdit = this->lineEdit();
+	connect(m_lineEdit, &QLineEdit::textChanged, this, [=]() {
+		m_valueChangeFalg = true;
+
+		});
+	// 连接 editingFinished 信号来处理编辑完成事件
+	connect(this, &QDoubleSpinBox::editingFinished, this, [=]() {
+		if (m_valueChangeFalg)
+		{
+			emit editDone();
+		}
+		});
+}
+
+DoubleSpinBox::~DoubleSpinBox()
+{
+}
+
+
+bool DoubleSpinBox::eventFilter(QObject *watched, QEvent *event)
+{
+	if (event->type() == QEvent::Wheel) {
+		return true;
+	} else {
+		return QDoubleSpinBox::eventFilter(watched, event);
+	}
+}
+
+
+

+ 23 - 0
View/die-bonder-ui/Src/RewriteControl/Controls/DoubleSpinBox.h

@@ -0,0 +1,23 @@
+#pragma once
+#include <QObject>
+#include <QDoubleSpinBox>
+
+class DoubleSpinBox : public QDoubleSpinBox
+{
+	Q_OBJECT
+
+public:
+	DoubleSpinBox(QWidget *parent = nullptr);
+	~DoubleSpinBox();
+	virtual bool eventFilter(QObject *watched, QEvent *event) override;
+
+signals:
+	void editDone();
+
+private:
+	QLineEdit* m_lineEdit{ nullptr };
+
+	bool m_valueChangeFalg = false;
+
+
+};

+ 42 - 0
View/die-bonder-ui/Src/RewriteControl/Controls/SpinBox.cpp

@@ -0,0 +1,42 @@
+#include "SpinBox.h"
+#include <QLineEdit>
+#include <QEvent>
+#include <QDebug>
+
+
+SpinBox::SpinBox(QWidget *parent)
+	: QSpinBox(parent)
+{
+	setButtonSymbols(QAbstractSpinBox::NoButtons);
+	m_lineEdit = this->lineEdit();
+	connect(m_lineEdit, &QLineEdit::textChanged, this, [=]() {
+		m_valueChangeFalg = true;
+
+		});
+	installEventFilter(this);
+
+	// 连接 editingFinished 信号来处理编辑完成事件
+	connect(this, &QSpinBox::editingFinished, this, [=]() {
+		if (m_valueChangeFalg)
+		{
+			emit editDone();
+		}
+		});
+
+	qDebug() << "create spinBox !!!!!";
+
+}
+
+SpinBox::~SpinBox()
+{
+}
+
+
+bool SpinBox::eventFilter(QObject *watched, QEvent *event)
+{
+	if (event->type() == QEvent::Wheel) {
+		return true;
+	} else {
+		return QSpinBox::eventFilter(watched, event);
+	}
+}

+ 22 - 0
View/die-bonder-ui/Src/RewriteControl/Controls/SpinBox.h

@@ -0,0 +1,22 @@
+#pragma once
+#include <QObject>
+#include <QSpinBox>
+class SpinBox : public QSpinBox
+{
+	Q_OBJECT
+
+public:
+	SpinBox(QWidget* parent = nullptr);
+	~SpinBox();
+	virtual bool eventFilter(QObject* watched, QEvent* event) override;
+
+signals:
+	void editDone();
+
+private:
+	QLineEdit* m_lineEdit{ nullptr };
+
+	bool m_valueChangeFalg = false;
+
+
+};

+ 414 - 0
View/die-bonder-ui/Src/WaffleProgramPage.cpp

@@ -0,0 +1,414 @@
+#include "WaffleProgramPage.h"
+#include <QGroupBox>
+#include <QLineEdit>
+#include "Src/RewriteControl/Controls/SpinBox.h"
+#include "Src/RewriteControl/Controls/DoubleSpinBox.h"
+#include <QLabel>
+
+
+WaffleProgramPage::WaffleProgramPage(QWidget* parent)
+	:QWidget(parent)
+{
+	ui.setupUi(this);
+
+	setStyleSheet(
+		"QDoubleSpinBox{background: #FFFFFF;border: 1px solid #BABBDC;border - radius: 6px;padding: 2px 5px;}"
+		"QSpinBox{background: #FFFFFF;border: 1px solid #BABBDC;border - radius: 6px;padding: 2px 5px;}"
+		"QLineEdit{background: #FFFFFF;border: 1px solid #BABBDC;border - radius: 6px;padding: 2px 5px;}"
+		"QCheckBox::indicator{width: 20px;height: 20px;}"
+		"QCheckBox::indicator:unchecked{background - color: #FFFFFF;border-radius: 2px;}"
+		"QComboBox{background: #FFFFFF;border: 1px solid #BABBDC;border - radius: 6px;padding: 2px 5px;}"
+		"QComboBox::drop - down{width: 20px;}"
+	);
+
+	m_manageDB = CManageDB::GetInstance();
+	if (m_manageDB == nullptr) return;
+	m_pProduct = m_manageDB->GetCProduct();
+	if (m_pProduct == nullptr) return;
+
+	initPage();
+
+}
+
+
+
+WaffleProgramPage::~WaffleProgramPage()
+{
+
+}
+
+void WaffleProgramPage::AddMatrixPage(int vectorIndex, PROGRAM_WAFFLE_MATRIX_STRUCT matrixData, std::vector<PROGRAM_DIE_MATRIX_STRUCT> vecSubMatrix)
+{
+	int matrixNum = m_mapSubMatrixControls.size();
+	int newMatrixID = ++matrixNum;
+	QVector<QObject*> vecControls;
+
+	QGroupBox* groupBox = new QGroupBox();
+
+
+
+	QGridLayout* outMatrixGridLayout = new QGridLayout();
+	outMatrixGridLayout->setSpacing(6);
+	outMatrixGridLayout->setObjectName(QString::fromUtf8("subGridLayout"));
+	groupBox->setLayout(outMatrixGridLayout);
+
+
+	QGridLayout* subGridLayout = new QGridLayout();
+	subGridLayout->setSpacing(6);
+	subGridLayout->setObjectName(QString::fromUtf8("subGridLayout"));
+	//groupBox->setLayout(subGridLayout);
+
+
+	QLabel* labelTitle = new QLabel(this);
+	labelTitle->setObjectName(QString::fromUtf8("labelTitle"));
+	labelTitle->setText(tr("Sub Matrix ") + QString::number(vectorIndex));
+	subGridLayout->addWidget(labelTitle, 0, 0, 1, 1);
+	vecControls.push_back(labelTitle);
+
+	QLabel* labelRow = new QLabel(this);
+	labelRow->setObjectName(QString::fromUtf8("labelRow"));
+	labelRow->setText(tr("Row "));
+	subGridLayout->addWidget(labelRow, 1, 0, 1, 1);
+	vecControls.push_back(labelRow);
+
+	SpinBox* spinBoxRow = new SpinBox(this);
+	spinBoxRow->setObjectName(QString::fromUtf8("spinBoxRow"));
+	subGridLayout->addWidget(spinBoxRow, 1, 1, 1, 1);
+	vecControls.push_back(spinBoxRow);
+
+	QLabel* labelCol = new QLabel(this);
+	labelCol->setObjectName(QString::fromUtf8("labelCol"));
+	labelCol->setText(tr("Cow "));
+	subGridLayout->addWidget(labelCol, 2, 0, 1, 1);
+	vecControls.push_back(labelCol);
+
+	SpinBox* spinBoxCol = new SpinBox(this);
+	spinBoxCol->setObjectName(QString::fromUtf8("spinBoxCol"));
+	subGridLayout->addWidget(spinBoxCol, 2, 1, 1, 1);
+	vecControls.push_back(spinBoxCol);
+
+	QLabel* labelLeftTop = new QLabel(this);
+	labelLeftTop->setObjectName(QString::fromUtf8("labelLeftTop"));
+	labelLeftTop->setText(tr("Left Top Pos "));
+	subGridLayout->addWidget(labelLeftTop, 4, 0, 1, 1);
+	vecControls.push_back(labelLeftTop);
+
+	DoubleSpinBox* doubleSpinBoxLeftTopX = new DoubleSpinBox(this);
+	doubleSpinBoxLeftTopX->setObjectName(QString::fromUtf8("doubleSpinBoxLeftTopX"));
+	subGridLayout->addWidget(doubleSpinBoxLeftTopX, 4, 1, 1, 1);
+	vecControls.push_back(doubleSpinBoxLeftTopX);
+
+	DoubleSpinBox* doubleSpinBoxLeftTopY = new DoubleSpinBox(this);
+	doubleSpinBoxLeftTopY->setObjectName(QString::fromUtf8("doubleSpinBoxLeftTopY"));
+	subGridLayout->addWidget(doubleSpinBoxLeftTopY, 4, 2, 1, 1);
+	vecControls.push_back(doubleSpinBoxLeftTopY);
+
+	QLabel* labelRightTopPos = new QLabel(this);
+	labelRightTopPos->setObjectName(QString::fromUtf8("labelRightTopPos"));
+	labelRightTopPos->setText(tr("Right Top Pos "));
+	subGridLayout->addWidget(labelRightTopPos, 5, 0, 1, 1);
+	vecControls.push_back(labelRightTopPos);
+
+	DoubleSpinBox* doubleSpinBoxRightTopX = new DoubleSpinBox(this);
+	doubleSpinBoxRightTopX->setObjectName(QString::fromUtf8("doubleSpinBoxRightTopX"));
+	subGridLayout->addWidget(doubleSpinBoxRightTopX, 5, 1, 1, 1);
+	vecControls.push_back(doubleSpinBoxRightTopX);
+
+	DoubleSpinBox* doubleSpinBoxRightTopY = new DoubleSpinBox(this);
+	doubleSpinBoxRightTopY->setObjectName(QString::fromUtf8("doubleSpinBoxRightTopY"));
+	subGridLayout->addWidget(doubleSpinBoxRightTopY, 5, 2, 1, 1);
+	vecControls.push_back(doubleSpinBoxRightTopY);
+
+	QLabel* labelRightButtomPos = new QLabel(this);
+	labelRightButtomPos->setObjectName(QString::fromUtf8("labelRightButtomPos"));
+	labelRightButtomPos->setText(tr("Right Buttom pos"));
+	subGridLayout->addWidget(labelRightButtomPos, 6, 0, 1, 1);
+	vecControls.push_back(labelRightButtomPos);
+
+	DoubleSpinBox* doubleSpinBoxRightButtomX = new DoubleSpinBox(this);
+	doubleSpinBoxRightButtomX->setObjectName(QString::fromUtf8("doubleSpinBoxRightButtomX"));
+	subGridLayout->addWidget(doubleSpinBoxRightButtomX, 6, 1, 1, 1);
+	vecControls.push_back(doubleSpinBoxRightButtomX);
+
+	DoubleSpinBox* doubleSpinBoxRightButtomY = new DoubleSpinBox(this);
+	doubleSpinBoxRightButtomY->setObjectName(QString::fromUtf8("doubleSpinBoxRightButtomY"));
+	subGridLayout->addWidget(doubleSpinBoxRightButtomY, 6, 2, 1, 1);
+	vecControls.push_back(doubleSpinBoxRightTopX);
+
+	QLabel* labelNoBondPts = new QLabel(this);
+	labelNoBondPts->setObjectName(QString::fromUtf8("labelNoBondPts"));
+	labelNoBondPts->setText(tr("No Bond Points"));
+	subGridLayout->addWidget(labelNoBondPts, 7, 0, 1, 1);
+	vecControls.push_back(labelNoBondPts);
+
+	QLineEdit* lineEditNoBondPts = new QLineEdit(this);
+	lineEditNoBondPts->setObjectName(QString::fromUtf8("lineEditNoBondPts"));
+	subGridLayout->addWidget(lineEditNoBondPts, 7, 1, 1, 2);
+	vecControls.push_back(lineEditNoBondPts);
+
+	outMatrixGridLayout->addLayout(subGridLayout, 0, 0);
+
+	QFrame* line = new QFrame();
+	line->setFrameShape(QFrame::NoFrame); // 移除默认框架
+	line->setFixedHeight(2);         // 设置固定高度
+	line->setStyleSheet("background-color: #C7CAEB;");
+	outMatrixGridLayout->addWidget(line);
+
+	ui.verticalLayout->addWidget(groupBox);
+
+	for (int j = 0; j < matrixData.VecDieMatrixId.size(); j++)
+	{
+		for (int i = 0; i < m_vecSubWaffleMatrix.size(); i++)
+		{
+			if (matrixData.VecDieMatrixId[j] == m_vecSubWaffleMatrix[i].MatrixId)
+			{
+				AddSubMatrixPage(i, m_vecSubWaffleMatrix[i], outMatrixGridLayout);
+			}
+		}
+	}
+
+	//for (int i = 0; i = vecSubMatrix.size(); i++)
+	//{
+	//	AddSubMatrixPage(i, vecSubMatrix[i], outMatrixGridLayout);
+	//}
+
+
+	connect(spinBoxRow, &SpinBox::editDone, this, [=]() {
+		m_vecWaffleMatrix[vectorIndex].PackRow = spinBoxRow->value();
+		});
+
+	connect(spinBoxCol, &SpinBox::editDone, this, [=]() {
+		m_vecWaffleMatrix[vectorIndex].PackCol = spinBoxCol->value();
+		});
+
+	connect(doubleSpinBoxLeftTopX, &DoubleSpinBox::editDone, this, [=]() {
+		m_vecWaffleMatrix[vectorIndex].LeftTopPoint.x = doubleSpinBoxLeftTopX->value();
+		});
+	 
+	connect(doubleSpinBoxLeftTopY, &DoubleSpinBox::editDone, this, [=]() {
+		m_vecWaffleMatrix[vectorIndex].LeftTopPoint.y = doubleSpinBoxLeftTopY->value();
+		});
+
+	connect(doubleSpinBoxRightTopX, &DoubleSpinBox::editDone, this, [=]() {
+		m_vecWaffleMatrix[vectorIndex].RightTopPoint.x = doubleSpinBoxRightTopX->value();
+		});
+
+	connect(doubleSpinBoxRightTopY, &DoubleSpinBox::editDone, this, [=]() {
+		m_vecWaffleMatrix[vectorIndex].RightTopPoint.y = doubleSpinBoxRightTopY->value();
+		});
+
+	connect(doubleSpinBoxRightButtomX, &DoubleSpinBox::editDone, this, [=]() {
+		m_vecWaffleMatrix[vectorIndex].RightBottomPoint.x = doubleSpinBoxRightButtomX->value();
+		});
+
+	connect(doubleSpinBoxRightButtomY, &DoubleSpinBox::editDone, this, [=]() {
+		m_vecWaffleMatrix[vectorIndex].RightBottomPoint.y = doubleSpinBoxRightButtomY->value();
+		});
+
+	connect(lineEditNoBondPts, &QLineEdit::textChanged, this, [=]() {
+		});
+
+
+}
+
+void WaffleProgramPage::AddSubMatrixPage(int subVectorIndex, PROGRAM_DIE_MATRIX_STRUCT subMatrix, QGridLayout* layout)
+{
+	QVector<QObject*> vecControls;
+
+	QGridLayout* subGridLayout = new QGridLayout();
+	subGridLayout->setSpacing(6);
+	subGridLayout->setObjectName(QString::fromUtf8("subGridLayout"));
+	//groupBox->setLayout(subGridLayout);
+
+
+	QLabel* labelTitle = new QLabel(this);
+	labelTitle->setObjectName(QString::fromUtf8("labelTitle"));
+	labelTitle->setText(tr("Sub Matrix ") + QString::number(subVectorIndex));
+	subGridLayout->addWidget(labelTitle, 0, 0, 1, 1);
+	vecControls.push_back(labelTitle);
+	labelTitle->setStyleSheet("background-color: #F0F0F0;");
+
+	QLabel* labelRow = new QLabel(this);
+	labelRow->setObjectName(QString::fromUtf8("labelRow"));
+	labelRow->setText(tr("Row "));
+	subGridLayout->addWidget(labelRow, 1, 0, 1, 1);
+	vecControls.push_back(labelRow);
+
+	SpinBox* spinBoxRow = new SpinBox(this);
+	spinBoxRow->setObjectName(QString::fromUtf8("spinBoxRow"));
+	subGridLayout->addWidget(spinBoxRow, 1, 1, 1, 1);
+	vecControls.push_back(spinBoxRow);
+
+	QLabel* labelCol = new QLabel(this);
+	labelCol->setObjectName(QString::fromUtf8("labelCol"));
+	labelCol->setText(tr("Cow "));
+	subGridLayout->addWidget(labelCol, 2, 0, 1, 1);
+	vecControls.push_back(labelCol);
+
+	SpinBox* spinBoxCol = new SpinBox(this);
+	spinBoxCol->setObjectName(QString::fromUtf8("spinBoxCol"));
+	subGridLayout->addWidget(spinBoxCol, 2, 1, 1, 1);
+	vecControls.push_back(spinBoxCol);
+
+	QLabel* labelLeftTop = new QLabel(this);
+	labelLeftTop->setObjectName(QString::fromUtf8("labelLeftTop"));
+	labelLeftTop->setText(tr("Left Top Pos "));
+	subGridLayout->addWidget(labelLeftTop, 4, 0, 1, 1);
+	vecControls.push_back(labelLeftTop);
+
+	DoubleSpinBox* doubleSpinBoxLeftTopX = new DoubleSpinBox(this);
+	doubleSpinBoxLeftTopX->setObjectName(QString::fromUtf8("doubleSpinBoxLeftTopX"));
+	subGridLayout->addWidget(doubleSpinBoxLeftTopX, 4, 1, 1, 1);
+	vecControls.push_back(doubleSpinBoxLeftTopX);
+
+	DoubleSpinBox* doubleSpinBoxLeftTopY = new DoubleSpinBox(this);
+	doubleSpinBoxLeftTopY->setObjectName(QString::fromUtf8("doubleSpinBoxLeftTopY"));
+	subGridLayout->addWidget(doubleSpinBoxLeftTopY, 4, 2, 1, 1);
+	vecControls.push_back(doubleSpinBoxLeftTopY);
+
+	QLabel* labelRightTopPos = new QLabel(this);
+	labelRightTopPos->setObjectName(QString::fromUtf8("labelRightTopPos"));
+	labelRightTopPos->setText(tr("Right Top Pos "));
+	subGridLayout->addWidget(labelRightTopPos, 5, 0, 1, 1);
+	vecControls.push_back(labelRightTopPos);
+
+	DoubleSpinBox* doubleSpinBoxRightTopX = new DoubleSpinBox(this);
+	doubleSpinBoxRightTopX->setObjectName(QString::fromUtf8("doubleSpinBoxRightTopX"));
+	subGridLayout->addWidget(doubleSpinBoxRightTopX, 5, 1, 1, 1);
+	vecControls.push_back(doubleSpinBoxRightTopX);
+
+	DoubleSpinBox* doubleSpinBoxRightTopY = new DoubleSpinBox(this);
+	doubleSpinBoxRightTopY->setObjectName(QString::fromUtf8("doubleSpinBoxRightTopY"));
+	subGridLayout->addWidget(doubleSpinBoxRightTopY, 5, 2, 1, 1);
+	vecControls.push_back(doubleSpinBoxRightTopY);
+
+	QLabel* labelRightButtomPos = new QLabel(this);
+	labelRightButtomPos->setObjectName(QString::fromUtf8("labelRightButtomPos"));
+	labelRightButtomPos->setText(tr("Right Buttom pos"));
+	subGridLayout->addWidget(labelRightButtomPos, 6, 0, 1, 1);
+	vecControls.push_back(labelRightButtomPos);
+
+	DoubleSpinBox* doubleSpinBoxRightButtomX = new DoubleSpinBox(this);
+	doubleSpinBoxRightButtomX->setObjectName(QString::fromUtf8("doubleSpinBoxRightButtomX"));
+	subGridLayout->addWidget(doubleSpinBoxRightButtomX, 6, 1, 1, 1);
+	vecControls.push_back(doubleSpinBoxRightButtomX);
+
+	DoubleSpinBox* doubleSpinBoxRightButtomY = new DoubleSpinBox(this);
+	doubleSpinBoxRightButtomY->setObjectName(QString::fromUtf8("doubleSpinBoxRightButtomY"));
+	subGridLayout->addWidget(doubleSpinBoxRightButtomY, 6, 2, 1, 1);
+	vecControls.push_back(doubleSpinBoxRightTopX);
+
+	QLabel* labelNoBondPts = new QLabel(this);
+	labelNoBondPts->setObjectName(QString::fromUtf8("labelNoBondPts"));
+	labelNoBondPts->setText(tr("No Bond Points"));
+	subGridLayout->addWidget(labelNoBondPts, 7, 0, 1, 1);
+	vecControls.push_back(labelNoBondPts);
+
+	QLineEdit* lineEditNoBondPts = new QLineEdit(this);
+	lineEditNoBondPts->setObjectName(QString::fromUtf8("lineEditNoBondPts"));
+	subGridLayout->addWidget(lineEditNoBondPts, 7, 1, 1, 2);
+	vecControls.push_back(lineEditNoBondPts);
+
+	layout->addLayout(subGridLayout, 11, 0);
+
+	QFrame* line = new QFrame();
+	line->setFrameShape(QFrame::NoFrame); // 移除默认框架
+	line->setFixedHeight(2);         // 设置固定高度
+	line->setStyleSheet("background-color: #C7CAEB;");
+	ui.verticalLayout->addWidget(line);
+
+	connect(spinBoxRow, &SpinBox::editDone, this, [=]() {
+		m_vecSubWaffleMatrix[subVectorIndex].MatrixRow = spinBoxRow->value();
+		});
+
+	connect(spinBoxCol, &SpinBox::editDone, this, [=]() {
+		m_vecSubWaffleMatrix[subVectorIndex].MatrixCol = spinBoxCol->value();
+		});
+
+	connect(doubleSpinBoxLeftTopX, &DoubleSpinBox::editDone, this, [=]() {
+		m_vecSubWaffleMatrix[subVectorIndex].LeftTopPoint.x = doubleSpinBoxLeftTopX->value();
+		});
+
+	connect(doubleSpinBoxLeftTopY, &DoubleSpinBox::editDone, this, [=]() {
+		m_vecSubWaffleMatrix[subVectorIndex].LeftTopPoint.y = doubleSpinBoxLeftTopY->value();
+		});
+
+	connect(doubleSpinBoxRightTopX, &DoubleSpinBox::editDone, this, [=]() {
+		m_vecSubWaffleMatrix[subVectorIndex].RightTopPoint.x = doubleSpinBoxRightTopX->value();
+		});
+
+	connect(doubleSpinBoxRightTopY, &DoubleSpinBox::editDone, this, [=]() {
+		m_vecSubWaffleMatrix[subVectorIndex].RightTopPoint.y = doubleSpinBoxRightTopY->value();
+		});
+
+	connect(doubleSpinBoxRightButtomX, &DoubleSpinBox::editDone, this, [=]() {
+		m_vecSubWaffleMatrix[subVectorIndex].RightBottomPoint.x = doubleSpinBoxRightButtomX->value();
+		});
+
+	connect(doubleSpinBoxRightButtomY, &DoubleSpinBox::editDone, this, [=]() {
+		m_vecSubWaffleMatrix[subVectorIndex].RightBottomPoint.y = doubleSpinBoxRightButtomY->value();
+		});
+
+	connect(lineEditNoBondPts, &QLineEdit::textChanged, this, [=]() {
+		});
+
+
+
+
+}
+
+void WaffleProgramPage::SaveAllParam()
+{
+}
+
+void WaffleProgramPage::MatrixChangeEvent()
+{
+	for (PROGRAM_WAFFLE_MATRIX_STRUCT& waffleMatrix : m_vecWaffleMatrix)
+	{
+		m_pProduct->SetWaffleMatrix(waffleMatrix.MatrixId, waffleMatrix);
+	}
+
+	m_pProduct->SetDieMatrix(m_vecSubWaffleMatrix, true);
+
+	//for (PROGRAM_BOND_MATRIX_STRUCT& bondMatrix : m_vecWaffleMatrix)
+	//{
+	//	m_manageDB->GetCProduct()->SetBondMatrix(bondMatrix.BondMatrixId, bondMatrix);
+	//}
+
+	//for (PROGRAM_POINT_MATRIX_STRUCT& pointMatrix : m_vecSubMatrixs)
+	//{
+	//	m_manageDB->GetCProduct()->SetPointMatrix(pointMatrix.MatrixId, pointMatrix);
+	//}
+}
+
+void WaffleProgramPage::initPage()
+{
+	m_vecWaffleMatrix = m_pProduct->GetWaffleMatrix();
+	for (int i = 0; i < m_vecWaffleMatrix.size(); i++)
+	{
+		for (int j = 0; j < m_vecWaffleMatrix[i].VecDieMatrixId.size(); j++)
+		{
+			PROGRAM_DIE_MATRIX_STRUCT subMatrix;
+			m_pProduct->GetDieMatrix(m_vecWaffleMatrix[i].VecDieMatrixId[j], subMatrix);
+			m_vecSubWaffleMatrix.push_back(subMatrix);
+			//AddMatrixPage(i, j, subMatrix);
+		}
+		AddMatrixPage(i, m_vecWaffleMatrix[i], m_vecSubWaffleMatrix);
+
+		//for (int j = 0; j < m_vecWaffleMatrix[i].VecDieMatrixId.size(); j++)
+		//{
+		//	for (int k = 0; k < m_vecSubWaffleMatrix.size(); k++)
+		//	{
+		//		if (m_vecWaffleMatrix[i].VecDieMatrixId[j] == m_vecSubWaffleMatrix[k].MatrixId)
+		//		{
+		//			AddSubMatrixPage(i, m_vecSubWaffleMatrix[k],nullptr);
+		//		}
+		//	}
+		//}
+	}
+
+
+
+
+
+}

+ 56 - 0
View/die-bonder-ui/Src/WaffleProgramPage.h

@@ -0,0 +1,56 @@
+#pragma once
+
+#include <QWidget>
+#include "ui_WaffleProgramPage.h"
+#include "CViewInterface.h"
+
+class WaffleProgramPage : public QWidget
+{
+	Q_OBJECT
+
+public:
+	WaffleProgramPage(QWidget* parent = nullptr);
+	~WaffleProgramPage();
+
+private:
+	//新增矩阵界面
+	void AddMatrixPage(int vectorIndex, PROGRAM_WAFFLE_MATRIX_STRUCT matrixData, std::vector<PROGRAM_DIE_MATRIX_STRUCT> vecSubMatrix);
+
+	//void AddOutMatrixPage(int vectorIndex, PROGRAM_BOND_MATRIX_STRUCT matrixData);
+
+	void AddSubMatrixPage(int subVectorIndex,PROGRAM_DIE_MATRIX_STRUCT subMatrix, QGridLayout* layout);
+
+	//往后端新增矩阵数据
+	void AddMatrixParam();
+
+
+	//保存所有参数到后端内存中
+	void SaveAllParam();
+
+
+	//参数被修改后发送给后端
+	void MatrixChangeEvent();
+
+
+	void initPage();
+
+private:
+	Ui::WaffleProgramPageClass ui;
+
+	CManageDB* m_manageDB = nullptr;
+
+	CProduct* m_pProduct = nullptr;
+
+	std::vector<PROGRAM_WAFFLE_MATRIX_STRUCT> m_vecWaffleMatrix;
+
+	std::vector<PROGRAM_DIE_MATRIX_STRUCT> m_vecSubWaffleMatrix;
+
+
+
+	//子矩阵控件,ID从1开始
+	QMap<int, QVector<QObject*>> m_mapSubMatrixControls;
+
+	int m_curPtIndex = 0;
+
+
+};

+ 44 - 0
View/die-bonder-ui/Src/WaffleProgramPage.ui

@@ -0,0 +1,44 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
+ <class>WaffleProgramPageClass</class>
+ <widget class="QWidget" name="WaffleProgramPageClass">
+  <property name="geometry">
+   <rect>
+    <x>0</x>
+    <y>0</y>
+    <width>621</width>
+    <height>864</height>
+   </rect>
+  </property>
+  <property name="windowTitle">
+   <string>WaffleProgramPage</string>
+  </property>
+  <layout class="QVBoxLayout" name="verticalLayout_2">
+   <item>
+    <widget class="QScrollArea" name="scrollArea">
+     <property name="widgetResizable">
+      <bool>true</bool>
+     </property>
+     <widget class="QWidget" name="scrollAreaWidgetContents">
+      <property name="geometry">
+       <rect>
+        <x>0</x>
+        <y>0</y>
+        <width>597</width>
+        <height>840</height>
+       </rect>
+      </property>
+      <layout class="QVBoxLayout" name="verticalLayout_3">
+       <item>
+        <layout class="QVBoxLayout" name="verticalLayout"/>
+       </item>
+      </layout>
+     </widget>
+    </widget>
+   </item>
+  </layout>
+ </widget>
+ <layoutdefault spacing="6" margin="11"/>
+ <resources/>
+ <connections/>
+</ui>