属性添加界面显示位置字段,以方便界面显示
This commit is contained in:
parent
33da0a7463
commit
354363c9ec
|
@ -347,6 +347,7 @@ known_file_util::IJsonW* CDlgOptJson::SANEOPT::to_json(void)
|
|||
jsn->set_value(L"pos", pos);
|
||||
if(fix_id > SANE_OPT_ID_BASE)
|
||||
jsn->set_value(L"fix-id", fix_id);
|
||||
jsn->set_value(L"ui-pos", ui_pos);
|
||||
jsn->set_value(L"auth", auth);
|
||||
SANEOPT::affect_str(nv, affect, false);
|
||||
if(nv)
|
||||
|
@ -754,6 +755,8 @@ bool CDlgOptJson::SANEOPT::from_json(known_file_util::IJsonW* jsn)
|
|||
|
||||
if (!jsn->get_value(L"auth", auth))
|
||||
auth = USER_PRIVILEGE_COMMON;
|
||||
if (!jsn->get_value(L"ui-pos", ui_pos))
|
||||
ui_pos = -1;
|
||||
|
||||
if (type == L"bool")
|
||||
{
|
||||
|
@ -1265,6 +1268,7 @@ void CDlgOptJson::SANEOPT::init(struct _sane_opt_json* opt)
|
|||
opt->fix_id = 0;
|
||||
opt->auth = USER_PRIVILEGE_COMMON;
|
||||
opt->pos = -1;
|
||||
opt->ui_pos = -1;
|
||||
opt->readonly = false;
|
||||
opt->visible.clear();
|
||||
opt->enable = true;
|
||||
|
@ -1347,6 +1351,7 @@ void CDlgOptJson::from_ui(SANEOPT& sop)
|
|||
sop.ver = GetDlgItemInt(IDC_EDIT_VER);
|
||||
sop.type = get_item_text(IDC_COMBO_DATA_TYPE);
|
||||
sop.pos = GetDlgItemInt(IDC_EDIT_POSITION);
|
||||
sop.ui_pos = GetDlgItemInt(IDC_EDIT_UI_POS);
|
||||
//sop.fix_id = GetDlgItemInt(IDC_EDIT_FIXED_ID);
|
||||
sop.fix_id = fix_id_edit_.value();
|
||||
sop.readonly = is_button_check(IDC_CHECK_READONLY);
|
||||
|
@ -1463,6 +1468,7 @@ void CDlgOptJson::to_ui(const SANEOPT& sop)
|
|||
auth->SetCurSel(n);
|
||||
|
||||
SetDlgItemInt(IDC_EDIT_POSITION, sop.pos);
|
||||
SetDlgItemInt(IDC_EDIT_UI_POS, sop.ui_pos);
|
||||
//SetDlgItemInt(IDC_EDIT_FIXED_ID, sop.fix_id);
|
||||
fix_id_edit_.set_value(sop.fix_id);
|
||||
|
||||
|
@ -1994,6 +2000,7 @@ BOOL CDlgOptJson::OnInitDialog()
|
|||
|
||||
tooltips_->add_tool_tip_for_ctrl(::GetDlgItem(m_hWnd, IDC_EDIT_FIXED_ID), L"\u63D0\u4F9B\u8BE5\u503C\uFF0C\u8BE5\u5C5E\u6027\u5373\u53EF\u88ABTWAIN\u534F\u8BAE\u4FA6\u6D4B\u5230");
|
||||
tooltips_->add_tool_tip_for_ctrl(::GetDlgItem(m_hWnd, IDC_EDIT_POSITION), L"\u76F8\u540C\u5206\u7C7B\u201CCategory\u201D\u4E2D\u5C5E\u6027\u7684\u6267\u884C\u987A\u5E8F\uFF0C\u6570\u5B57\u8D8A\u5C0F\u6392\u5728\u8D8A\u524D\u9762\u6267\u884C\u3002\u5982\u679C\u5C5E\u6027ID\u76F8\u540C\uFF0C\u5219\u6309\u8BE5\u503C\u987A\u5E8F\u6267\u884C\uFF1B\u5982\u679C\u8BE5\u503C\u4E5F\u76F8\u540C\uFF0C\u5219\u6309\u6700\u8FD1\u6DFB\u52A0\u7684\u5C5E\u6027\u66FF\u6362\u4E4B\u524D\u7684\u6267\u884C\u3002");
|
||||
tooltips_->add_tool_tip_for_ctrl(::GetDlgItem(m_hWnd, IDC_EDIT_UI_POS), L"\u8BE5\u5C5E\u6027\u5728\u754C\u9762\u4E0A\u663E\u793A\u7684\u987A\u5E8F");
|
||||
tooltips_->add_tool_tip_for_ctrl(::GetDlgItem(m_hWnd, IDC_EDIT_VER), L"\u5F53\u8BE5\u5C5E\u6027\u6709\u591A\u4E2A\u6E90\u63D0\u4F9B\u65F6\uFF0C\u53D6\u7248\u672C\u9AD8\u8005\u4F7F\u7528\u3002\u7248\u672C\u76F8\u540C\u65F6\uFF0C\u6309\u201CPosition\u201D\u57DF\u6392\u5E8F\u4F7F\u7528\u3002");
|
||||
|
||||
return TRUE; // return TRUE unless you set the focus to a control
|
||||
|
|
|
@ -94,6 +94,7 @@ public:
|
|||
int size;
|
||||
int ver;
|
||||
int pos;
|
||||
int ui_pos;
|
||||
int fix_id;
|
||||
int auth; // 用户权限
|
||||
bool readonly;
|
||||
|
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading…
Reference in New Issue