设备配置文件增加硬件可配置功能按键个数功能

This commit is contained in:
yangjiaxuan 2024-04-28 15:43:24 +08:00
parent 8a502de6bd
commit 00e1501d39
11 changed files with 13 additions and 0 deletions

View File

@ -1,6 +1,7 @@
{ {
"global": { "global": {
"device_type": "G100-G200", "device_type": "G100-G200",
"button_count": 0,
"option_count": 66 "option_count": 66
}, },
"restore": { "restore": {

View File

@ -1,6 +1,7 @@
{ {
"global": { "global": {
"device_type": "G139-G239", "device_type": "G139-G239",
"button_count": 0,
"option_count": 79 "option_count": 79
}, },
"restore": { "restore": {

View File

@ -1,6 +1,7 @@
{ {
"global": { "global": {
"device_type": "G300", "device_type": "G300",
"button_count": 0,
"option_count": 69 "option_count": 69
}, },
"restore": { "restore": {

View File

@ -1,6 +1,7 @@
{ {
"global": { "global": {
"device_type": "G302", "device_type": "G302",
"button_count": 0,
"option_count": 64 "option_count": 64
}, },
"restore": { "restore": {

View File

@ -1,6 +1,7 @@
{ {
"global": { "global": {
"device_type": "G300", "device_type": "G300",
"button_count": 0,
"option_count": 73 "option_count": 73
}, },
"restore": { "restore": {

View File

@ -1,6 +1,7 @@
{ {
"global": { "global": {
"device_type": "G400", "device_type": "G400",
"button_count": 0,
"option_count": 67 "option_count": 67
}, },
"restore": { "restore": {

View File

@ -1,6 +1,7 @@
{ {
"global": { "global": {
"device_type": "G402", "device_type": "G402",
"button_count": 0,
"option_count": 64 "option_count": 64
}, },
"restore": { "restore": {

View File

@ -1,6 +1,7 @@
{ {
"global": { "global": {
"device_type": "G439", "device_type": "G439",
"button_count": 0,
"option_count": 73 "option_count": 73
}, },
"restore": { "restore": {

View File

@ -6030,6 +6030,7 @@ ChgjsonDlg::ChgjsonDlg(CWnd* pParent /*=NULL*/)
: CDialogEx(ChgjsonDlg::IDD, pParent) : CDialogEx(ChgjsonDlg::IDD, pParent)
, show_tree_tooltips_(true) , show_tree_tooltips_(true)
, show_list_tooltips_(true) , show_list_tooltips_(true)
, button_count_(0)
{ {
std::string py(hz_2_py::getLetter("ÑÕɫģʽ", true)); std::string py(hz_2_py::getLetter("ÑÕɫģʽ", true));
is_match("/usr/bin/python3.9", "bin*.9"); 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) if (dev)
*dev = val; *dev = val;
glb->set_value(L"device_type", val.c_str()); glb->set_value(L"device_type", val.c_str());
glb->set_value(L"button_count", button_count_);
jsn->set_value(L"global", glb); jsn->set_value(L"global", glb);
root = tree_.GetChildItem(root); root = tree_.GetChildItem(root);
while (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); jsn->get_value(L"global", &all);
if (all) if (all)
{ {
all->get_value(L"button_count", button_count_);
all->get_value(L"device_type", &val); all->get_value(L"device_type", &val);
if(val) if(val)
root = add_tree_item(val, TREE_ITEM_PRODUCT); root = add_tree_item(val, TREE_ITEM_PRODUCT);

View File

@ -105,6 +105,7 @@ public:
std::vector<HGITEM> hg_items_; std::vector<HGITEM> hg_items_;
bool show_tree_tooltips_; bool show_tree_tooltips_;
bool show_list_tooltips_; bool show_list_tooltips_;
int button_count_;
// Implementation // Implementation
protected: protected:

Binary file not shown.