mirror of
https://github.com/soukoku/ntwain.git
synced 2025-12-19 10:58:24 +08:00
Updated with suggestion from #63.
This commit is contained in:
@@ -94,6 +94,15 @@ namespace NTwain
|
|||||||
/// </value>
|
/// </value>
|
||||||
bool StopOnTransferError { get; set; }
|
bool StopOnTransferError { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the reason a source was disabled (dropped from state 5) if it's due to user action.
|
||||||
|
/// Mostly only <see cref="Message.CloseDSOK"/> or <see cref="Message.CloseDSReq"/>.
|
||||||
|
/// </summary>
|
||||||
|
/// <value>
|
||||||
|
/// The dialog result.
|
||||||
|
/// </value>
|
||||||
|
Message DisableReason { get; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Try to show the built-in source selector dialog and return the selected source.
|
/// Try to show the built-in source selector dialog and return the selected source.
|
||||||
/// This is not recommended and is only included for completeness.
|
/// This is not recommended and is only included for completeness.
|
||||||
|
|||||||
@@ -23,7 +23,7 @@ namespace NTwain
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// The build release version number.
|
/// The build release version number.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public const string Build = "3.3.9.4"; // change this for each nuget release
|
public const string Build = "3.3.9.5"; // change this for each nuget release
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -211,6 +211,15 @@ namespace NTwain
|
|||||||
/// </value>
|
/// </value>
|
||||||
public bool StopOnTransferError { get; set; }
|
public bool StopOnTransferError { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the reason a source was disabled (dropped from state 5) if it's due to user action.
|
||||||
|
/// Mostly only <see cref="Message.CloseDSOK" /> or <see cref="Message.CloseDSReq" />.
|
||||||
|
/// </summary>
|
||||||
|
/// <value>
|
||||||
|
/// The dialog result.
|
||||||
|
/// </value>
|
||||||
|
public Message DisableReason { get; private set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Opens the data source manager. This must be the first method used
|
/// Opens the data source manager. This must be the first method used
|
||||||
/// before using other TWAIN functions. Calls to this must be followed by
|
/// before using other TWAIN functions. Calls to this must be followed by
|
||||||
|
|||||||
@@ -159,6 +159,7 @@ namespace NTwain
|
|||||||
ReturnCode ITwainSessionInternal.EnableSource(SourceEnableMode mode, bool modal, IntPtr windowHandle)
|
ReturnCode ITwainSessionInternal.EnableSource(SourceEnableMode mode, bool modal, IntPtr windowHandle)
|
||||||
{
|
{
|
||||||
_closeRequested = false;
|
_closeRequested = false;
|
||||||
|
DisableReason = Message.Null;
|
||||||
var rc = ReturnCode.Failure;
|
var rc = ReturnCode.Failure;
|
||||||
|
|
||||||
_msgLoopHook.Invoke(() =>
|
_msgLoopHook.Invoke(() =>
|
||||||
@@ -306,6 +307,7 @@ namespace NTwain
|
|||||||
break;
|
break;
|
||||||
case Message.CloseDSReq:
|
case Message.CloseDSReq:
|
||||||
case Message.CloseDSOK:
|
case Message.CloseDSOK:
|
||||||
|
DisableReason = msg;
|
||||||
// even though it says closeDS it's really disable.
|
// even though it says closeDS it's really disable.
|
||||||
// dsok is sent if source is enabled with uionly
|
// dsok is sent if source is enabled with uionly
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user