Some name-breaking changes so master is now v3. V2 will continue to be the code on nuget for now.

This commit is contained in:
soukoku
2014-09-15 07:24:13 -04:00
parent 0cd02ac16e
commit 92063d2b84
62 changed files with 422 additions and 267 deletions

View File

@@ -42,7 +42,7 @@ namespace Tester
if (rc == ReturnCode.Success)
{
var hit = twain.GetSources().Where(s => string.Equals(s.Name, "TWAIN2 FreeImage Software Scanner")).FirstOrDefault();
var hit = twain.Where(s => string.Equals(s.Name, "TWAIN2 FreeImage Software Scanner")).FirstOrDefault();
if (hit == null)
{
Console.WriteLine("The sample source \"TWAIN2 FreeImage Software Scanner\" is not installed.");

View File

@@ -78,7 +78,7 @@ namespace Tester.WPF
if (rc == ReturnCode.Success)
{
SrcList.ItemsSource = _twainVM.GetSources().Select(s => new DSVM { DS = s });
SrcList.ItemsSource = _twainVM.Select(s => new DSVM { DS = s });
}
}
private void Button_Click_1(object sender, RoutedEventArgs e)

View File

@@ -21,7 +21,7 @@ namespace Tester.WPF
}
}
public QuerySupport Supports { get; set; }
public QuerySupports Supports { get; set; }
public override string ToString()
{

View File

@@ -8,7 +8,7 @@ namespace Tester.WPF
/// </summary>
class DSVM
{
public TwainSource DS { get; set; }
public DataSource DS { get; set; }
public string Name { get { return DS.Name; } }
public string Version { get { return DS.Version.Info; } }

View File

@@ -155,7 +155,7 @@ namespace Tester.Winform
}
var curBtn = (sender as ToolStripMenuItem);
var src = curBtn.Tag as TwainSource;
var src = curBtn.Tag as DataSource;
if (src.Open() == ReturnCode.Success)
{
curBtn.Checked = true;
@@ -256,7 +256,7 @@ namespace Tester.Winform
first.Click -= SourceMenuItem_Click;
btnSources.DropDownItems.Remove(first);
}
foreach (var src in _twain.GetSources())
foreach (var src in _twain)
{
var srcBtn = new ToolStripMenuItem(src.Name);
srcBtn.Tag = src;