diff --git a/docs/G100-G200.txt b/docs/G100-G200.txt index 0db537a..26e2dd9 100644 --- a/docs/G100-G200.txt +++ b/docs/G100-G200.txt @@ -1,6 +1,7 @@ { "global": { "device_type": "G100-G200", + "button_count": 0, "option_count": 66 }, "restore": { diff --git a/docs/G139-239.txt b/docs/G139-239.txt index 6a3ca7a..eb1d178 100644 --- a/docs/G139-239.txt +++ b/docs/G139-239.txt @@ -1,6 +1,7 @@ { "global": { "device_type": "G139-G239", + "button_count": 0, "option_count": 79 }, "restore": { diff --git a/docs/G300.txt b/docs/G300.txt index d1fd147..c6f08fc 100644 --- a/docs/G300.txt +++ b/docs/G300.txt @@ -1,6 +1,7 @@ { "global": { "device_type": "G300", + "button_count": 0, "option_count": 69 }, "restore": { diff --git a/docs/G302.txt b/docs/G302.txt index 2a2cf9e..878e9de 100644 --- a/docs/G302.txt +++ b/docs/G302.txt @@ -1,6 +1,7 @@ { "global": { "device_type": "G302", + "button_count": 0, "option_count": 64 }, "restore": { diff --git a/docs/G306.txt b/docs/G306.txt index 6cc2066..dfce071 100644 --- a/docs/G306.txt +++ b/docs/G306.txt @@ -1,6 +1,7 @@ { "global": { "device_type": "G300", + "button_count": 0, "option_count": 73 }, "restore": { diff --git a/docs/G400.txt b/docs/G400.txt index f99eb65..b447868 100644 --- a/docs/G400.txt +++ b/docs/G400.txt @@ -1,6 +1,7 @@ { "global": { "device_type": "G400", + "button_count": 0, "option_count": 67 }, "restore": { diff --git a/docs/G402.txt b/docs/G402.txt index 4172634..7b97fce 100644 --- a/docs/G402.txt +++ b/docs/G402.txt @@ -1,6 +1,7 @@ { "global": { "device_type": "G402", + "button_count": 0, "option_count": 64 }, "restore": { diff --git a/docs/G439.txt b/docs/G439.txt index 11c848c..0a62a91 100644 --- a/docs/G439.txt +++ b/docs/G439.txt @@ -1,6 +1,7 @@ { "global": { "device_type": "G439", + "button_count": 0, "option_count": 73 }, "restore": { diff --git a/tools/apps/hgjson/hgjsonDlg.cpp b/tools/apps/hgjson/hgjsonDlg.cpp index b1e8abc..a3e0aff 100644 --- a/tools/apps/hgjson/hgjsonDlg.cpp +++ b/tools/apps/hgjson/hgjsonDlg.cpp @@ -6030,6 +6030,7 @@ ChgjsonDlg::ChgjsonDlg(CWnd* pParent /*=NULL*/) : CDialogEx(ChgjsonDlg::IDD, pParent) , show_tree_tooltips_(true) , show_list_tooltips_(true) + , button_count_(0) { std::string py(hz_2_py::getLetter("ÑÕɫģʽ", true)); is_match("/usr/bin/python3.9", "bin*.9"); @@ -6718,6 +6719,8 @@ std::string ChgjsonDlg::to_json_text(bool for_const, std::wstring* dev) if (dev) *dev = val; glb->set_value(L"device_type", val.c_str()); + glb->set_value(L"button_count", button_count_); + jsn->set_value(L"global", glb); root = tree_.GetChildItem(root); while (root) @@ -7077,6 +7080,7 @@ bool ChgjsonDlg::load_from_json_text(const wchar_t* txt, std::wstring* err_msg) jsn->get_value(L"global", &all); if (all) { + all->get_value(L"button_count", button_count_); all->get_value(L"device_type", &val); if(val) root = add_tree_item(val, TREE_ITEM_PRODUCT); diff --git a/tools/apps/hgjson/hgjsonDlg.h b/tools/apps/hgjson/hgjsonDlg.h index e924373..ba38c29 100644 --- a/tools/apps/hgjson/hgjsonDlg.h +++ b/tools/apps/hgjson/hgjsonDlg.h @@ -105,6 +105,7 @@ public: std::vector hg_items_; bool show_tree_tooltips_; bool show_list_tooltips_; + int button_count_; // Implementation protected: diff --git a/tools/solution/Release/hgjson.exe b/tools/solution/Release/hgjson.exe index 5ec6150..a39c073 100644 Binary files a/tools/solution/Release/hgjson.exe and b/tools/solution/Release/hgjson.exe differ