mirror of
https://github.com/soukoku/ntwain.git
synced 2026-02-25 13:04:07 +08:00
Added cap value report saver to wpf sample.
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
using NTwain.Data;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
|
||||
@@ -111,7 +112,9 @@ namespace NTwain
|
||||
if (!_supports.HasValue && _source.IsOpen)
|
||||
{
|
||||
var srcVersion = _source.ProtocolVersion;
|
||||
if (srcVersion >= ProtocolVersions.GetMinimumVersion(Capability))
|
||||
var minVer = ProtocolVersions.GetMinimumVersion(Capability);
|
||||
|
||||
if (srcVersion >= minVer)
|
||||
{
|
||||
_supports = _source.Capabilities.QuerySupport(Capability);
|
||||
|
||||
@@ -137,6 +140,7 @@ namespace NTwain
|
||||
}
|
||||
else
|
||||
{
|
||||
Debug.WriteLine("Cap " + Capability + " supports set to None due to rc=" + rc + ", cc=" + _source.GetStatus().ConditionCode);
|
||||
_supports = QuerySupports.None;
|
||||
}
|
||||
}
|
||||
@@ -144,6 +148,7 @@ namespace NTwain
|
||||
}
|
||||
else
|
||||
{
|
||||
Debug.WriteLine("Cap " + Capability + " supports set to None due to not in required TWAIN version (" + minVer + ") not met by source (" + srcVersion + ").");
|
||||
_supports = QuerySupports.None;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -177,12 +177,13 @@ namespace NTwain
|
||||
/// </summary>
|
||||
/// <param name="value">The value.</param>
|
||||
/// <returns></returns>
|
||||
ReturnCode SetValue(TValue value);/// <summary>
|
||||
///
|
||||
/// A version of Set that uses an array.
|
||||
/// </summary>
|
||||
/// <param name="value">The value.</param>
|
||||
/// <returns></returns>
|
||||
ReturnCode SetValue(TValue value);
|
||||
|
||||
/// <summary>
|
||||
/// A version of Set that uses an array.
|
||||
/// </summary>
|
||||
/// <param name="value">The value.</param>
|
||||
/// <returns></returns>
|
||||
ReturnCode SetValue(TWArray value);
|
||||
|
||||
/// <summary>
|
||||
|
||||
Reference in New Issue
Block a user