From 052135296ad92a516879c5e024940365301e1175 Mon Sep 17 00:00:00 2001 From: yangjiaxuan <171295266@qq.com> Date: Fri, 8 Dec 2023 18:28:45 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E6=95=B4=E7=BC=96=E7=A0=81=E6=A0=BC?= =?UTF-8?q?=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- twain/twain/huagaods.cpp | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/twain/twain/huagaods.cpp b/twain/twain/huagaods.cpp index 9c77566..4b500fd 100644 --- a/twain/twain/huagaods.cpp +++ b/twain/twain/huagaods.cpp @@ -972,10 +972,10 @@ Twpp::Result huagao_ds::deviceEventGet(const Twpp::Identity& origin, Twpp::Devic Result huagao_ds::identityOpenDs(const Identity& id) { //singleton_ = CreateMutexA(NULL, FALSE, "LookitApp"); - //if (GetLastError() == ERROR_ALREADY_EXISTS) { //濡傛灉宸茬粡瀛樺湪鍚屽悕鐨凪utex浼氬緱鍒拌繖涓敊璇? + //if (GetLastError() == ERROR_ALREADY_EXISTS) { //婵″倹鐏夊鑼病鐎涙ê婀崥灞芥倳閻ㄥ嚜utex娴兼艾绶遍崚鎷岀箹娑擃亪鏁婄拠? // CloseHandle(singleton_); // singleton_ = NULL; - // showmsg("鎻愮?, 202); + // showmsg("閹绘劗銇?, 202); // // return { ReturnCode::Failure, ConditionCode::CapBadOperation }; //} @@ -1043,7 +1043,7 @@ Result huagao_ds::identityOpenDs(const Identity& id) name = wcsrchr(pe, L'\\'); if (name++ == NULL) name = pe; - if (wcsicmp(name, L"\u597D\u5206\u6570\u9605\u5377\u626B\u63CF\u7AEF.exe") == 0) // 爱云校PE:好分数阅卷扫描?exe + if (wcsicmp(name, L"\u597D\u5206\u6570\u9605\u5377\u626B\u63CF\u7AEF.exe") == 0) // 爱云校PE:好分数阅卷扫描端.exe double_check_mode_ = DOUBLE_CHECK_ULTRASONIC; else double_check_mode_ = DOUBLE_CHECK_TWAIN; @@ -1104,7 +1104,7 @@ Result huagao_ds::pendingXfersGet(const Identity&, PendingXfers& data) // 显示设置界面时,不能阻塞在EndXfer,否则最后一张图片传输后显示不出来,故在此做阻塞调用 int cnt = get_scanned_image_count(-1); - // FIX-2023-05-29: 是否保持设置界面显示,由APP决定,此处不再由是否显示UI来决定,保持一个扫描流程正常结? + // FIX-2023-05-29: 是否保持设置界面显示,由APP决定,此处不再由是否显示UI来决定,保持一个扫描流程正常结束 //int cnt = show_setting_ ? 1 : get_scanned_image_count(-1); data.setCount(cnt); @@ -1286,9 +1286,9 @@ Result huagao_ds::imageInfoGet(const Identity&, ImageInfo& data) //if (!scanner_->wait_image()) //{ //// notifyCloseOk(); - // return success(); // 濂藉垎鏁伴渶瑕佽繑鍥炴垚? + // return success(); // 婵傝棄鍨庨弫浼存付鐟曚浇绻戦崶鐐村灇閸? //} - if (get_scanned_image_count(-1) > 0) // 鏄剧ず璁剧疆鐣岄潰鏃讹紝涓嶈兘闃诲鍦‥ndXfer锛屽惁鍒欐渶鍚庝竴寮犲浘鐗囦紶杈撳悗鏄剧ず涓嶅嚭鏉ワ紝鏁呭湪姝ゅ仛闃诲璋冪? + if (get_scanned_image_count(-1) > 0) // 閺勫墽銇氱拋鍓х枂閻e矂娼伴弮璁圭礉娑撳秷鍏橀梼璇差敚閸︹€dXfer閿涘苯鎯侀崚娆愭付閸氬簼绔村鐘叉禈閻楀洣绱舵潏鎾虫倵閺勫墽銇氭稉宥呭毉閺夈儻绱濋弫鍛躬濮濄倕浠涢梼璇差敚鐠嬪啰鏁? { ok = scanner_->get_first_image_header(&head, NULL, &res); if (ok) @@ -1700,7 +1700,7 @@ Result huagao_ds::call(const Identity& origin, DataGroup dg, Dat dat, Msg msg, v //FileTools::write_log("D:\\1.txt", "call:datagroup-"+to_string((int)dg)+"dat-"+to_string(int(dat))+"msg-"+to_string(int(msg))); Result rt; - //trigger_ProcessEvent(dg, dat, msg); // some APPs may be not trigger (Control, Event, ProcessEvent), we help them :( ... // 浜戦槄鍗锋壂鎻忕涓嶇瓑鐘舵€佹敼鍙橈紝鐩存帴鍙栧浘锛屾澶勮缃竴娆$姸?2022-11-07 + //trigger_ProcessEvent(dg, dat, msg); // some APPs may be not trigger (Control, Event, ProcessEvent), we help them :( ... // 娴滄垿妲勯崡閿嬪閹诲繒顏稉宥囩搼閻樿埖鈧焦鏁奸崣姗堢礉閻╁瓨甯撮崣鏍ф禈閿涘本顒濇径鍕啎缂冾喕绔村▎锛勫Ц閹?2022-11-07 rt = Base::call(origin, dg, dat, msg, data); if (log_all_triple_ || ((int)rt.returnCode() && rt.returnCode() != ReturnCode::NotDsEvent && msg != Msg::ProcessEvent)) @@ -1905,7 +1905,7 @@ void huagao_ds::init_support_caps(void) return success(); } // data.type - if (!data.operator bool()) //鍏锋湁椋庨櫓?(鍜屾? Twain sample app ,data.m_cont is null,but DotNet锛堝拰姘旓級 data.m_cont not is null . + if (!data.operator bool()) //閸忛攱婀佹搴ㄦ珦閹?(閸滃本鐨? Twain sample app ,data.m_cont is null,but DotNet閿涘牆鎷板鏃撶礆 data.m_cont not is null . { data = Capability::createEnumeration({ FALSE,TRUE }, m_bIndicator ? 1 : 0, 1); } @@ -2742,7 +2742,7 @@ void huagao_ds::init_support_caps(void) float sf = trans_range((float)step, (float)l, (float)u, range_l, range_h, true), nf = trans_range((float)now, (float)l, (float)u, range_l, range_h), initf = trans_range((float)init, (float)l, (float)u, range_l, range_h); - sf = 333.30f; // 全通……部分第三方需要固定该?:( - 2023-10-25 + sf = 333.30f; // 全通……部分第三方需要固定该值 :( - 2023-10-25 switch (msg) { case Msg::Get: //sf = 333.333f; @@ -2791,7 +2791,7 @@ void huagao_ds::init_support_caps(void) float sf = trans_range((float)step, (float)l, (float)u, range_l, range_h, true), nf = trans_range((float)now, (float)l, (float)u, range_l, range_h), initf = trans_range((float)init, (float)l, (float)u, range_l, range_h); - sf = 333.30f; // 全通……部分第三方需要固定该?:( - 2023-10-25 + sf = 333.30f; // 全通……部分第三方需要固定该值 :( - 2023-10-25 switch (msg) { case Msg::Get: // sf = 333.333f; @@ -3874,7 +3874,7 @@ int huagao_ds::handle_scanner_event(int ev, bool from_event_proc) //} //if (!Twpp::success(rc)) //{ - // rc = notifyXferReady(); // 濂藉垎鏁伴渶瑕佸啀閫氱?FAINT :( - modified on 2022-10-20 + // rc = notifyXferReady(); // 婵傝棄鍨庨弫浼存付鐟曚礁鍟€闁氨鐓?FAINT :( - modified on 2022-10-20 // if (!Twpp::success(rc)) // { // wchar_t msg[128] = { 0 }, unk[20] = { 0 }; @@ -3887,7 +3887,7 @@ int huagao_ds::handle_scanner_event(int ev, bool from_event_proc) break; case SANE_EVENT_UI_CLOSE_CANCEL: //scanner_->stop(); - //notifyCloseCancel(); // 淇鐐瑰嚮杩涘害妗?鍙栨?鎸夐挳锛孶I涓嶈兘姝e父缁撴潫鐨凚UG - added on 2023-02-14 + //notifyCloseCancel(); // 娣囶喖顦查悙鐟板毊鏉╂稑瀹冲?閸欐牗绉?閹稿鎸抽敍瀛禝娑撳秷鍏樺锝呯埗缂佹挻娼惃鍑歎G - added on 2023-02-14 //break; case SANE_EVENT_UI_CLOSE_NORMAL: case SANE_EVENT_SCAN_FINISHED: