调整扫描流程

This commit is contained in:
13038267101 2023-05-08 22:29:50 +08:00
parent 65df84f277
commit 0cadccaf0a
2 changed files with 11 additions and 7 deletions

View File

@ -2906,6 +2906,13 @@ COM_API_IMPLEMENT(scanner, bool, ui_show_setting(HWND parent, bool with_scan, bo
is_show_ui_ = with_scan; is_show_ui_ = with_scan;
if (callback::show_setting_ui) if (callback::show_setting_ui)
{ {
if (with_scan)
{
events_.clear();
images_.clear();
scan_msg_ = "OK";
scan_err_ = false;
}
auto ui = [this](ui_result res) auto ui = [this](ui_result res)
{ {
int uev = SANE_EVENT_SCAN_FINISHED; int uev = SANE_EVENT_SCAN_FINISHED;
@ -2925,7 +2932,7 @@ COM_API_IMPLEMENT(scanner, bool, ui_show_setting(HWND parent, bool with_scan, bo
case UI_RESULT_CLOSE_CANCEL: case UI_RESULT_CLOSE_CANCEL:
is_show_ui_ = false; is_show_ui_ = false;
uev = SANE_EVENT_UI_CLOSE_CANCEL; uev = SANE_EVENT_UI_CLOSE_CANCEL;
on_ui_event(uev, (void*)uev); //on_ui_event(uev, (void*)uev);
break; break;
case UI_RESULT_START_SCAN: case UI_RESULT_START_SCAN:
@ -3004,10 +3011,7 @@ COM_API_IMPLEMENT(scanner, bool, ui_show_progress(HWND parent, bool bIndicator))
break; break;
case UI_RESULT_CLOSE_CANCEL: case UI_RESULT_CLOSE_CANCEL:
uev = SANE_EVENT_UI_CLOSE_CANCEL; uev = SANE_EVENT_UI_CLOSE_CANCEL;
if (!is_show_ui_) stop();
{
on_ui_event(uev, (void*)uev);
}
break; break;
case UI_RESULT_START_SCAN: case UI_RESULT_START_SCAN:
break; break;

View File

@ -78,7 +78,7 @@
<OutDir>$(SolutionDir)..\..\release\win\$(PlatformTarget)\OEM\huagao\</OutDir> <OutDir>$(SolutionDir)..\..\release\win\$(PlatformTarget)\OEM\huagao\</OutDir>
<IntDir>$(SolutionDir)..\..\tmp\$(PlatformTarget)\huagao\$(Configuration)\$(ProjectName)\</IntDir> <IntDir>$(SolutionDir)..\..\tmp\$(PlatformTarget)\huagao\$(Configuration)\$(ProjectName)\</IntDir>
<LibraryPath>$(LibraryPath)</LibraryPath> <LibraryPath>$(LibraryPath)</LibraryPath>
<TargetName>huagaotwain200.ds</TargetName> <TargetName>huagaotwain100.ds</TargetName>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<LibraryPath>$(LibraryPath)</LibraryPath> <LibraryPath>$(LibraryPath)</LibraryPath>
@ -94,7 +94,7 @@
<OutDir>$(SolutionDir)..\..\release\win\$(PlatformTarget)\OEM\huagao\</OutDir> <OutDir>$(SolutionDir)..\..\release\win\$(PlatformTarget)\OEM\huagao\</OutDir>
<IntDir>$(SolutionDir)..\..\tmp\$(PlatformTarget)\huagao\$(Configuration)\$(ProjectName)\</IntDir> <IntDir>$(SolutionDir)..\..\tmp\$(PlatformTarget)\huagao\$(Configuration)\$(ProjectName)\</IntDir>
<LibraryPath>$(LibraryPath)</LibraryPath> <LibraryPath>$(LibraryPath)</LibraryPath>
<TargetName>huagaotwain400.ds</TargetName> <TargetName>huagaotwain100.ds</TargetName>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<LibraryPath>$(LibraryPath)</LibraryPath> <LibraryPath>$(LibraryPath)</LibraryPath>