mirror of
https://github.com/soukoku/ntwain.git
synced 2025-09-19 01:57:56 +08:00
Progress making cap value reader wrapper.
This commit is contained in:
@@ -74,11 +74,24 @@ namespace Net5Console
|
||||
Console.WriteLine($"\t{session.CurrentDevice}");
|
||||
Console.WriteLine();
|
||||
|
||||
var caps = session.SupportedCaps();
|
||||
var caps = session.Capabilities();
|
||||
Console.WriteLine("Device supports these caps:");
|
||||
foreach (var cap in caps.OrderBy(c => c))
|
||||
foreach (var cap in caps.Keys.OrderBy(c => c))
|
||||
{
|
||||
Console.WriteLine($"\t{cap}");
|
||||
Console.WriteLine($"\t{cap}: {caps[cap].Supports}");
|
||||
}
|
||||
Console.WriteLine();
|
||||
|
||||
if (caps.TryGetValue(CAP.ICAP_BITDEPTH, out CapWrapper wrapper))
|
||||
{
|
||||
Console.WriteLine($"Details on {wrapper.Cap}:");
|
||||
Console.WriteLine($"\tDefault: {wrapper.GetDefault()}");
|
||||
Console.WriteLine($"\tCurrent: {wrapper.GetCurrent()}");
|
||||
Console.WriteLine($"\tValues:");
|
||||
foreach (var val in wrapper.GetValues())
|
||||
{
|
||||
Console.WriteLine($"\t\t{val}");
|
||||
}
|
||||
}
|
||||
Console.WriteLine();
|
||||
|
||||
|
Reference in New Issue
Block a user