Road to v1 begins!

This commit is contained in:
soukoku
2014-04-20 16:57:38 -04:00
parent 06d1358fd1
commit 1743b8379b
92 changed files with 863 additions and 898 deletions

View File

@@ -1,7 +1,6 @@
using NTwain.Data;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using NTwain.Data;
using System;
using NTwain.Values;
namespace NTwain.Tests.Data
{

View File

@@ -1,8 +1,4 @@
using NTwain;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using System;
using NTwain.Values;
using System.Runtime.Serialization;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using NTwain.Data;
namespace NTwain.Tests

View File

@@ -1,5 +1,4 @@
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// General Information about an assembly is controlled through the following

View File

@@ -1,10 +1,4 @@
using NTwain;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using System;
using NTwain.Values;
using System.Runtime.Serialization;
using NTwain.Data;
using System.Collections.Generic;
using Microsoft.VisualStudio.TestTools.UnitTesting;
namespace NTwain.Tests
{

View File

@@ -1,7 +1,7 @@
using System;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using NTwain.Data;
using NTwain.Values;
using NTwain.Internals;
using System;
namespace NTwain.Tests
{

View File

@@ -1,8 +1,5 @@
using NTwain;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using System;
using NTwain.Values;
using System.Runtime.Serialization;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using NTwain.Data;
namespace NTwain.Tests
{

View File

@@ -1,15 +1,9 @@
using NTwain;
using NTwain.Data;
using NTwain.Values;
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Reflection;
using System.Runtime.InteropServices;
using System.Text;
using System.Threading;
using System.Windows.Threading;
namespace Tester
{

View File

@@ -1,5 +1,4 @@
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// General Information about an assembly is controlled through the following

View File

@@ -1,9 +1,4 @@
using ModernWPF;
using System;
using System.Collections.Generic;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Windows;
namespace Tester.WPF

View File

@@ -1,27 +1,14 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
using GalaSoft.MvvmLight.Messaging;
using ModernWPF.Controls;
using NTwain;
using NTwain.Data;
using NTwain.Values;
using System.Windows.Interop;
using System.Runtime.InteropServices;
using CommonWin32;
using System.Threading;
using ModernWPF.Controls;
using System.Reflection;
using System;
using System.ComponentModel;
using GalaSoft.MvvmLight.Messaging;
using System.Linq;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Interop;
using System.Windows.Media.Imaging;
namespace Tester.WPF
{
@@ -522,7 +509,7 @@ namespace Tester.WPF
CapDetailList.ItemsSource = _twainVM.GetCapabilityValues(cap).CastToEnum<NoiseFilter>();
break;
case CapabilityId.ICapOrientation:
CapDetailList.ItemsSource = _twainVM.GetCapabilityValues(cap).CastToEnum<NTwain.Values.Orientation>();
CapDetailList.ItemsSource = _twainVM.GetCapabilityValues(cap).CastToEnum<OrientationType>();
break;
case CapabilityId.ICapOverScan:
CapDetailList.ItemsSource = _twainVM.GetCapabilityValues(cap).CastToEnum<OverScan>();

View File

@@ -1,6 +1,4 @@
using System.Reflection;
using System.Resources;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Windows;

View File

@@ -8,10 +8,10 @@
// </auto-generated>
//------------------------------------------------------------------------------
namespace Tester.WPF.Properties {
using System;
namespace Tester.WPF.Properties
{
/// <summary>
/// A strongly-typed resource class, for looking up localized strings, etc.
/// </summary>

View File

@@ -80,7 +80,7 @@
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</ApplicationDefinition>
<Compile Include="TwainVM.cs" />
<Compile Include="ViewModels\TwainVM.cs" />
<Page Include="MainWindow.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
@@ -89,8 +89,8 @@
<DependentUpon>App.xaml</DependentUpon>
<SubType>Code</SubType>
</Compile>
<Compile Include="CapVM.cs" />
<Compile Include="DSVM.cs" />
<Compile Include="ViewModels\CapVM.cs" />
<Compile Include="ViewModels\DSVM.cs" />
<Compile Include="MainWindow.xaml.cs">
<DependentUpon>MainWindow.xaml</DependentUpon>
<SubType>Code</SubType>

View File

@@ -1,8 +1,4 @@
using NTwain.Values;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using NTwain.Data;
namespace Tester.WPF
{

View File

@@ -1,8 +1,4 @@
using NTwain.Data;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace Tester.WPF
{

View File

@@ -1,17 +1,12 @@
using NTwain;
using CommonWin32;
using GalaSoft.MvvmLight.Messaging;
using NTwain;
using NTwain.Data;
using NTwain.Values;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using System.Text;
using System.Threading;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using CommonWin32;
using System.Threading;
using GalaSoft.MvvmLight.Messaging;
using System.Diagnostics;
namespace Tester.WPF
{
@@ -86,8 +81,6 @@ namespace Tester.WPF
protected override void OnDataTransferred(DataTransferredEventArgs e)
{
//App.Current.Dispatcher.Invoke(new Action(() =>
//{
if (e.NativeData != IntPtr.Zero)
{
Image = e.NativeData.GetWPFBitmap();
@@ -97,7 +90,6 @@ namespace Tester.WPF
var img = new BitmapImage(new Uri(e.FileDataPath));
Image = img;
}
//}));
}
public void TestCapture(IntPtr hwnd)

View File

@@ -8,10 +8,10 @@
// </auto-generated>
//------------------------------------------------------------------------------
namespace Tester.Winform.Properties {
using System;
namespace Tester.Winform.Properties
{
/// <summary>
/// A strongly-typed resource class, for looking up localized strings, etc.
/// </summary>

View File

@@ -1,19 +1,14 @@
using System;
using System.Windows.Forms;
using System.Linq;
using NTwain.Data;
using NTwain.Values;
using NTwain.Triplets;
using CommonWin32;
using NTwain;
using NTwain.Data;
using System;
using System.Diagnostics;
using System.IO;
using System.Drawing.Imaging;
using System.Drawing;
using System.Runtime.InteropServices;
using System.Collections.Generic;
using System.Drawing.Imaging;
using System.Linq;
using System.Reflection;
using CommonWin32;
using System.Threading;
using System.Windows.Forms;
namespace Tester.Winform
{
@@ -62,7 +57,7 @@ namespace Tester.Winform
var appId = TWIdentity.CreateFromAssembly(DataGroups.Image, Assembly.GetEntryAssembly());
_twain = new TwainSession(appId);
// either set this and don't worry about threads during events,
// or don't and invoke during the events yourselv
// or don't and invoke during the events yourself
_twain.SynchronizationContext = SynchronizationContext.Current;
_twain.StateChanged += (s, e) =>
{