mirror of
https://github.com/soukoku/ntwain.git
synced 2026-02-25 13:04:07 +08:00
Exposes actual EndXferJob value during transfer ready event. May help #56.
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
using GalaSoft.MvvmLight.Messaging;
|
||||
using ModernWPF;
|
||||
using ModernWPF.Controls;
|
||||
using ModernWPF.Messages;
|
||||
using NTwain;
|
||||
@@ -29,7 +30,7 @@ namespace Sample.WPF
|
||||
if (!DesignerProperties.GetIsInDesignMode(this))
|
||||
{
|
||||
_twainVM = this.DataContext as TwainVM;
|
||||
|
||||
_twainVM.PropertyChanged += _twainVM_PropertyChanged;
|
||||
Messenger.Default.Register<RefreshCommandsMessage>(this, m => m.HandleIt());
|
||||
Messenger.Default.Register<MessageBoxMessage>(this, msg =>
|
||||
{
|
||||
@@ -47,6 +48,22 @@ namespace Sample.WPF
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
private void _twainVM_PropertyChanged(object sender, PropertyChangedEventArgs e)
|
||||
{
|
||||
if (e.PropertyName == "State")
|
||||
{
|
||||
if (_twainVM.State == 5)
|
||||
{
|
||||
ModernTheme.ApplyTheme(ModernTheme.Theme.Light, Accent.Orange);
|
||||
}
|
||||
else if (_twainVM.State == 4)
|
||||
{
|
||||
ModernTheme.ApplyTheme(ModernTheme.Theme.Light, Accent.Green);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
protected override void OnClosing(CancelEventArgs e)
|
||||
{
|
||||
e.Cancel = _twainVM.State > 4;
|
||||
|
||||
@@ -47,12 +47,12 @@
|
||||
<HintPath>..\..\packages\CommonWin32.2.0.5.6\lib\net35-Client\CommonWin32.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="GalaSoft.MvvmLight, Version=5.1.1.35051, Culture=neutral, PublicKeyToken=0e453835af4ee6ce, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\packages\MvvmLightLibs.5.1.1.0\lib\net40\GalaSoft.MvvmLight.dll</HintPath>
|
||||
<Reference Include="GalaSoft.MvvmLight, Version=5.2.0.37223, Culture=neutral, PublicKeyToken=0e453835af4ee6ce, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\packages\MvvmLightLibs.5.2.0.0\lib\net40\GalaSoft.MvvmLight.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="GalaSoft.MvvmLight.Extras, Version=5.1.1.35049, Culture=neutral, PublicKeyToken=f46ff315b1088208, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\packages\MvvmLightLibs.5.1.1.0\lib\net40\GalaSoft.MvvmLight.Extras.dll</HintPath>
|
||||
<Reference Include="GalaSoft.MvvmLight.Extras, Version=5.2.0.37224, Culture=neutral, PublicKeyToken=f46ff315b1088208, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\packages\MvvmLightLibs.5.2.0.0\lib\net40\GalaSoft.MvvmLight.Extras.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.Practices.ServiceLocation, Version=1.3.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
@@ -70,11 +70,11 @@
|
||||
<HintPath>..\..\packages\Microsoft.WindowsAPICodePack-Shell.1.1.0.0\lib\Microsoft.WindowsAPICodePack.ShellExtensions.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="ModernWPF, Version=1.0.0.0, Culture=neutral, PublicKeyToken=c99d0cfbea7491ef, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\packages\ModernWPF.1.3.4\lib\net40-Client\ModernWPF.dll</HintPath>
|
||||
<HintPath>..\..\packages\ModernWPF.1.3.9\lib\net40-Client\ModernWPF.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="ModernWPF.Mvvm, Version=0.7.0.0, Culture=neutral, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\packages\ModernWPF.Mvvm.0.7.3\lib\net40-Client\ModernWPF.Mvvm.dll</HintPath>
|
||||
<HintPath>..\..\packages\ModernWPF.Mvvm.0.7.5\lib\net40-Client\ModernWPF.Mvvm.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="System" />
|
||||
@@ -82,7 +82,7 @@
|
||||
<Reference Include="System.Drawing" />
|
||||
<Reference Include="System.Windows.Forms" />
|
||||
<Reference Include="System.Windows.Interactivity, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\packages\MvvmLightLibs.5.1.1.0\lib\net40\System.Windows.Interactivity.dll</HintPath>
|
||||
<HintPath>..\..\packages\MvvmLightLibs.5.2.0.0\lib\net40\System.Windows.Interactivity.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="System.Xml" />
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="GalaSoft.MvvmLight" publicKeyToken="0e453835af4ee6ce" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-5.1.1.35051" newVersion="5.1.1.35051" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-5.2.0.37223" newVersion="5.2.0.37223" />
|
||||
</dependentAssembly>
|
||||
</assemblyBinding>
|
||||
</runtime>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<package id="CommonWin32" version="2.0.5.6" targetFramework="net4-client" />
|
||||
<package id="Microsoft.WindowsAPICodePack-Core" version="1.1.0.2" targetFramework="net4-client" />
|
||||
<package id="Microsoft.WindowsAPICodePack-Shell" version="1.1.0.0" targetFramework="net4-client" />
|
||||
<package id="ModernWPF" version="1.3.4" targetFramework="net4-client" />
|
||||
<package id="ModernWPF.Mvvm" version="0.7.3" targetFramework="net4-client" />
|
||||
<package id="MvvmLightLibs" version="5.1.1.0" targetFramework="net4-client" />
|
||||
<package id="ModernWPF" version="1.3.9" targetFramework="net40-client" />
|
||||
<package id="ModernWPF.Mvvm" version="0.7.5" targetFramework="net4-client" />
|
||||
<package id="MvvmLightLibs" version="5.2.0.0" targetFramework="net4-client" />
|
||||
</packages>
|
||||
Reference in New Issue
Block a user