忽略错误事件,错误代码在完成扫描事件中展示。

This commit is contained in:
gb 2023-05-30 10:12:31 +08:00
parent 1841c5ab3d
commit bed2e83fd6
1 changed files with 15 additions and 15 deletions

View File

@ -3374,21 +3374,21 @@ int scanner::handle_device_event(int ev_code, void* data, unsigned int* len)
log_info(msg, 1); log_info(msg, 1);
} }
} }
else if (ev_code == SANE_EVENT_ERROR) //else if (ev_code == SANE_EVENT_ERROR) // 屏蔽,在停止扫描时展示信息 - 2023-05-30
{ //{
if (callback::show_messagebox_ui && *len) // if (callback::show_messagebox_ui && *len)
{ // {
callback::show_messagebox_ui(app_wnd_, ev_code, (void*)data, 0); // callback::show_messagebox_ui(app_wnd_, ev_code, (void*)data, 0);
} // }
else if (*len) //错误弹出 // else if (*len) //错误弹出
{ // {
std::wstring msg(local_trans::a2u((char*)data, CP_UTF8)); // std::wstring msg(local_trans::a2u((char*)data, CP_UTF8));
if (!IsWindow(app_wnd_)) // if (!IsWindow(app_wnd_))
callback::bring_message_box_topmost(local_trans::lang_trans_between_hz936(CONST_STRING_ERROR).c_str()); // 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); // 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); //// on_ui_event(ev_code, (void*)ev_code);
} //}
return 0; return 0;
} }