mirror of
https://github.com/soukoku/ntwain.git
synced 2026-02-25 13:04:07 +08:00
Road to v1 begins!
This commit is contained in:
29
Tests/Tester.WPF/ViewModels/CapVM.cs
Normal file
29
Tests/Tester.WPF/ViewModels/CapVM.cs
Normal file
@@ -0,0 +1,29 @@
|
||||
using NTwain.Data;
|
||||
|
||||
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;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user