| | |
| | | #ifdef _DEBUG |
| | | #define new DEBUG_NEW |
| | | #endif |
| | | #include "JsonUtil.h" |
| | | #include "tool.h" |
| | | |
| | | |
| | | Level2CaptureInfo Clevel2DataDlg::level2Data; |
| | |
| | | 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() |
| | | |
| | | |
| | |
| | | AfxMessageBox(_T("保存成功")); |
| | | } |
| | | } |
| | | |
| | | //导出为json |
| | | 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("保存成功")); |
| | | } |
| | | } |