From 60feedf43a35a9ca69d05095a01c5d1797b1bdc3 Mon Sep 17 00:00:00 2001
From: admin <weikou2014>
Date: 星期五, 09 九月 2022 18:47:14 +0800
Subject: [PATCH] '完善'

---
 app/level2DataDlg.cpp |   17 +++++++++++++++++
 1 files changed, 17 insertions(+), 0 deletions(-)

diff --git a/app/level2DataDlg.cpp b/app/level2DataDlg.cpp
index 15d0f31..02b054a 100644
--- a/app/level2DataDlg.cpp
+++ b/app/level2DataDlg.cpp
@@ -16,6 +16,8 @@
 #ifdef _DEBUG
 #define new DEBUG_NEW
 #endif
+#include "JsonUtil.h"
+#include "tool.h"
 
 
 Level2CaptureInfo Clevel2DataDlg::level2Data;
@@ -38,6 +40,7 @@
 	ON_WM_QUERYDRAGICON()
 	ON_LBN_SELCHANGE(IDC_LIST1, &Clevel2DataDlg::OnLbnSelchangeList1)
 	ON_BN_CLICKED(IDC_BUTTON1, &Clevel2DataDlg::OnBnClickedButton1)
+	ON_BN_CLICKED(IDC_BUTTON2, &Clevel2DataDlg::OnBnClickedButton2)
 END_MESSAGE_MAP()
 
 
@@ -204,3 +207,17 @@
 		AfxMessageBox(_T("淇濆瓨鎴愬姛"));
 	}
 }
+
+//瀵煎嚭涓簀son
+void Clevel2DataDlg::OnBnClickedButton2()
+{
+	string json = JsonUtil::toJsonStr(	JsonUtil::toJson(level2Data.dataList));
+	CString root = GUITool::selectFolder(_T("璇烽�夋嫨瀵煎嚭鐨勭洰褰�"));
+	string path = (CW2A(root.GetString()));
+	if (path.length() > 0)
+	{
+		path.append("\\").append(to_string(time(0))).append(".json");
+		Tool::saveText(path, json);
+		AfxMessageBox(_T("淇濆瓨鎴愬姛"));
+	}
+}

--
Gitblit v1.8.0