2014-04-10 19:30:00 +08:00
|
|
|
|
using NTwain.Data;
|
|
|
|
|
using System;
|
2014-04-03 07:01:21 +08:00
|
|
|
|
|
|
|
|
|
namespace NTwain
|
|
|
|
|
{
|
2014-04-12 07:25:48 +08:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// Contains event data after whatever data from the source has been transferred.
|
|
|
|
|
/// </summary>
|
2014-04-18 07:11:11 +08:00
|
|
|
|
public class DataTransferredEventArgs : EventArgs
|
|
|
|
|
{
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Gets pointer to the complete data if the transfer was native.
|
|
|
|
|
/// The data will be freed once the event handler ends
|
|
|
|
|
/// so consumers must complete whatever processing before then.
|
2014-04-22 18:50:58 +08:00
|
|
|
|
/// For image type this data is DIB (Windows) or TIFF (Linux).
|
|
|
|
|
/// This pointer is already locked for the duration of this event.
|
2014-04-18 07:11:11 +08:00
|
|
|
|
/// </summary>
|
|
|
|
|
/// <value>The data pointer.</value>
|
|
|
|
|
public IntPtr NativeData { get; internal set; }
|
2014-04-03 07:01:21 +08:00
|
|
|
|
|
2014-04-12 07:25:48 +08:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// Gets the file path to the complete data if the transfer was file or memory-file.
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <value>
|
|
|
|
|
/// The file path.
|
|
|
|
|
/// </value>
|
|
|
|
|
public string FileDataPath { get; internal set; }
|
2014-04-10 19:30:00 +08:00
|
|
|
|
|
|
|
|
|
/// <summary>
|
2014-04-12 07:25:48 +08:00
|
|
|
|
/// Gets the raw memory data if the transfer was memory.
|
|
|
|
|
/// Consumer application will need to do the parsing based on the values
|
|
|
|
|
/// from <see cref="ImageInfo"/>.
|
2014-04-10 19:30:00 +08:00
|
|
|
|
/// </summary>
|
|
|
|
|
/// <value>
|
|
|
|
|
/// The memory data.
|
|
|
|
|
/// </value>
|
2014-04-22 18:50:58 +08:00
|
|
|
|
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Performance", "CA1819:PropertiesShouldNotReturnArrays")]
|
2014-07-01 19:23:55 +08:00
|
|
|
|
public byte[] MemoryData { get; internal set; }
|
2014-04-10 19:30:00 +08:00
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Gets the final image information if applicable.
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <value>
|
|
|
|
|
/// The final image information.
|
|
|
|
|
/// </value>
|
2014-04-12 07:25:48 +08:00
|
|
|
|
public TWImageInfo ImageInfo { get; internal set; }
|
2014-04-17 19:11:39 +08:00
|
|
|
|
|
2014-05-24 06:41:18 +08:00
|
|
|
|
///// <summary>
|
|
|
|
|
///// Gets the extended image information if applicable.
|
|
|
|
|
///// </summary>
|
|
|
|
|
///// <value>
|
|
|
|
|
///// The extended image information.
|
|
|
|
|
///// </value>
|
|
|
|
|
//public TWExtImageInfo ExImageInfo { get; internal set; }
|
2014-04-18 07:11:11 +08:00
|
|
|
|
}
|
2014-04-03 07:01:21 +08:00
|
|
|
|
}
|