mirror of
https://github.com/soukoku/ntwain.git
synced 2026-01-26 21:48:36 +08:00
Some more xml doc updates.
This commit is contained in:
@@ -13,6 +13,7 @@ namespace NetCoreConsole
|
||||
var config = new TwainConfigBuilder()
|
||||
.DefineApp(Assembly.GetExecutingAssembly())
|
||||
.Build();
|
||||
|
||||
Console.WriteLine($"App = {(config.Is64Bit ? "64bit" : "32bit")}");
|
||||
Console.WriteLine($"Platform = {config.Platform}");
|
||||
Console.WriteLine();
|
||||
@@ -38,8 +39,6 @@ namespace NetCoreConsole
|
||||
var selectSrc = session.ShowSourceSelector();
|
||||
Console.WriteLine($"Selected data source = {selectSrc}");
|
||||
Console.WriteLine();
|
||||
|
||||
//session.DefaultSource = null;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -2288,6 +2288,12 @@ namespace NTwain.Data
|
||||
/// </summary>
|
||||
public partial struct TW_TWAINDIRECT
|
||||
{
|
||||
/// <summary>
|
||||
/// Constructs this struct.
|
||||
/// </summary>
|
||||
/// <param name="manager"></param>
|
||||
/// <param name="send"></param>
|
||||
/// <param name="sendSize"></param>
|
||||
public TW_TWAINDIRECT(ushort manager, IntPtr send, uint sendSize)
|
||||
{
|
||||
_SizeOf = (uint)Marshal.SizeOf(typeof(TW_TWAINDIRECT));
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
using System;
|
||||
|
||||
#pragma warning disable 1591
|
||||
|
||||
namespace NTwain.Data
|
||||
{
|
||||
// these are from the corresponding twain.h sections
|
||||
@@ -2081,3 +2083,5 @@ namespace NTwain.Data
|
||||
True = 1
|
||||
}
|
||||
}
|
||||
|
||||
#pragma warning restore 1591
|
||||
@@ -9,12 +9,21 @@ using System.Text;
|
||||
|
||||
namespace NTwain
|
||||
{
|
||||
/// <summary>
|
||||
/// Contains settings and platform info for a <see cref="TwainSession"/>.
|
||||
/// </summary>
|
||||
public class TwainConfig
|
||||
{
|
||||
internal TwainConfig() { }
|
||||
|
||||
/// <summary>
|
||||
/// Gets whether the app is running in 64bit.
|
||||
/// </summary>
|
||||
public bool Is64Bit { get; internal set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets the platform the app is running on.
|
||||
/// </summary>
|
||||
public PlatformID Platform { get; internal set; }
|
||||
|
||||
//public bool PreferLegacyDsm { get; internal set; }
|
||||
@@ -23,7 +32,9 @@ namespace NTwain
|
||||
|
||||
internal TW_IDENTITY SrcWin32 { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Gets memory manager associated with a <see cref="TwainSession"/>.
|
||||
/// </summary>
|
||||
public IMemoryManager MemoryManager { get; internal set; }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -75,7 +75,7 @@ namespace NTwain
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets/sets the default data source.
|
||||
/// Gets/sets the default data source. Setting to null is not supported.
|
||||
/// </summary>
|
||||
public DataSource DefaultSource
|
||||
{
|
||||
@@ -90,12 +90,15 @@ namespace NTwain
|
||||
}
|
||||
set
|
||||
{
|
||||
//if (value != null && value.Session != this)
|
||||
//{
|
||||
// throw new InvalidOperationException("Source is not from this session.");
|
||||
//}
|
||||
DGControl.Identity.Set(value);
|
||||
RaisePropertyChanged(nameof(DefaultSource));
|
||||
if (value != null)
|
||||
{
|
||||
if (value.Session != this)
|
||||
{
|
||||
throw new InvalidOperationException("Source is not from this session.");
|
||||
}
|
||||
var rc = DGControl.Identity.Set(value);
|
||||
RaisePropertyChanged(nameof(DefaultSource));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user