mirror of
https://github.com/soukoku/ntwain.git
synced 2026-02-25 13:04:07 +08:00
Exposes actual EndXferJob value during transfer ready event. May help #56.
This commit is contained in:
@@ -2129,7 +2129,7 @@ namespace NTwain.Data
|
||||
/// than None. If this is not 0, the application should expect more data
|
||||
/// from the driver according to CapJobControl settings.
|
||||
/// </summary>
|
||||
public uint EndOfJob { get { return _eOJ; } }
|
||||
public EndXferJob EndOfJob { get { return (EndXferJob)_eOJ; } }
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -49,7 +49,7 @@ namespace NTwain.Internals
|
||||
{
|
||||
#region raise xfer ready
|
||||
|
||||
var preXferArgs = new TransferReadyEventArgs(session.CurrentSource, pending.Count, pending.EndOfJob == 0); ;
|
||||
var preXferArgs = new TransferReadyEventArgs(session.CurrentSource, pending.Count, pending.EndOfJob); ;
|
||||
session.SafeSyncableRaiseEvent(preXferArgs);
|
||||
|
||||
#endregion
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
using System.Reflection;
|
||||
|
||||
[assembly: AssemblyCopyright("Copyright \x00a9 Yin-Chun Wang 2012-2015")]
|
||||
[assembly: AssemblyCopyright("Copyright \x00a9 Yin-Chun Wang 2012-2016")]
|
||||
[assembly: AssemblyCompany("Yin-Chun Wang")]
|
||||
|
||||
[assembly: AssemblyVersion(NTwain.VersionInfo.Release)]
|
||||
@@ -23,7 +23,7 @@ namespace NTwain
|
||||
/// <summary>
|
||||
/// The build release version number.
|
||||
/// </summary>
|
||||
public const string Build = "3.3.7"; // change this for each nuget release
|
||||
public const string Build = "3.3.8"; // change this for each nuget release
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -13,12 +13,12 @@ namespace NTwain
|
||||
/// </summary>
|
||||
/// <param name="source">The source.</param>
|
||||
/// <param name="pendingCount">The pending count.</param>
|
||||
/// <param name="endOfJob">if set to <c>true</c> then it's the end of job.</param>
|
||||
public TransferReadyEventArgs(DataSource source, int pendingCount, bool endOfJob)
|
||||
/// <param name="endOfJobFlag"></param>
|
||||
public TransferReadyEventArgs(DataSource source, int pendingCount, EndXferJob endOfJobFlag)
|
||||
{
|
||||
DataSource = source;
|
||||
PendingTransferCount = pendingCount;
|
||||
EndOfJob = endOfJob;
|
||||
EndOfJobFlag = endOfJobFlag;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -46,7 +46,15 @@ namespace NTwain
|
||||
/// Gets a value indicating whether current transfer signifies an end of job in TWAIN world.
|
||||
/// </summary>
|
||||
/// <value><c>true</c> if transfer is end of job; otherwise, <c>false</c>.</value>
|
||||
public bool EndOfJob { get; private set; }
|
||||
public bool EndOfJob { get { return EndOfJobFlag != EndXferJob.None; } }
|
||||
|
||||
/// <summary>
|
||||
/// Gets the end of job flag value for this transfer (if job control is enabled).
|
||||
/// </summary>
|
||||
/// <value>
|
||||
/// The end of job flag.
|
||||
/// </value>
|
||||
public EndXferJob EndOfJobFlag { get; private set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets the known pending transfer count. This may not be appilicable
|
||||
|
||||
Reference in New Issue
Block a user