#pragma once // CDlgItemMgr 对话框 #include #include #include "page.h" class CDlgItemMgr : public CDialogEx { DECLARE_DYNAMIC(CDlgItemMgr) public: CDlgItemMgr(CWnd* pParent = nullptr); // 标准构造函数 virtual ~CDlgItemMgr(); // 对话框数据 #ifdef AFX_DESIGN_TIME enum { IDD = IDD_TEST_ITEM }; #endif protected: virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV 支持 virtual BOOL OnInitDialog(); enum { STORE_FILE_SELF = 0, STORE_FILE_BACKUP, STORE_FILE_TEMP, }; std::wstring get_stored_config_file(int type = STORE_FILE_SELF); void load_from_file(const wchar_t* file); void load_stored_config(void); void init_sane_cfg(void); int find_test_item(const wchar_t* name, known_file_util::IJsonW** jsn = NULL); int find_sane_item(const wchar_t* name, known_file_util::IJsonW** jsn = NULL); void save_test_template(int type = STORE_FILE_SELF); known_file_util::IJsonW* test_tmpl_; bool lst_trigger_sel_change_; DECLARE_MESSAGE_MAP() public: CListCtrl list_; afx_msg void OnNMDblclkList1(NMHDR* pNMHDR, LRESULT* pResult); afx_msg void OnBnClickedButtonAdd(); known_file_util::IJsonW* get_all_items(void); afx_msg void OnDropFiles(HDROP hDropInfo); afx_msg void OnBnClickedButtonAdd2(); CListCtrl lst_param_; CComboBox combo_param_; CComboBox combo_param_val_; afx_msg void OnCbnSelchangeComboParamName(); static void notify_combo_param_changed(void* param); afx_msg void OnLvnItemchangedListVal(NMHDR* pNMHDR, LRESULT* pResult); afx_msg void OnNMClickList1(NMHDR* pNMHDR, LRESULT* pResult); afx_msg void OnBnClickedButtonSaveTemplate(); afx_msg void OnBnClickedButtonClear(); };