好分数,军队扫描采用UTF8格式比较

This commit is contained in:
gb 2023-11-17 16:52:28 +08:00
parent 03be4693dc
commit 0b5aeff5ab
1 changed files with 19 additions and 5 deletions

View File

@ -1002,11 +1002,18 @@ Result huagao_ds::identityOpenDs(const Identity& id)
if (double_check_mode_ == 0)
{
char pe[MAX_PATH] = { 0 }, * name = NULL;
std::string utf8("");
GetModuleFileNameA(NULL, pe, _countof(pe) - 1);
name = strrchr(pe, '\\');
if (name++ == NULL)
name = pe;
if (STRICMP(name, "\u597D\u5206\u6570\u9605\u5377\u626B\u63CF\u7AEF.exe") == 0)
#ifdef WIN32
utf8 = utils::ansi2utf8(name);
#else
utf8 = name;
#endif
if (STRICMP(utf8.c_str(), "\345\245\275\345\210\206\346\225\260\351\230\205\345\215\267\346\211\253\346\217\217\347\253\257.exe") == 0)
double_check_mode_ = DOUBLE_CHECK_ULTRASONIC;
else
double_check_mode_ = DOUBLE_CHECK_TWAIN;
@ -1017,11 +1024,18 @@ Result huagao_ds::identityOpenDs(const Identity& id)
if (nobd == -1)
{
char pe[MAX_PATH] = { 0 }, * name = NULL;
std::string utf8("");
GetModuleFileNameA(NULL, pe, _countof(pe) - 1);
name = strrchr(pe, '\\');
if (name++ == NULL)
name = pe;
if (STRICMP(name, "\u519B\u961F\u626B\u63CF2.0.exe") == 0) // 军队扫描2.0.exe
#ifdef WIN32
utf8 = utils::ansi2utf8(name);
#else
utf8 = name;
#endif
if (STRICMP(name, "\345\206\233\351\230\237\346\211\253\346\217\2172.0.exe") == 0) // å†é˜Ÿæ‰«æ<C2AB><C3A6>2.0.exe
nobd = 1;
else
nobd = 0;
@ -1247,7 +1261,7 @@ Result huagao_ds::imageInfoGet(const Identity&, ImageInfo& data)
//if (!scanner_->wait_image())
//{
//// notifyCloseOk();
// return success(); // 好分数需要返回成<EFBFBD>?
// return success(); // 好分数需è¦<EFBFBD>è¿”åžæˆ<EFBFBD>ï¿?
//}
if (get_scanned_image_count(-1) > 0) // 显示设置界面时不能阻塞在EndXfer否则最后一张图片传输后显示不出来故在此做阻塞调用
{
@ -1654,7 +1668,7 @@ Result huagao_ds::call(const Identity& origin, DataGroup dg, Dat dat, Msg msg, v
Result rt;
char dgs[20] = { 0 }, dts[20] = { 0 }, ms[20] = { 0 }, ss[20] = { 0 }, rcs[20] = { 0 }, cs[20] = { 0 };
//trigger_ProcessEvent(dg, dat, msg); // some APPs may be not trigger (Control, Event, ProcessEvent), we help them :( ... // 云阅卷扫描端不等状态改变直接取图此处设置一次状<EFBFBD>?2022-11-07
//trigger_ProcessEvent(dg, dat, msg); // some APPs may be not trigger (Control, Event, ProcessEvent), we help them :( ... // äºé˜…å<EFBFBD>·æ‰«æ<EFBFBD><EFBFBD>端ä¸<EFBFBD>等状æ€<EFBFBD>改å<EFBFBD>˜ï¼Œç´æŽ¥å<EFBFBD>å¾ï¼Œæ­¤å¤„设置一次状ï¿?2022-11-07
rt = Base::call(origin, dg, dat, msg, data);
if (log_all_triple_ || ((int)rt.returnCode() && rt.returnCode() != ReturnCode::NotDsEvent))
@ -3869,7 +3883,7 @@ int huagao_ds::handle_scanner_event(int ev, bool from_event_proc)
break;
case SANE_EVENT_UI_CLOSE_CANCEL:
//scanner_->stop();
//notifyCloseCancel(); // 修复点击进度<EFBFBD>?取消"按钮UI不能正常结束的BUG - added on 2023-02-14
//notifyCloseCancel(); // ä¿®å¤<EFBFBD>ç¹å‡»è¿åº¦ï¿?å<>消"按é®ï¼ŒUIä¸<C3A4>能正常结æ<E2809C>Ÿçš„BUG - added on 2023-02-14
//break;
case SANE_EVENT_UI_CLOSE_NORMAL:
case SANE_EVENT_SCAN_FINISHED: