忽略错误事件,错误代码在完成扫描事件中展示。
This commit is contained in:
parent
1841c5ab3d
commit
bed2e83fd6
|
@ -3374,21 +3374,21 @@ int scanner::handle_device_event(int ev_code, void* data, unsigned int* len)
|
|||
log_info(msg, 1);
|
||||
}
|
||||
}
|
||||
else if (ev_code == SANE_EVENT_ERROR)
|
||||
{
|
||||
if (callback::show_messagebox_ui && *len)
|
||||
{
|
||||
callback::show_messagebox_ui(app_wnd_, ev_code, (void*)data, 0);
|
||||
}
|
||||
else if (*len) //错误弹出
|
||||
{
|
||||
std::wstring msg(local_trans::a2u((char*)data, CP_UTF8));
|
||||
if (!IsWindow(app_wnd_))
|
||||
callback::bring_message_box_topmost(local_trans::lang_trans_between_hz936(CONST_STRING_ERROR).c_str());
|
||||
MessageBoxW(app_wnd_, msg.c_str(), local_trans::lang_trans_between_hz936(CONST_STRING_ERROR).c_str(), MB_OK);
|
||||
}
|
||||
// on_ui_event(ev_code, (void*)ev_code);
|
||||
}
|
||||
//else if (ev_code == SANE_EVENT_ERROR) // 屏蔽,在停止扫描时展示信息 - 2023-05-30
|
||||
//{
|
||||
// if (callback::show_messagebox_ui && *len)
|
||||
// {
|
||||
// callback::show_messagebox_ui(app_wnd_, ev_code, (void*)data, 0);
|
||||
// }
|
||||
// else if (*len) //错误弹出
|
||||
// {
|
||||
// std::wstring msg(local_trans::a2u((char*)data, CP_UTF8));
|
||||
// if (!IsWindow(app_wnd_))
|
||||
// callback::bring_message_box_topmost(local_trans::lang_trans_between_hz936(CONST_STRING_ERROR).c_str());
|
||||
// MessageBoxW(app_wnd_, msg.c_str(), local_trans::lang_trans_between_hz936(CONST_STRING_ERROR).c_str(), MB_OK);
|
||||
// }
|
||||
//// on_ui_event(ev_code, (void*)ev_code);
|
||||
//}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue