mirror of
https://github.com/soukoku/ntwain.git
synced 2025-10-24 10:11:20 +08:00
Added support for getting ext image info during data transfer event.
This commit is contained in:
@@ -8,7 +8,7 @@
|
||||
<Style TargetType="{x:Type Rectangle}" />
|
||||
|
||||
<ResourceDictionary.MergedDictionaries>
|
||||
<ResourceDictionary Source="/ModernWPF;component/Themes/ModernBase.xaml" />
|
||||
<ResourceDictionary Source="/ModernWPF;component/Themes/ModernBaseDesktop.xaml" />
|
||||
<ResourceDictionary Source="/ModernWPF;component/Themes/ModernLight.xaml" />
|
||||
<ResourceDictionary Source="/ModernWPF;component/Themes/ModernStyles.xaml" />
|
||||
|
||||
|
||||
@@ -47,13 +47,13 @@
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\..\packages\CommonWin32.2.0.5.4\lib\net35-Client\CommonWin32.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="GalaSoft.MvvmLight, Version=4.4.32.16316, Culture=neutral, PublicKeyToken=6bdae7d54059775e, processorArchitecture=MSIL">
|
||||
<Reference Include="GalaSoft.MvvmLight, Version=5.0.2.32240, Culture=neutral, PublicKeyToken=0e453835af4ee6ce, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\..\packages\MvvmLightLibs.4.4.32.5\lib\net40\GalaSoft.MvvmLight.dll</HintPath>
|
||||
<HintPath>..\..\packages\MvvmLightLibs.5.0.2.0\lib\net40\GalaSoft.MvvmLight.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="GalaSoft.MvvmLight.Extras, Version=4.4.32.16316, Culture=neutral, PublicKeyToken=e607f4f44c21a743, processorArchitecture=MSIL">
|
||||
<Reference Include="GalaSoft.MvvmLight.Extras, Version=5.0.2.32240, Culture=neutral, PublicKeyToken=f46ff315b1088208, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\..\packages\MvvmLightLibs.4.4.32.5\lib\net40\GalaSoft.MvvmLight.Extras.dll</HintPath>
|
||||
<HintPath>..\..\packages\MvvmLightLibs.5.0.2.0\lib\net40\GalaSoft.MvvmLight.Extras.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.Practices.ServiceLocation, Version=1.3.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
@@ -61,13 +61,13 @@
|
||||
</Reference>
|
||||
<Reference Include="ModernWPF, Version=1.0.0.0, Culture=neutral, PublicKeyToken=c99d0cfbea7491ef, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\..\packages\ModernWPF.1.2.5\lib\net40-Client\ModernWPF.dll</HintPath>
|
||||
<HintPath>..\..\packages\ModernWPF.1.2.8\lib\net40-Client\ModernWPF.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Data" />
|
||||
<Reference Include="System.Windows.Forms" />
|
||||
<Reference Include="System.Windows.Interactivity, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\packages\MvvmLightLibs.4.4.32.5\lib\net40\System.Windows.Interactivity.dll</HintPath>
|
||||
<HintPath>..\..\packages\MvvmLightLibs.5.0.2.0\lib\net40\System.Windows.Interactivity.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Xml" />
|
||||
<Reference Include="Microsoft.CSharp" />
|
||||
|
||||
@@ -2,6 +2,6 @@
|
||||
<packages>
|
||||
<package id="CommonServiceLocator" version="1.3" targetFramework="net40-Client" />
|
||||
<package id="CommonWin32" version="2.0.5.4" targetFramework="net40-Client" />
|
||||
<package id="ModernWPF" version="1.2.5" targetFramework="net40-Client" />
|
||||
<package id="MvvmLightLibs" version="4.4.32.5" targetFramework="net40-Client" />
|
||||
<package id="ModernWPF" version="1.2.8" targetFramework="net40-Client" />
|
||||
<package id="MvvmLightLibs" version="5.0.2.0" targetFramework="net40-Client" />
|
||||
</packages>
|
||||
@@ -68,6 +68,16 @@ namespace Tester.Winform
|
||||
};
|
||||
_twain.DataTransferred += (s, e) =>
|
||||
{
|
||||
// example on getting ext image info
|
||||
var infos = e.GetExtImageInfo(ExtendedImageInfo.Camera).Where(it => it.ReturnCode == ReturnCode.Success);
|
||||
foreach (var it in infos)
|
||||
{
|
||||
var values = it.ReadValues();
|
||||
Debug.WriteLine(string.Format("{0} = {1}", it.InfoID, values.FirstOrDefault()));
|
||||
break;
|
||||
}
|
||||
|
||||
// handle image data
|
||||
Bitmap img = null;
|
||||
if (e.NativeData != IntPtr.Zero)
|
||||
{
|
||||
@@ -312,7 +322,7 @@ namespace Tester.Winform
|
||||
groupSize.Text = labelTest;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
private void LoadDuplex(CapWrapper<BoolType> cap)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user