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