Cleaned up wpf sample with some view models.

This commit is contained in:
soukoku
2014-04-08 07:36:28 -04:00
parent ae03e1df90
commit ec19eb0151
8 changed files with 378 additions and 263 deletions

33
Tests/Tester.WPF/CapVM.cs Normal file
View File

@@ -0,0 +1,33 @@
using NTwain.Values;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace Tester.WPF
{
/// <summary>
/// Wraps a capability as a view model.
/// </summary>
class CapVM
{
public CapabilityId Cap { get; set; }
public string Name
{
get
{
if (Cap > CapabilityId.CustomBase)
{
return "[Custom] " + ((int)Cap - (int)CapabilityId.CustomBase);
}
return Cap.ToString();
}
}
public override string ToString()
{
return Name;
}
}
}