diff --git a/docs/G139-239.txt b/docs/G139-239.txt index c82698b..6a3ca7a 100644 --- a/docs/G139-239.txt +++ b/docs/G139-239.txt @@ -1427,5 +1427,22 @@ "default": "不休眠", "size": 24, "range": ["不休眠", "五分钟", "十分钟", "半小时", "一小时", "两小时", "四小时"] + }, + "token": { + "cat": "base", + "readonly": false, + "affect": 0, + "group": "feeder", + "visible": true, + "field": "Common", + "pos": 0, + "unit": "None", + "title": "锁定令牌", + "desc": "设置设备锁定令牌码", + "type": "string", + "cur": "", + "default": "", + "size": 40, + "enable": false } } \ No newline at end of file diff --git a/docs/G300.txt b/docs/G300.txt index d79e5c2..d1fd147 100644 --- a/docs/G300.txt +++ b/docs/G300.txt @@ -1244,5 +1244,22 @@ "default": "不休眠", "size": 24, "range": ["不休眠", "五分钟", "十分钟", "半小时", "一小时", "两小时", "四小时"] + }, + "token": { + "cat": "base", + "readonly": false, + "affect": 0, + "group": "feeder", + "visible": true, + "field": "Common", + "pos": 0, + "unit": "None", + "title": "锁定令牌", + "desc": "设置设备锁定令牌码", + "type": "string", + "cur": "", + "default": "", + "size": 40, + "enable": false } } \ No newline at end of file diff --git a/docs/G439.txt b/docs/G439.txt index 5d90a63..2600c05 100644 --- a/docs/G439.txt +++ b/docs/G439.txt @@ -1301,5 +1301,22 @@ "default": "不休眠", "size": 70, "range": ["不休眠", "五分钟", "十分钟", "半小时", "一小时", "两小时", "四小时"] + }, + "token": { + "cat": "base", + "readonly": false, + "affect": 0, + "group": "feeder", + "visible": true, + "field": "Common", + "pos": 0, + "unit": "None", + "title": "锁定令牌", + "desc": "设置设备锁定令牌码", + "type": "string", + "cur": "", + "default": "", + "size": 40, + "enable": false } } \ No newline at end of file diff --git a/tools/apps/hgjson/DlgOptJson.cpp b/tools/apps/hgjson/DlgOptJson.cpp index 0c5b180..2dd26fa 100644 --- a/tools/apps/hgjson/DlgOptJson.cpp +++ b/tools/apps/hgjson/DlgOptJson.cpp @@ -106,7 +106,7 @@ known_file_util::IJsonW* CDlgOptJson::SANEOPT::to_json(void) jsn->set_value(L"affect", nv); jsn->set_value(L"readonly", readonly); jsn->set_value(L"visible", open); - jsn->set_value(L"enabled", enable); + jsn->set_value(L"enable", enable); jsn->set_value(L"size", (int)sizeof(int)); if (!auto_restore_default) jsn->set_value(L"auto", auto_restore_default); @@ -304,7 +304,7 @@ bool CDlgOptJson::SANEOPT::from_json(known_file_util::IJsonW* jsn) jsn->get_value(L"pos", pos); jsn->get_value(L"readonly", readonly); jsn->get_value(L"visible", open); - jsn->get_value(L"enabled", enable); + jsn->get_value(L"enable", enable); jsn->get_value(L"fix-id", fix_id); if (!jsn->get_value(L"auto", auto_restore_default)) auto_restore_default = true; @@ -472,7 +472,7 @@ void CDlgOptJson::from_ui(SANEOPT& sop) else sop.def_val = ""; - sop.enable = is_button_check(IDC_CHECK_ENABLE); + sop.enable = is_button_check(IDC_CHECK_VISIBLE); sop.range_type = get_item_text(IDC_COMBO_RANGE); sop.depend_oper = get_item_text(IDC_COMBO_DEPEND); sop.auto_restore_default = is_button_check(IDC_CHECK_AUTO_RESTORE); @@ -538,7 +538,7 @@ void CDlgOptJson::to_ui(const SANEOPT& sop) set_button_check(IDC_CHECK_READONLY, sop.readonly); set_button_check(IDC_CHECK_PUBLIC, sop.open); - set_button_check(IDC_CHECK_ENABLE, sop.enable); + set_button_check(IDC_CHECK_VISIBLE, sop.enable); set_button_check(IDC_CHECK_AUTO_RESTORE, sop.auto_restore_default); n = range_.FindStringExact(-1, sop.range_type.c_str()); @@ -1630,7 +1630,7 @@ void CDlgOptJson::OnTreeModifyallfield() box->AddString(L"true"); //::SetWindowLong(box->m_hWnd, GWL_STYLE, (LONG)0x50010203); } - else if (n == L"Enabled") + else if (n == L"Enable") { box->AddString(L"false"); box->AddString(L"true"); @@ -1684,7 +1684,7 @@ void CDlgOptJson::OnTreeModifyallfield() for (auto& v : opts_) v.open = val == L"true"; } - else if (n == L"Enabled") + else if (n == L"Enable") { for (auto& v : opts_) v.enable = val == L"true"; diff --git a/tools/apps/hgjson/hgjson.rc b/tools/apps/hgjson/hgjson.rc index f11dd15..436d34c 100644 Binary files a/tools/apps/hgjson/hgjson.rc and b/tools/apps/hgjson/hgjson.rc differ diff --git a/tools/apps/hgjson/hgjsonDlg.cpp b/tools/apps/hgjson/hgjsonDlg.cpp index eacab1e..b1e8abc 100644 --- a/tools/apps/hgjson/hgjsonDlg.cpp +++ b/tools/apps/hgjson/hgjsonDlg.cpp @@ -5955,6 +5955,7 @@ struct , {SANE_STD_OPT_NAME_LENS_DIRTY , OPTION_TITLE_JTZWJC} , {SANE_STD_OPT_NAME_PERIOD , OPTION_TITLE_PWMZKB} , {SANE_STD_OPT_NAME_OUT_BOUNDARY , OPTION_TITLE_BJJC} + , {SANE_STD_OPT_NAME_SETTOKEN , OPTION_TITLE_SDLP} }, g_discard[] = { {SANE_STD_OPT_NAME_REVERSE_01 , "\351\273\221\347\231\275\345\233\276\345\203\217\345\217\215\350\211\262\350\276\223\345\207\272\357\274\210\346\255\243\345\270\270\351\242\234\350\211\262\344\270\272\357\274\2320-\351\273\221\350\211\262\357\274\2331-\347\231\275\350\211\262\357\274\211"} // ڰͼɫɫΪ0-ɫ1-ɫ , {SANE_STD_OPT_NAME_FILTER , "\347\201\260\345\272\246\346\210\226\351\273\221\347\231\275\345\233\276\345\203\217 - \351\231\244\350\211\262"} // ҶȻڰͼ - ɫ @@ -6432,7 +6433,7 @@ void ChgjsonDlg::set_control_status(const HGITEM& item) ((CButton*)GetDlgItem(IDC_CHECK_ADVANCED))->SetCheck(item.advanced ? BST_CHECKED : BST_UNCHECKED); ((CButton*)GetDlgItem(IDC_CHECK_READONLY))->SetCheck(item.readonly ? BST_CHECKED : BST_UNCHECKED); //((CButton*)GetDlgItem(IDC_CHECK_DEVICEONLY))->SetCheck(item.deviceonly ? BST_CHECKED : BST_UNCHECKED); - ((CButton*)GetDlgItem(IDC_CHECK_VISIBLE))->SetCheck(item.visible ? BST_CHECKED : BST_UNCHECKED); + ((CButton*)GetDlgItem(IDC_CHECK_VISIBLE))->SetCheck(item.enable ? BST_CHECKED : BST_UNCHECKED); SetDlgItemInt(IDC_EDIT_POS, item.position); field_.SetCurSel(item.field); @@ -6560,7 +6561,7 @@ void* ChgjsonDlg::create_json(int item, std::vector* def_h, std::wstring* jsn->set_value(L"affect", hg_items_[item].affect); //jsn->set_value(L"hwonly", hg_items_[item].deviceonly); jsn->set_value(L"group", hg_items_[item].group.c_str()); - jsn->set_value(L"visible", hg_items_[item].visible); + jsn->set_value(L"enable", hg_items_[item].enable); jsn->set_value(L"field", field_name(hg_items_[item].field)); jsn->set_value(L"pos", hg_items_[item].position); jsn->set_value(L"unit", unit_name(hg_items_[item].unit)); @@ -6768,7 +6769,7 @@ std::string ChgjsonDlg::to_json_text(bool for_const, std::wstring* dev) item->set_value(L"group", hg_items_[ind].group.c_str()); item->set_value(L"field", field_name(hg_items_[ind].field)); item->set_value(L"pos", hg_items_[ind].position); - item->set_value(L"visible", hg_items_[ind].visible); + item->set_value(L"enable", hg_items_[ind].enable); item->set_value(L"unit", unit_name(hg_items_[ind].unit)); item->release(); } @@ -6882,8 +6883,8 @@ void ChgjsonDlg::add_item(void* jsn_root, void* jsn_obj, HTREEITEM parent, bool } else item.group = coding::group_name(coding::group_index(grp.c_str()));; - if (!jsn->get_value(L"visible", item.visible)) - item.visible = true; + if (!jsn->get_value(L"enable", item.enable)) + item.enable = true; item.field = 0; jsn->get_value(L"field", &val); if (val) @@ -7959,7 +7960,7 @@ void ChgjsonDlg::OnBnClickedButton4() //::GetDlgItemTextW(m_hWnd, IDC_COMBO7, str, _countof(str) - 1); it->group = coding::group_name(group_.GetCurSel()); it->affect = affect_.GetCurSel() << 1; - it->visible = ((CButton*)GetDlgItem(IDC_CHECK_VISIBLE))->GetCheck() == BST_CHECKED; + it->enable = ((CButton*)GetDlgItem(IDC_CHECK_VISIBLE))->GetCheck() == BST_CHECKED; it->range.type = constraint_.GetCurSel(); it->field = field_.GetCurSel(); it->unit = unit_.GetCurSel(); diff --git a/tools/apps/hgjson/hgjsonDlg.h b/tools/apps/hgjson/hgjsonDlg.h index f7c2bf5..e924373 100644 --- a/tools/apps/hgjson/hgjsonDlg.h +++ b/tools/apps/hgjson/hgjsonDlg.h @@ -65,7 +65,7 @@ public: bool advanced; bool readonly; //bool deviceonly; // ֻ豸ϲ - use readonly - bool visible; + bool enable; int affect; int position; int field; @@ -87,7 +87,7 @@ public: group = L"base"; bytes = 4; advanced = readonly = /*deviceonly =*/ false; - visible = depend_or = true; + enable = depend_or = true; affect = position = field = unit = 0; range.type = RANGE_TYPE_NONE; } diff --git a/tools/solution/Release/cvstr.exe b/tools/solution/Release/cvstr.exe index f1e89f8..5d632da 100644 Binary files a/tools/solution/Release/cvstr.exe and b/tools/solution/Release/cvstr.exe differ diff --git a/tools/solution/Release/findqt.exe b/tools/solution/Release/findqt.exe index 8433ade..ccacce0 100644 Binary files a/tools/solution/Release/findqt.exe and b/tools/solution/Release/findqt.exe differ diff --git a/tools/solution/Release/hgjson.exe b/tools/solution/Release/hgjson.exe index 8e2f341..5ec6150 100644 Binary files a/tools/solution/Release/hgjson.exe and b/tools/solution/Release/hgjson.exe differ