mirror of
https://github.com/soukoku/ntwain.git
synced 2026-02-25 13:04:07 +08:00
Cleared some CA items.
This commit is contained in:
@@ -371,42 +371,42 @@ namespace NTwain.Data
|
|||||||
/// Starting input value of the extended gamma function. Defines the
|
/// Starting input value of the extended gamma function. Defines the
|
||||||
/// minimum input value of channel data.
|
/// minimum input value of channel data.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public float StartIn { get { return _startIn; } set { _startIn = value; } }
|
public float StartIn { get { return _startIn; } }//set { _startIn = value; } }
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Ending input value of the extended gamma function. Defines the maximum
|
/// Ending input value of the extended gamma function. Defines the maximum
|
||||||
/// input value of channel data.
|
/// input value of channel data.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public float BreakIn { get { return _breakIn; } set { _breakIn = value; } }
|
public float BreakIn { get { return _breakIn; } }//set { _breakIn = value; } }
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The input value at which the transform switches from linear
|
/// The input value at which the transform switches from linear
|
||||||
/// transformation/interpolation to gamma transformation.
|
/// transformation/interpolation to gamma transformation.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public float EndIn { get { return _endIn; } set { _endIn = value; } }
|
public float EndIn { get { return _endIn; } }//set { _endIn = value; } }
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Starting output value of the extended gamma function. Defines the
|
/// Starting output value of the extended gamma function. Defines the
|
||||||
/// minimum output value of channel data.
|
/// minimum output value of channel data.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public float StartOut { get { return _startOut; } set { _startOut = value; } }
|
public float StartOut { get { return _startOut; } }//set { _startOut = value; } }
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Ending output value of the extended gamma function. Defines the
|
/// Ending output value of the extended gamma function. Defines the
|
||||||
/// maximum output value of channel data.
|
/// maximum output value of channel data.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public float BreakOut { get { return _breakOut; } set { _breakOut = value; } }
|
public float BreakOut { get { return _breakOut; } }//set { _breakOut = value; } }
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The output value at which the transform switches from linear
|
/// The output value at which the transform switches from linear
|
||||||
/// transformation/interpolation to gamma transformation.
|
/// transformation/interpolation to gamma transformation.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public float EndOut { get { return _endOut; } set { _endOut = value; } }
|
public float EndOut { get { return _endOut; } }//set { _endOut = value; } }
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Constant value. The exponential used in the gamma function.
|
/// Constant value. The exponential used in the gamma function.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public float Gamma { get { return _gamma; } set { _gamma = value; } }
|
public float Gamma { get { return _gamma; } }//set { _gamma = value; } }
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The number of samples in the look-up table. Includes the values of StartIn
|
/// The number of samples in the look-up table. Includes the values of StartIn
|
||||||
/// and EndIn. Zero-based index (actually, number of samples - 1). If zero, use
|
/// and EndIn. Zero-based index (actually, number of samples - 1). If zero, use
|
||||||
/// extended gamma, otherwise use table look-up.
|
/// extended gamma, otherwise use table look-up.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public float SampleCount { get { return _sampleCount; } set { _sampleCount = value; } }
|
public float SampleCount { get { return _sampleCount; } }//set { _sampleCount = value; } }
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region equals
|
#region equals
|
||||||
@@ -486,16 +486,18 @@ namespace NTwain.Data
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// Channel-specific transform parameters.
|
/// Channel-specific transform parameters.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public TWDecodeFunction[] Decode { get { return _decode; } set { _decode = value; } }
|
public TWDecodeFunction[] Decode { get { return _decode; } }//set { _decode = value; } }
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Flattened 3x3 matrix that specifies how channels are mixed in.
|
/// Flattened 3x3 matrix that specifies how channels are mixed in.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public TWFix32[] Mix { get { return _mix; } set { _mix = value; } }
|
public TWFix32[] Mix { get { return _mix; } }//set { _mix = value; } }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets the <see cref="Mix"/> value as matrix.
|
/// Gets the <see cref="Mix"/> value as matrix.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
|
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Performance", "CA1814:PreferJaggedArraysOverMultidimensional", MessageId = "Body"),
|
||||||
|
System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Performance", "CA1814:PreferJaggedArraysOverMultidimensional", MessageId = "Return")]
|
||||||
public TWFix32[,] GetMixMatrix()
|
public TWFix32[,] GetMixMatrix()
|
||||||
{
|
{
|
||||||
// from http://stackoverflow.com/questions/3845235/convert-array-to-matrix, haven't tested it
|
// from http://stackoverflow.com/questions/3845235/convert-array-to-matrix, haven't tested it
|
||||||
@@ -542,6 +544,8 @@ namespace NTwain.Data
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public partial class TWAudioInfo
|
public partial class TWAudioInfo
|
||||||
{
|
{
|
||||||
|
internal TWAudioInfo() { }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Name of audio data.
|
/// Name of audio data.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -746,6 +750,7 @@ namespace NTwain.Data
|
|||||||
/// <param name="offset"></param>
|
/// <param name="offset"></param>
|
||||||
/// <param name="type"></param>
|
/// <param name="type"></param>
|
||||||
/// <param name="value"></param>
|
/// <param name="value"></param>
|
||||||
|
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Performance", "CA1800:DoNotCastUnnecessarily")]
|
||||||
void WriteValue(IntPtr baseAddr, ref int offset, ItemType type, object value)
|
void WriteValue(IntPtr baseAddr, ref int offset, ItemType type, object value)
|
||||||
{
|
{
|
||||||
switch (type)
|
switch (type)
|
||||||
@@ -786,16 +791,16 @@ namespace NTwain.Data
|
|||||||
// WriteString(baseAddr, offset, value as string, 1024);
|
// WriteString(baseAddr, offset, value as string, 1024);
|
||||||
// break;
|
// break;
|
||||||
case ItemType.String128:
|
case ItemType.String128:
|
||||||
WriteString(baseAddr, offset, value as string, 128);
|
WriteString(baseAddr, offset, (string)value, 128);
|
||||||
break;
|
break;
|
||||||
case ItemType.String255:
|
case ItemType.String255:
|
||||||
WriteString(baseAddr, offset, value as string, 255);
|
WriteString(baseAddr, offset, (string)value, 255);
|
||||||
break;
|
break;
|
||||||
case ItemType.String32:
|
case ItemType.String32:
|
||||||
WriteString(baseAddr, offset, value as string, 32);
|
WriteString(baseAddr, offset, (string)value, 32);
|
||||||
break;
|
break;
|
||||||
case ItemType.String64:
|
case ItemType.String64:
|
||||||
WriteString(baseAddr, offset, value as string, 64);
|
WriteString(baseAddr, offset, (string)value, 64);
|
||||||
break;
|
break;
|
||||||
//case ItemType.Unicode512:
|
//case ItemType.Unicode512:
|
||||||
// WriteUString(baseAddr, offset, value as string, 512);
|
// WriteUString(baseAddr, offset, value as string, 512);
|
||||||
@@ -998,6 +1003,8 @@ namespace NTwain.Data
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public partial class TWCieColor
|
public partial class TWCieColor
|
||||||
{
|
{
|
||||||
|
internal TWCieColor() { }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Defines the original color space that was transformed into CIE XYZ.
|
/// Defines the original color space that was transformed into CIE XYZ.
|
||||||
/// This value is not set-able by the application.
|
/// This value is not set-able by the application.
|
||||||
@@ -1042,6 +1049,7 @@ namespace NTwain.Data
|
|||||||
/// Values that specify the CIE 1931 (XYZ space) tri-stimulus value of inkless
|
/// Values that specify the CIE 1931 (XYZ space) tri-stimulus value of inkless
|
||||||
/// "paper" from which the image was acquired.
|
/// "paper" from which the image was acquired.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1702:CompoundWordsShouldBeCasedCorrectly", MessageId = "WhitePaper")]
|
||||||
public TWCiePoint WhitePaper { get { return _whitePaper; } }
|
public TWCiePoint WhitePaper { get { return _whitePaper; } }
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Values that specify the CIE 1931 (XYZ space) tri-stimulus value of solid
|
/// Values that specify the CIE 1931 (XYZ space) tri-stimulus value of solid
|
||||||
@@ -1077,6 +1085,8 @@ namespace NTwain.Data
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public partial class TWDeviceEvent
|
public partial class TWDeviceEvent
|
||||||
{
|
{
|
||||||
|
internal TWDeviceEvent() { }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Defines event that has taken place.
|
/// Defines event that has taken place.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -1330,6 +1340,8 @@ namespace NTwain.Data
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public sealed partial class TWExtImageInfo : IDisposable
|
public sealed partial class TWExtImageInfo : IDisposable
|
||||||
{
|
{
|
||||||
|
internal TWExtImageInfo() { }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Number of information that application is requesting. This is filled by the
|
/// Number of information that application is requesting. This is filled by the
|
||||||
/// application. If positive, then the application is requesting specific extended
|
/// application. If positive, then the application is requesting specific extended
|
||||||
@@ -1723,6 +1735,8 @@ namespace NTwain.Data
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public partial class TWImageInfo
|
public partial class TWImageInfo
|
||||||
{
|
{
|
||||||
|
internal TWImageInfo() { }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The number of pixels per ICapUnits in the horizontal direction. The
|
/// The number of pixels per ICapUnits in the horizontal direction. The
|
||||||
/// current unit is assumed to be "inches" unless it has been otherwise
|
/// current unit is assumed to be "inches" unless it has been otherwise
|
||||||
@@ -1853,6 +1867,7 @@ namespace NTwain.Data
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// Encodes which entity releases the buffer and how the buffer is referenced.
|
/// Encodes which entity releases the buffer and how the buffer is referenced.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1726:UsePreferredTerms", MessageId = "Flags")]
|
||||||
public MemoryFlags Flags { get { return (MemoryFlags)_flags; } set { _flags = (uint)value; } }
|
public MemoryFlags Flags { get { return (MemoryFlags)_flags; } set { _flags = (uint)value; } }
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The size of the buffer in bytes. Should always be an even number and wordaligned.
|
/// The size of the buffer in bytes. Should always be an even number and wordaligned.
|
||||||
@@ -1939,7 +1954,7 @@ namespace NTwain.Data
|
|||||||
/// image, this field would hold 0x10001000. A CMYK image could hold
|
/// image, this field would hold 0x10001000. A CMYK image could hold
|
||||||
/// 0x11111111.
|
/// 0x11111111.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public uint SubSampling { get { return _subSampling; } set { _subSampling = value; } }
|
public uint Subsampling { get { return _subSampling; } set { _subSampling = value; } }
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Number of color components in the image to be compressed.
|
/// Number of color components in the image to be compressed.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -2151,6 +2166,8 @@ namespace NTwain.Data
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public partial class TWSetupMemXfer
|
public partial class TWSetupMemXfer
|
||||||
{
|
{
|
||||||
|
internal TWSetupMemXfer() { }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The size of the smallest transfer buffer, in bytes, that a Source can be
|
/// The size of the smallest transfer buffer, in bytes, that a Source can be
|
||||||
/// successful with. This will typically be the number of bytes in an
|
/// successful with. This will typically be the number of bytes in an
|
||||||
@@ -2181,10 +2198,7 @@ namespace NTwain.Data
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public partial class TWStatus
|
public partial class TWStatus
|
||||||
{
|
{
|
||||||
public TWStatus()
|
internal TWStatus() { }
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
internal TWStatus(ushort code, ushort data)
|
internal TWStatus(ushort code, ushort data)
|
||||||
{
|
{
|
||||||
_conditionCode = code;
|
_conditionCode = code;
|
||||||
@@ -2232,7 +2246,7 @@ namespace NTwain.Data
|
|||||||
/// Gets the actual string from the pointer. This may be incorrect.
|
/// Gets the actual string from the pointer. This may be incorrect.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
public string GetActualString()
|
public string TryGetString()
|
||||||
{
|
{
|
||||||
if (_uTF8string != IntPtr.Zero)
|
if (_uTF8string != IntPtr.Zero)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -14,6 +14,7 @@ namespace NTwain.Data
|
|||||||
/// Indicates the type of container used in capability.
|
/// Indicates the type of container used in capability.
|
||||||
/// Corresponds to TWON_* values.
|
/// Corresponds to TWON_* values.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1028:EnumStorageShouldBeInt32")]
|
||||||
public enum ContainerType : ushort
|
public enum ContainerType : ushort
|
||||||
{
|
{
|
||||||
Invalid = 0,
|
Invalid = 0,
|
||||||
@@ -40,10 +41,11 @@ namespace NTwain.Data
|
|||||||
/// Flags used in <see cref="TWMemory"/>.
|
/// Flags used in <see cref="TWMemory"/>.
|
||||||
/// Corresponds to TWMF_* values.
|
/// Corresponds to TWMF_* values.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1726:UsePreferredTerms", MessageId = "Flags"), System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1028:EnumStorageShouldBeInt32")]
|
||||||
[Flags]
|
[Flags]
|
||||||
public enum MemoryFlags : uint
|
public enum MemoryFlags : uint
|
||||||
{
|
{
|
||||||
Invalid = 0,
|
None = 0,
|
||||||
AppOwns = 0x1,
|
AppOwns = 0x1,
|
||||||
DsmOwns = 0x2,
|
DsmOwns = 0x2,
|
||||||
DSOwns = 0x4,
|
DSOwns = 0x4,
|
||||||
@@ -56,6 +58,7 @@ namespace NTwain.Data
|
|||||||
/// capability containers.
|
/// capability containers.
|
||||||
/// Corresponds to TWTY_* values.
|
/// Corresponds to TWTY_* values.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1028:EnumStorageShouldBeInt32"), System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1027:MarkEnumsWithFlags")]
|
||||||
public enum ItemType : ushort
|
public enum ItemType : ushort
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -130,6 +133,7 @@ namespace NTwain.Data
|
|||||||
/// CapAlarms values.
|
/// CapAlarms values.
|
||||||
/// Corresponds to TWAL_* values.
|
/// Corresponds to TWAL_* values.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1028:EnumStorageShouldBeInt32")]
|
||||||
public enum AlarmType : ushort
|
public enum AlarmType : ushort
|
||||||
{
|
{
|
||||||
Alarm = 0,
|
Alarm = 0,
|
||||||
@@ -147,6 +151,7 @@ namespace NTwain.Data
|
|||||||
/// ICapAutoSize values.
|
/// ICapAutoSize values.
|
||||||
/// Corresponds to TWAS_* values.
|
/// Corresponds to TWAS_* values.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1028:EnumStorageShouldBeInt32")]
|
||||||
public enum AutoSize : ushort
|
public enum AutoSize : ushort
|
||||||
{
|
{
|
||||||
None = 0,
|
None = 0,
|
||||||
@@ -159,6 +164,7 @@ namespace NTwain.Data
|
|||||||
/// reference to a Western-style interpretation of the image.
|
/// reference to a Western-style interpretation of the image.
|
||||||
/// Corresponds to TWBCOR_* values.
|
/// Corresponds to TWBCOR_* values.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1028:EnumStorageShouldBeInt32")]
|
||||||
public enum BarcodeRotation : uint
|
public enum BarcodeRotation : uint
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -188,6 +194,7 @@ namespace NTwain.Data
|
|||||||
/// ICapPatchCodeSearchMode values.
|
/// ICapPatchCodeSearchMode values.
|
||||||
/// Corresponds to TWBD_* values.
|
/// Corresponds to TWBD_* values.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1028:EnumStorageShouldBeInt32")]
|
||||||
public enum BarcodeDirection : ushort
|
public enum BarcodeDirection : ushort
|
||||||
{
|
{
|
||||||
Horz = 0,
|
Horz = 0,
|
||||||
@@ -200,6 +207,7 @@ namespace NTwain.Data
|
|||||||
/// ICapBitOrder/ICapBitOrderCodes values.
|
/// ICapBitOrder/ICapBitOrderCodes values.
|
||||||
/// Corresponds to TWBO_* values.
|
/// Corresponds to TWBO_* values.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1028:EnumStorageShouldBeInt32")]
|
||||||
public enum BitOrder : ushort
|
public enum BitOrder : ushort
|
||||||
{
|
{
|
||||||
LsbFirst = 0,
|
LsbFirst = 0,
|
||||||
@@ -210,6 +218,7 @@ namespace NTwain.Data
|
|||||||
/// ICapAutoDiscardBlankPages values.
|
/// ICapAutoDiscardBlankPages values.
|
||||||
/// Corresponds to TWBP_* values.
|
/// Corresponds to TWBP_* values.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1028:EnumStorageShouldBeInt32")]
|
||||||
public enum BlankPage : short
|
public enum BlankPage : short
|
||||||
{
|
{
|
||||||
Invalid = 0,
|
Invalid = 0,
|
||||||
@@ -221,6 +230,7 @@ namespace NTwain.Data
|
|||||||
/// Values for ICapBitDepthReduction.
|
/// Values for ICapBitDepthReduction.
|
||||||
/// Corresponds to TWBR_* values.
|
/// Corresponds to TWBR_* values.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1028:EnumStorageShouldBeInt32")]
|
||||||
public enum BitDepthReduction : ushort
|
public enum BitDepthReduction : ushort
|
||||||
{
|
{
|
||||||
Threshold = 0,
|
Threshold = 0,
|
||||||
@@ -235,6 +245,7 @@ namespace NTwain.Data
|
|||||||
/// ICapSupportedBarcodeTypes values.
|
/// ICapSupportedBarcodeTypes values.
|
||||||
/// Corresponds to TWBT_* values.
|
/// Corresponds to TWBT_* values.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1028:EnumStorageShouldBeInt32")]
|
||||||
public enum BarcodeType : ushort
|
public enum BarcodeType : ushort
|
||||||
{
|
{
|
||||||
ThreeOfNine = 0,
|
ThreeOfNine = 0,
|
||||||
@@ -266,6 +277,7 @@ namespace NTwain.Data
|
|||||||
/// setting the desired file format with ICAP_IMAGEFILEFORMAT.
|
/// setting the desired file format with ICAP_IMAGEFILEFORMAT.
|
||||||
/// Corresponds to TWCP_* values.
|
/// Corresponds to TWCP_* values.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1028:EnumStorageShouldBeInt32")]
|
||||||
public enum CompressionType : ushort
|
public enum CompressionType : ushort
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -334,6 +346,7 @@ namespace NTwain.Data
|
|||||||
/// CapCameraSide/TWEI_PAGESIDE values.
|
/// CapCameraSide/TWEI_PAGESIDE values.
|
||||||
/// Corresponds to TWCS_* values.
|
/// Corresponds to TWCS_* values.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1028:EnumStorageShouldBeInt32")]
|
||||||
public enum CameraSide : ushort
|
public enum CameraSide : ushort
|
||||||
{
|
{
|
||||||
Both = 0,
|
Both = 0,
|
||||||
@@ -345,6 +358,7 @@ namespace NTwain.Data
|
|||||||
/// CapClearBuffers values.
|
/// CapClearBuffers values.
|
||||||
/// Corresponds to TWCB_* values.
|
/// Corresponds to TWCB_* values.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1028:EnumStorageShouldBeInt32")]
|
||||||
public enum ClearBuffer : ushort
|
public enum ClearBuffer : ushort
|
||||||
{
|
{
|
||||||
Auto = 0,
|
Auto = 0,
|
||||||
@@ -358,6 +372,7 @@ namespace NTwain.Data
|
|||||||
/// a cap value it's ushort.
|
/// a cap value it's ushort.
|
||||||
/// Corresponds to TWDE_* values.
|
/// Corresponds to TWDE_* values.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1028:EnumStorageShouldBeInt32"), System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1027:MarkEnumsWithFlags")]
|
||||||
public enum DeviceEvent : uint // using uint to support custom event values
|
public enum DeviceEvent : uint // using uint to support custom event values
|
||||||
{
|
{
|
||||||
CheckAutomaticCapture = 0,
|
CheckAutomaticCapture = 0,
|
||||||
@@ -396,6 +411,7 @@ namespace NTwain.Data
|
|||||||
/// TWEI_DESKEWSTATUS values.
|
/// TWEI_DESKEWSTATUS values.
|
||||||
/// Corresponds to TWDSK_* values.
|
/// Corresponds to TWDSK_* values.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1028:EnumStorageShouldBeInt32")]
|
||||||
public enum DeskewStatus : uint
|
public enum DeskewStatus : uint
|
||||||
{
|
{
|
||||||
Success = 0,
|
Success = 0,
|
||||||
@@ -408,6 +424,7 @@ namespace NTwain.Data
|
|||||||
/// CapDuplex values.
|
/// CapDuplex values.
|
||||||
/// Corresponds to TWDX_* values.
|
/// Corresponds to TWDX_* values.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1028:EnumStorageShouldBeInt32")]
|
||||||
public enum Duplex : ushort
|
public enum Duplex : ushort
|
||||||
{
|
{
|
||||||
None = 0,
|
None = 0,
|
||||||
@@ -419,6 +436,7 @@ namespace NTwain.Data
|
|||||||
/// CapFeederAlignment values.
|
/// CapFeederAlignment values.
|
||||||
/// Corresponds to TWFA_* values.
|
/// Corresponds to TWFA_* values.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1028:EnumStorageShouldBeInt32")]
|
||||||
public enum FeederAlignment : ushort
|
public enum FeederAlignment : ushort
|
||||||
{
|
{
|
||||||
None = 0,
|
None = 0,
|
||||||
@@ -431,6 +449,7 @@ namespace NTwain.Data
|
|||||||
/// ICapFeederType values.
|
/// ICapFeederType values.
|
||||||
/// Corresponds to TWFE_* values.
|
/// Corresponds to TWFE_* values.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1028:EnumStorageShouldBeInt32")]
|
||||||
public enum FeederType : ushort
|
public enum FeederType : ushort
|
||||||
{
|
{
|
||||||
General = 0,
|
General = 0,
|
||||||
@@ -441,6 +460,7 @@ namespace NTwain.Data
|
|||||||
/// ICapImageFileFormat values.
|
/// ICapImageFileFormat values.
|
||||||
/// Corresponds to TWFF_* values.
|
/// Corresponds to TWFF_* values.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1028:EnumStorageShouldBeInt32"), System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1027:MarkEnumsWithFlags")]
|
||||||
public enum FileFormat : ushort
|
public enum FileFormat : ushort
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -513,19 +533,21 @@ namespace NTwain.Data
|
|||||||
/// ICapFlashUsed2 values.
|
/// ICapFlashUsed2 values.
|
||||||
/// Corresponds to TWFL_* values.
|
/// Corresponds to TWFL_* values.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1028:EnumStorageShouldBeInt32")]
|
||||||
public enum FlashedUsed : ushort
|
public enum FlashedUsed : ushort
|
||||||
{
|
{
|
||||||
None = 0,
|
None = 0,
|
||||||
Off = 1,
|
Off = 1,
|
||||||
On = 2,
|
On = 2,
|
||||||
Auto = 3,
|
Auto = 3,
|
||||||
RedEye = 4
|
Redeye = 4
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// CapFeederOrder values.
|
/// CapFeederOrder values.
|
||||||
/// Corresponds to TWFO_* values.
|
/// Corresponds to TWFO_* values.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1028:EnumStorageShouldBeInt32")]
|
||||||
public enum FeederOrder : ushort
|
public enum FeederOrder : ushort
|
||||||
{
|
{
|
||||||
FirstPageFirst = 0,
|
FirstPageFirst = 0,
|
||||||
@@ -536,6 +558,7 @@ namespace NTwain.Data
|
|||||||
/// CapFeederPocket values.
|
/// CapFeederPocket values.
|
||||||
/// Corresponds to TWFP_* values.
|
/// Corresponds to TWFP_* values.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1028:EnumStorageShouldBeInt32")]
|
||||||
public enum FeederPocket : ushort
|
public enum FeederPocket : ushort
|
||||||
{
|
{
|
||||||
PocketError = 0,
|
PocketError = 0,
|
||||||
@@ -561,16 +584,18 @@ namespace NTwain.Data
|
|||||||
/// ICapFlipRotation values.
|
/// ICapFlipRotation values.
|
||||||
/// Corresponds to TWFR_* values.
|
/// Corresponds to TWFR_* values.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1028:EnumStorageShouldBeInt32")]
|
||||||
public enum FlipRotation : ushort
|
public enum FlipRotation : ushort
|
||||||
{
|
{
|
||||||
Book = 0,
|
Book = 0,
|
||||||
FanFold = 1
|
Fanfold = 1
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// ICapFilter values.
|
/// ICapFilter values.
|
||||||
/// Corresponds to TWFT_* values.
|
/// Corresponds to TWFT_* values.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1028:EnumStorageShouldBeInt32")]
|
||||||
public enum FilterType : ushort
|
public enum FilterType : ushort
|
||||||
{
|
{
|
||||||
Red = 0,
|
Red = 0,
|
||||||
@@ -605,6 +630,7 @@ namespace NTwain.Data
|
|||||||
/// ICapIccProfile values.
|
/// ICapIccProfile values.
|
||||||
/// Corresponds to TWIC* values.
|
/// Corresponds to TWIC* values.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1028:EnumStorageShouldBeInt32")]
|
||||||
public enum IccProfile : ushort
|
public enum IccProfile : ushort
|
||||||
{
|
{
|
||||||
None = 0,
|
None = 0,
|
||||||
@@ -616,6 +642,7 @@ namespace NTwain.Data
|
|||||||
/// ICapImageFilter values.
|
/// ICapImageFilter values.
|
||||||
/// Corresponds to TWIF_* values.
|
/// Corresponds to TWIF_* values.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1028:EnumStorageShouldBeInt32")]
|
||||||
public enum ImageFilter : ushort
|
public enum ImageFilter : ushort
|
||||||
{
|
{
|
||||||
None = 0,
|
None = 0,
|
||||||
@@ -631,12 +658,17 @@ namespace NTwain.Data
|
|||||||
/// ICapImageMerge values.
|
/// ICapImageMerge values.
|
||||||
/// Corresponds to TWIM_* values.
|
/// Corresponds to TWIM_* values.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1028:EnumStorageShouldBeInt32")]
|
||||||
public enum ImageMerge : ushort
|
public enum ImageMerge : ushort
|
||||||
{
|
{
|
||||||
None = 0,
|
None = 0,
|
||||||
|
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1702:CompoundWordsShouldBeCasedCorrectly", MessageId = "FrontOn")]
|
||||||
FrontOnTop = 1,
|
FrontOnTop = 1,
|
||||||
|
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1702:CompoundWordsShouldBeCasedCorrectly", MessageId = "FrontOn")]
|
||||||
FrontOnBottom = 2,
|
FrontOnBottom = 2,
|
||||||
|
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1702:CompoundWordsShouldBeCasedCorrectly", MessageId = "FrontOn")]
|
||||||
FrontOnLeft = 3,
|
FrontOnLeft = 3,
|
||||||
|
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1702:CompoundWordsShouldBeCasedCorrectly", MessageId = "FrontOn")]
|
||||||
FrontOnRight = 4
|
FrontOnRight = 4
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -644,6 +676,7 @@ namespace NTwain.Data
|
|||||||
/// CapJobControl values.
|
/// CapJobControl values.
|
||||||
/// Corresponds to TWJC_* values.
|
/// Corresponds to TWJC_* values.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1028:EnumStorageShouldBeInt32")]
|
||||||
public enum JobControl : ushort
|
public enum JobControl : ushort
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -672,6 +705,7 @@ namespace NTwain.Data
|
|||||||
/// ICapJpegQuality values.
|
/// ICapJpegQuality values.
|
||||||
/// Corresponds to TWJQ_* values.
|
/// Corresponds to TWJQ_* values.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1028:EnumStorageShouldBeInt32")]
|
||||||
public enum JpegQuality : short
|
public enum JpegQuality : short
|
||||||
{
|
{
|
||||||
Invalid = 0,
|
Invalid = 0,
|
||||||
@@ -685,6 +719,7 @@ namespace NTwain.Data
|
|||||||
/// ICapLightPath values.
|
/// ICapLightPath values.
|
||||||
/// Corresponds to TWLP_* values.
|
/// Corresponds to TWLP_* values.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1028:EnumStorageShouldBeInt32")]
|
||||||
public enum LightPath : ushort
|
public enum LightPath : ushort
|
||||||
{
|
{
|
||||||
Reflective = 0,
|
Reflective = 0,
|
||||||
@@ -695,6 +730,7 @@ namespace NTwain.Data
|
|||||||
/// ICapLightSource values.
|
/// ICapLightSource values.
|
||||||
/// Corresponds to TWLS_* values.
|
/// Corresponds to TWLS_* values.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1028:EnumStorageShouldBeInt32")]
|
||||||
public enum LightSource : ushort
|
public enum LightSource : ushort
|
||||||
{
|
{
|
||||||
Red = 0,
|
Red = 0,
|
||||||
@@ -710,6 +746,7 @@ namespace NTwain.Data
|
|||||||
/// TWEI_MAGTYPE values.
|
/// TWEI_MAGTYPE values.
|
||||||
/// Corresponds to TWMD_* values.
|
/// Corresponds to TWMD_* values.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1028:EnumStorageShouldBeInt32")]
|
||||||
public enum MagType : ushort
|
public enum MagType : ushort
|
||||||
{
|
{
|
||||||
Micr = 0,
|
Micr = 0,
|
||||||
@@ -721,6 +758,7 @@ namespace NTwain.Data
|
|||||||
/// ICapNoiseFilter values.
|
/// ICapNoiseFilter values.
|
||||||
/// Corresponds to TWNF_* values.
|
/// Corresponds to TWNF_* values.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1028:EnumStorageShouldBeInt32")]
|
||||||
public enum NoiseFilter : ushort
|
public enum NoiseFilter : ushort
|
||||||
{
|
{
|
||||||
None = 0,
|
None = 0,
|
||||||
@@ -733,6 +771,7 @@ namespace NTwain.Data
|
|||||||
/// ICapOrientation values.
|
/// ICapOrientation values.
|
||||||
/// Corresponds to TWOR_* values.
|
/// Corresponds to TWOR_* values.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1028:EnumStorageShouldBeInt32")]
|
||||||
public enum OrientationType : ushort
|
public enum OrientationType : ushort
|
||||||
{
|
{
|
||||||
Rot0 = 0,
|
Rot0 = 0,
|
||||||
@@ -750,6 +789,7 @@ namespace NTwain.Data
|
|||||||
/// ICapOverscan values.
|
/// ICapOverscan values.
|
||||||
/// Corresponds to TWOV_* values.
|
/// Corresponds to TWOV_* values.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1028:EnumStorageShouldBeInt32")]
|
||||||
public enum OverScan : ushort
|
public enum OverScan : ushort
|
||||||
{
|
{
|
||||||
None = 0,
|
None = 0,
|
||||||
@@ -763,6 +803,7 @@ namespace NTwain.Data
|
|||||||
/// <see cref="TWPalette8.PaletteType"/> values.
|
/// <see cref="TWPalette8.PaletteType"/> values.
|
||||||
/// Corresponds to TWPA_* values.
|
/// Corresponds to TWPA_* values.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1028:EnumStorageShouldBeInt32")]
|
||||||
public enum PaletteType : ushort
|
public enum PaletteType : ushort
|
||||||
{
|
{
|
||||||
Rgb = 0,
|
Rgb = 0,
|
||||||
@@ -774,6 +815,7 @@ namespace NTwain.Data
|
|||||||
/// ICapPlanarChunky values.
|
/// ICapPlanarChunky values.
|
||||||
/// Corresponds to TWPC_* values.
|
/// Corresponds to TWPC_* values.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1028:EnumStorageShouldBeInt32")]
|
||||||
public enum PlanarChunky : ushort
|
public enum PlanarChunky : ushort
|
||||||
{
|
{
|
||||||
Chunky = 0,
|
Chunky = 0,
|
||||||
@@ -785,6 +827,7 @@ namespace NTwain.Data
|
|||||||
/// ICapSupportedPatchCodeTypes values.
|
/// ICapSupportedPatchCodeTypes values.
|
||||||
/// Corresponds to TWPCH_* values.
|
/// Corresponds to TWPCH_* values.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1028:EnumStorageShouldBeInt32")]
|
||||||
public enum PatchCode : ushort
|
public enum PatchCode : ushort
|
||||||
{
|
{
|
||||||
Patch1 = 0,
|
Patch1 = 0,
|
||||||
@@ -799,6 +842,7 @@ namespace NTwain.Data
|
|||||||
/// ICapPixelFlavor, ICapPixelFlavorCodes values.
|
/// ICapPixelFlavor, ICapPixelFlavorCodes values.
|
||||||
/// Corresponds to TWPF_* values.
|
/// Corresponds to TWPF_* values.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1028:EnumStorageShouldBeInt32")]
|
||||||
public enum PixelFlavor : ushort
|
public enum PixelFlavor : ushort
|
||||||
{
|
{
|
||||||
Chocolate = 0,
|
Chocolate = 0,
|
||||||
@@ -809,9 +853,11 @@ namespace NTwain.Data
|
|||||||
/// CapPrinterMode values.
|
/// CapPrinterMode values.
|
||||||
/// Corresponds to TWPM_* values.
|
/// Corresponds to TWPM_* values.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1028:EnumStorageShouldBeInt32")]
|
||||||
public enum PrinterMode : ushort
|
public enum PrinterMode : ushort
|
||||||
{
|
{
|
||||||
SingleString = 0,
|
SingleString = 0,
|
||||||
|
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1702:CompoundWordsShouldBeCasedCorrectly", MessageId = "MultiString")]
|
||||||
MultiString = 1,
|
MultiString = 1,
|
||||||
CompoundString = 2
|
CompoundString = 2
|
||||||
}
|
}
|
||||||
@@ -820,6 +866,7 @@ namespace NTwain.Data
|
|||||||
/// CapPrinter values.
|
/// CapPrinter values.
|
||||||
/// Corresponds to TWPR_* values.
|
/// Corresponds to TWPR_* values.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1028:EnumStorageShouldBeInt32")]
|
||||||
public enum Printer : ushort
|
public enum Printer : ushort
|
||||||
{
|
{
|
||||||
ImprinterTopBefore = 0,
|
ImprinterTopBefore = 0,
|
||||||
@@ -836,6 +883,7 @@ namespace NTwain.Data
|
|||||||
/// CapPrinterFontStyle values.
|
/// CapPrinterFontStyle values.
|
||||||
/// Corresponds to TWPF_* values.
|
/// Corresponds to TWPF_* values.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1028:EnumStorageShouldBeInt32")]
|
||||||
public enum PrinterFontStyle : ushort
|
public enum PrinterFontStyle : ushort
|
||||||
{
|
{
|
||||||
Normal = 0,
|
Normal = 0,
|
||||||
@@ -849,6 +897,7 @@ namespace NTwain.Data
|
|||||||
/// CapPrinterIndexTrigger values.
|
/// CapPrinterIndexTrigger values.
|
||||||
/// Corresponds to TWCT_* values.
|
/// Corresponds to TWCT_* values.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1028:EnumStorageShouldBeInt32")]
|
||||||
public enum PrinterIndexTrigger : ushort
|
public enum PrinterIndexTrigger : ushort
|
||||||
{
|
{
|
||||||
Page = 0,
|
Page = 0,
|
||||||
@@ -864,6 +913,7 @@ namespace NTwain.Data
|
|||||||
/// CapPowerSupply values.
|
/// CapPowerSupply values.
|
||||||
/// Corresponds to TWPS_* values.
|
/// Corresponds to TWPS_* values.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1028:EnumStorageShouldBeInt32")]
|
||||||
public enum PowerSupply : ushort
|
public enum PowerSupply : ushort
|
||||||
{
|
{
|
||||||
External = 0,
|
External = 0,
|
||||||
@@ -875,6 +925,7 @@ namespace NTwain.Data
|
|||||||
/// ICapJpegPixelType, ICapPixelType values.
|
/// ICapJpegPixelType, ICapPixelType values.
|
||||||
/// Corresponds to TWPT_* values.
|
/// Corresponds to TWPT_* values.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1028:EnumStorageShouldBeInt32"), System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1027:MarkEnumsWithFlags")]
|
||||||
public enum PixelType : ushort
|
public enum PixelType : ushort
|
||||||
{
|
{
|
||||||
BlackWhite = 0,
|
BlackWhite = 0,
|
||||||
@@ -896,6 +947,7 @@ namespace NTwain.Data
|
|||||||
/// CapSegmented values.
|
/// CapSegmented values.
|
||||||
/// Corresponds to TWSG_* values.
|
/// Corresponds to TWSG_* values.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1028:EnumStorageShouldBeInt32")]
|
||||||
public enum Segmented : ushort
|
public enum Segmented : ushort
|
||||||
{
|
{
|
||||||
None = 0,
|
None = 0,
|
||||||
@@ -907,6 +959,7 @@ namespace NTwain.Data
|
|||||||
/// ICapFilmType values.
|
/// ICapFilmType values.
|
||||||
/// Corresponds to TWFM_* values.
|
/// Corresponds to TWFM_* values.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1028:EnumStorageShouldBeInt32")]
|
||||||
public enum FilmType : ushort
|
public enum FilmType : ushort
|
||||||
{
|
{
|
||||||
Positive = 0,
|
Positive = 0,
|
||||||
@@ -917,9 +970,10 @@ namespace NTwain.Data
|
|||||||
/// CapDoubleFeedDetection values.
|
/// CapDoubleFeedDetection values.
|
||||||
/// Corresponds to TWDF_* values.
|
/// Corresponds to TWDF_* values.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1028:EnumStorageShouldBeInt32")]
|
||||||
public enum DoubleFeedDetection : ushort
|
public enum DoubleFeedDetection : ushort
|
||||||
{
|
{
|
||||||
UltraSonic = 0,
|
Ultrasonic = 0,
|
||||||
ByLength = 1,
|
ByLength = 1,
|
||||||
Infrared = 2
|
Infrared = 2
|
||||||
}
|
}
|
||||||
@@ -928,6 +982,7 @@ namespace NTwain.Data
|
|||||||
/// CapDoubleFeedDetectionSensitivity values.
|
/// CapDoubleFeedDetectionSensitivity values.
|
||||||
/// Corresponds to TWUS_* values.
|
/// Corresponds to TWUS_* values.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1028:EnumStorageShouldBeInt32")]
|
||||||
public enum DoubleFeedDetectionSensitivity : ushort
|
public enum DoubleFeedDetectionSensitivity : ushort
|
||||||
{
|
{
|
||||||
Low = 0,
|
Low = 0,
|
||||||
@@ -939,6 +994,7 @@ namespace NTwain.Data
|
|||||||
/// CapDoubleFeedDetectionResponse values.
|
/// CapDoubleFeedDetectionResponse values.
|
||||||
/// Corresponds to TWDP_* values.
|
/// Corresponds to TWDP_* values.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1028:EnumStorageShouldBeInt32")]
|
||||||
public enum DoubleFeedDetectionResponse : ushort
|
public enum DoubleFeedDetectionResponse : ushort
|
||||||
{
|
{
|
||||||
Stop = 0,
|
Stop = 0,
|
||||||
@@ -951,6 +1007,7 @@ namespace NTwain.Data
|
|||||||
/// ICapMirror values.
|
/// ICapMirror values.
|
||||||
/// Corresponds to TWMR* values.
|
/// Corresponds to TWMR* values.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1028:EnumStorageShouldBeInt32")]
|
||||||
public enum Mirror : ushort
|
public enum Mirror : ushort
|
||||||
{
|
{
|
||||||
None = 0,
|
None = 0,
|
||||||
@@ -959,10 +1016,11 @@ namespace NTwain.Data
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// ICapJpegSubSampling values.
|
/// ICapJpegSubsampling values.
|
||||||
/// Corresponds to TWJS_* values.
|
/// Corresponds to TWJS_* values.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public enum JpegSubSampling : ushort
|
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1028:EnumStorageShouldBeInt32")]
|
||||||
|
public enum JpegSubsampling : ushort
|
||||||
{
|
{
|
||||||
x444YCBCR = 0,
|
x444YCBCR = 0,
|
||||||
x444RGB = 1,
|
x444RGB = 1,
|
||||||
@@ -978,12 +1036,13 @@ namespace NTwain.Data
|
|||||||
/// CapPaperHandling values.
|
/// CapPaperHandling values.
|
||||||
/// Corresponds to TWPH_* values.
|
/// Corresponds to TWPH_* values.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1028:EnumStorageShouldBeInt32")]
|
||||||
public enum PaperHandling : ushort
|
public enum PaperHandling : ushort
|
||||||
{
|
{
|
||||||
Normal = 0,
|
Normal = 0,
|
||||||
Fragile = 1,
|
Fragile = 1,
|
||||||
Thick = 2,
|
Thick = 2,
|
||||||
TriFold = 3,
|
Trifold = 3,
|
||||||
Photograph = 4
|
Photograph = 4
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -991,6 +1050,7 @@ namespace NTwain.Data
|
|||||||
/// CapIndicatorsMode values.
|
/// CapIndicatorsMode values.
|
||||||
/// Corresponds to TWCI_* values.
|
/// Corresponds to TWCI_* values.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1028:EnumStorageShouldBeInt32")]
|
||||||
public enum IndicatorsMode : ushort
|
public enum IndicatorsMode : ushort
|
||||||
{
|
{
|
||||||
Info = 0,
|
Info = 0,
|
||||||
@@ -1003,6 +1063,7 @@ namespace NTwain.Data
|
|||||||
/// ICapSupportedSizes values.
|
/// ICapSupportedSizes values.
|
||||||
/// Corresponds to TWSS_* values.
|
/// Corresponds to TWSS_* values.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1028:EnumStorageShouldBeInt32")]
|
||||||
public enum SupportedSize : ushort
|
public enum SupportedSize : ushort
|
||||||
{
|
{
|
||||||
None = 0,
|
None = 0,
|
||||||
@@ -1065,6 +1126,7 @@ namespace NTwain.Data
|
|||||||
/// ICapXferMech, ACapXferMech values.
|
/// ICapXferMech, ACapXferMech values.
|
||||||
/// Corresponds to TWSX_* values.
|
/// Corresponds to TWSX_* values.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1028:EnumStorageShouldBeInt32"), System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1027:MarkEnumsWithFlags")]
|
||||||
public enum XferMech : ushort
|
public enum XferMech : ushort
|
||||||
{
|
{
|
||||||
Native = 0,
|
Native = 0,
|
||||||
@@ -1077,6 +1139,7 @@ namespace NTwain.Data
|
|||||||
/// ICapUnits values.
|
/// ICapUnits values.
|
||||||
/// Corresponds to TWUN_* values.
|
/// Corresponds to TWUN_* values.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1028:EnumStorageShouldBeInt32")]
|
||||||
public enum Unit : ushort
|
public enum Unit : ushort
|
||||||
{
|
{
|
||||||
Inches = 0,
|
Inches = 0,
|
||||||
@@ -1097,6 +1160,7 @@ namespace NTwain.Data
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// Corresponds to TWCY_* values.
|
/// Corresponds to TWCY_* values.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1028:EnumStorageShouldBeInt32")]
|
||||||
public enum Country : ushort
|
public enum Country : ushort
|
||||||
{
|
{
|
||||||
None = 0,
|
None = 0,
|
||||||
@@ -1156,6 +1220,7 @@ namespace NTwain.Data
|
|||||||
EasterIs = 1014,
|
EasterIs = 1014,
|
||||||
Ecuador = 593,
|
Ecuador = 593,
|
||||||
Egypt = 20,
|
Egypt = 20,
|
||||||
|
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1709:IdentifiersShouldBeCasedCorrectly", MessageId = "El")]
|
||||||
ElSalvador = 503,
|
ElSalvador = 503,
|
||||||
Eqguinea = 1015,
|
Eqguinea = 1015,
|
||||||
Ethiopia = 251,
|
Ethiopia = 251,
|
||||||
@@ -1344,6 +1409,7 @@ namespace NTwain.Data
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// Corresponds to TWLG_* values.
|
/// Corresponds to TWLG_* values.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1028:EnumStorageShouldBeInt32")]
|
||||||
public enum Language : short
|
public enum Language : short
|
||||||
{
|
{
|
||||||
UserLocale = -1,
|
UserLocale = -1,
|
||||||
@@ -1360,6 +1426,7 @@ namespace NTwain.Data
|
|||||||
Portuguese = 10,
|
Portuguese = 10,
|
||||||
Spanish = 11,
|
Spanish = 11,
|
||||||
Swedish = 12,
|
Swedish = 12,
|
||||||
|
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1709:IdentifiersShouldBeCasedCorrectly", MessageId = "USA")]
|
||||||
EnglishUSA = 13,
|
EnglishUSA = 13,
|
||||||
Afrikaans = 14,
|
Afrikaans = 14,
|
||||||
Albania = 15,
|
Albania = 15,
|
||||||
@@ -1467,7 +1534,8 @@ namespace NTwain.Data
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// Corresponds to DG_*.
|
/// Corresponds to DG_*.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2217:DoNotMarkEnumsWithFlags"), Flags]
|
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1028:EnumStorageShouldBeInt32"), System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2217:DoNotMarkEnumsWithFlags")]
|
||||||
|
[Flags]
|
||||||
public enum DataGroups : uint
|
public enum DataGroups : uint
|
||||||
{
|
{
|
||||||
None = 0,
|
None = 0,
|
||||||
@@ -1480,6 +1548,7 @@ namespace NTwain.Data
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// Corresponds to DF_*.
|
/// Corresponds to DF_*.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1028:EnumStorageShouldBeInt32")]
|
||||||
[Flags]
|
[Flags]
|
||||||
public enum DataFunctionalities : uint
|
public enum DataFunctionalities : uint
|
||||||
{
|
{
|
||||||
@@ -1492,6 +1561,7 @@ namespace NTwain.Data
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// Corresponds to DAT_*.
|
/// Corresponds to DAT_*.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1028:EnumStorageShouldBeInt32")]
|
||||||
public enum DataArgumentType : ushort
|
public enum DataArgumentType : ushort
|
||||||
{
|
{
|
||||||
Null = 0,
|
Null = 0,
|
||||||
@@ -1544,6 +1614,7 @@ namespace NTwain.Data
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// Corresponds to MSG_*.
|
/// Corresponds to MSG_*.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1028:EnumStorageShouldBeInt32")]
|
||||||
public enum Message : ushort
|
public enum Message : ushort
|
||||||
{
|
{
|
||||||
Null = 0,
|
Null = 0,
|
||||||
@@ -1570,8 +1641,8 @@ namespace NTwain.Data
|
|||||||
DeviceEvent = 0x104,
|
DeviceEvent = 0x104,
|
||||||
|
|
||||||
// Messages used with a pointer to DAT_PARENT data
|
// Messages used with a pointer to DAT_PARENT data
|
||||||
OpenDsm = 0x301,
|
OpenDSM = 0x301,
|
||||||
CloseDsm = 0x302,
|
CloseDSM = 0x302,
|
||||||
|
|
||||||
// Messages used with a pointer to a DAT_IDENTITY structure
|
// Messages used with a pointer to a DAT_IDENTITY structure
|
||||||
OpenDS = 0x401,
|
OpenDS = 0x401,
|
||||||
@@ -1616,6 +1687,7 @@ namespace NTwain.Data
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// Indicates the type of capability.
|
/// Indicates the type of capability.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1028:EnumStorageShouldBeInt32")]
|
||||||
public enum CapabilityId : ushort
|
public enum CapabilityId : ushort
|
||||||
{
|
{
|
||||||
None = 0,
|
None = 0,
|
||||||
@@ -1749,7 +1821,7 @@ namespace NTwain.Data
|
|||||||
ICapBitDepth = 0x112b,
|
ICapBitDepth = 0x112b,
|
||||||
ICapBitDepthReduction = 0x112c, /* Added 1.5 */
|
ICapBitDepthReduction = 0x112c, /* Added 1.5 */
|
||||||
ICapUndefinedImageSize = 0x112d, /* Added 1.6 */
|
ICapUndefinedImageSize = 0x112d, /* Added 1.6 */
|
||||||
ICapImageDataset = 0x112e, /* Added 1.7 */
|
ICapImageDataSet = 0x112e, /* Added 1.7 */
|
||||||
ICapExtImageInfo = 0x112f, /* Added 1.7 */
|
ICapExtImageInfo = 0x112f, /* Added 1.7 */
|
||||||
ICapMinimumHeight = 0x1130, /* Added 1.7 */
|
ICapMinimumHeight = 0x1130, /* Added 1.7 */
|
||||||
ICapMinimumWidth = 0x1131, /* Added 1.7 */
|
ICapMinimumWidth = 0x1131, /* Added 1.7 */
|
||||||
@@ -1791,7 +1863,7 @@ namespace NTwain.Data
|
|||||||
ICapSupportedExtImageInfo = 0x115e, /* Added 2.1 */
|
ICapSupportedExtImageInfo = 0x115e, /* Added 2.1 */
|
||||||
ICapFilmType = 0x115f,
|
ICapFilmType = 0x115f,
|
||||||
ICapMirror = 0x1160,
|
ICapMirror = 0x1160,
|
||||||
ICapJpegSubSampling = 0x1161,
|
ICapJpegSubsampling = 0x1161,
|
||||||
|
|
||||||
/* image data sources MAY support these audio caps */
|
/* image data sources MAY support these audio caps */
|
||||||
ACapXferMech = 0x1202, /* Added 1.8 */
|
ACapXferMech = 0x1202, /* Added 1.8 */
|
||||||
@@ -1802,6 +1874,7 @@ namespace NTwain.Data
|
|||||||
/// Extended Image Info Attributes.
|
/// Extended Image Info Attributes.
|
||||||
/// Corresponds to TWEI_*.
|
/// Corresponds to TWEI_*.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1028:EnumStorageShouldBeInt32")]
|
||||||
public enum ExtendedImageInfo : ushort
|
public enum ExtendedImageInfo : ushort
|
||||||
{
|
{
|
||||||
Invalid = 0,
|
Invalid = 0,
|
||||||
@@ -1885,6 +1958,7 @@ namespace NTwain.Data
|
|||||||
/// EndXfer job control values.
|
/// EndXfer job control values.
|
||||||
/// Corresponds to TWEJ_*.
|
/// Corresponds to TWEJ_*.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1028:EnumStorageShouldBeInt32")]
|
||||||
public enum TWEJ : ushort
|
public enum TWEJ : ushort
|
||||||
{
|
{
|
||||||
None = 0x0000,
|
None = 0x0000,
|
||||||
@@ -1900,6 +1974,7 @@ namespace NTwain.Data
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// Corresponds to TWRC_*.
|
/// Corresponds to TWRC_*.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1028:EnumStorageShouldBeInt32"), System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1027:MarkEnumsWithFlags")]
|
||||||
public enum ReturnCode : ushort
|
public enum ReturnCode : ushort
|
||||||
{
|
{
|
||||||
CustomBase = 0x8000,
|
CustomBase = 0x8000,
|
||||||
@@ -1921,6 +1996,7 @@ namespace NTwain.Data
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// Corresponds to TWCC_*.
|
/// Corresponds to TWCC_*.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1028:EnumStorageShouldBeInt32")]
|
||||||
public enum ConditionCode : ushort
|
public enum ConditionCode : ushort
|
||||||
{
|
{
|
||||||
CustomBase = 0x8000,
|
CustomBase = 0x8000,
|
||||||
@@ -1978,6 +2054,7 @@ namespace NTwain.Data
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// TWAIN's boolean values.
|
/// TWAIN's boolean values.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1028:EnumStorageShouldBeInt32")]
|
||||||
public enum BoolType : ushort
|
public enum BoolType : ushort
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|||||||
@@ -12,61 +12,62 @@ namespace NTwain.Data
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// Reads a TWAIN value.
|
/// Reads a TWAIN value.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="baseAddr">The base addr.</param>
|
/// <param name="baseAddress">The base address.</param>
|
||||||
/// <param name="offset">The offset.</param>
|
/// <param name="offset">The offset.</param>
|
||||||
/// <param name="type">The TWAIN type.</param>
|
/// <param name="type">The TWAIN type.</param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
public static object ReadValue(IntPtr baseAddr, ref int offset, ItemType type)
|
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1045:DoNotPassTypesByReference", MessageId = "1#")]
|
||||||
|
public static object ReadValue(IntPtr baseAddress, ref int offset, ItemType type)
|
||||||
{
|
{
|
||||||
object val = null;
|
object val = null;
|
||||||
switch (type)
|
switch (type)
|
||||||
{
|
{
|
||||||
case ItemType.Int8:
|
case ItemType.Int8:
|
||||||
val = (sbyte)Marshal.ReadByte(baseAddr, offset);
|
val = (sbyte)Marshal.ReadByte(baseAddress, offset);
|
||||||
break;
|
break;
|
||||||
case ItemType.UInt8:
|
case ItemType.UInt8:
|
||||||
val = Marshal.ReadByte(baseAddr, offset);
|
val = Marshal.ReadByte(baseAddress, offset);
|
||||||
break;
|
break;
|
||||||
case ItemType.Bool:
|
case ItemType.Bool:
|
||||||
case ItemType.UInt16:
|
case ItemType.UInt16:
|
||||||
val = (ushort)Marshal.ReadInt16(baseAddr, offset);
|
val = (ushort)Marshal.ReadInt16(baseAddress, offset);
|
||||||
break;
|
break;
|
||||||
case ItemType.Int16:
|
case ItemType.Int16:
|
||||||
val = Marshal.ReadInt16(baseAddr, offset);
|
val = Marshal.ReadInt16(baseAddress, offset);
|
||||||
break;
|
break;
|
||||||
case ItemType.UInt32:
|
case ItemType.UInt32:
|
||||||
val = (uint)Marshal.ReadInt32(baseAddr, offset);
|
val = (uint)Marshal.ReadInt32(baseAddress, offset);
|
||||||
break;
|
break;
|
||||||
case ItemType.Int32:
|
case ItemType.Int32:
|
||||||
val = Marshal.ReadInt32(baseAddr, offset);
|
val = Marshal.ReadInt32(baseAddress, offset);
|
||||||
break;
|
break;
|
||||||
case ItemType.Fix32:
|
case ItemType.Fix32:
|
||||||
TWFix32 f32 = new TWFix32();
|
TWFix32 f32 = new TWFix32();
|
||||||
f32.Whole = Marshal.ReadInt16(baseAddr, offset);
|
f32.Whole = Marshal.ReadInt16(baseAddress, offset);
|
||||||
f32.Fraction = (ushort)Marshal.ReadInt16(baseAddr, offset + 2);
|
f32.Fraction = (ushort)Marshal.ReadInt16(baseAddress, offset + 2);
|
||||||
val = f32;
|
val = f32;
|
||||||
break;
|
break;
|
||||||
case ItemType.Frame:
|
case ItemType.Frame:
|
||||||
TWFrame frame = new TWFrame();
|
TWFrame frame = new TWFrame();
|
||||||
frame.Left = (TWFix32)ReadValue(baseAddr, ref offset, ItemType.Fix32);
|
frame.Left = (TWFix32)ReadValue(baseAddress, ref offset, ItemType.Fix32);
|
||||||
frame.Top = (TWFix32)ReadValue(baseAddr, ref offset, ItemType.Fix32);
|
frame.Top = (TWFix32)ReadValue(baseAddress, ref offset, ItemType.Fix32);
|
||||||
frame.Right = (TWFix32)ReadValue(baseAddr, ref offset, ItemType.Fix32);
|
frame.Right = (TWFix32)ReadValue(baseAddress, ref offset, ItemType.Fix32);
|
||||||
frame.Bottom = (TWFix32)ReadValue(baseAddr, ref offset, ItemType.Fix32);
|
frame.Bottom = (TWFix32)ReadValue(baseAddress, ref offset, ItemType.Fix32);
|
||||||
return frame; // no need to update offset again after reading fix32
|
return frame; // no need to update offset again after reading fix32
|
||||||
case ItemType.String128:
|
case ItemType.String128:
|
||||||
val = ReadString(baseAddr, offset, TwainConst.String128 - 2);
|
val = ReadString(baseAddress, offset, TwainConst.String128 - 2);
|
||||||
break;
|
break;
|
||||||
case ItemType.String255:
|
case ItemType.String255:
|
||||||
val = ReadString(baseAddr, offset, TwainConst.String255 - 1);
|
val = ReadString(baseAddress, offset, TwainConst.String255 - 1);
|
||||||
break;
|
break;
|
||||||
case ItemType.String32:
|
case ItemType.String32:
|
||||||
val = ReadString(baseAddr, offset, TwainConst.String32 - 2);
|
val = ReadString(baseAddress, offset, TwainConst.String32 - 2);
|
||||||
break;
|
break;
|
||||||
case ItemType.String64:
|
case ItemType.String64:
|
||||||
val = ReadString(baseAddr, offset, TwainConst.String64 - 2);
|
val = ReadString(baseAddress, offset, TwainConst.String64 - 2);
|
||||||
break;
|
break;
|
||||||
case ItemType.Handle:
|
case ItemType.Handle:
|
||||||
val = new IntPtr(baseAddr.ToInt64() + offset);
|
val = new IntPtr(baseAddress.ToInt64() + offset);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
offset += GetItemTypeSize(type);
|
offset += GetItemTypeSize(type);
|
||||||
|
|||||||
@@ -32,6 +32,7 @@ namespace NTwain.Internals
|
|||||||
catch
|
catch
|
||||||
{
|
{
|
||||||
if (win != null) { win.Dispose(); }
|
if (win != null) { win.Dispose(); }
|
||||||
|
throw;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -19,6 +19,7 @@ namespace NTwain
|
|||||||
// in essence it only exists in 64 bit systems and thus
|
// in essence it only exists in 64 bit systems and thus
|
||||||
// the 2 sets of identical pinvokes for windows :(
|
// the 2 sets of identical pinvokes for windows :(
|
||||||
|
|
||||||
|
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Performance", "CA1810:InitializeReferenceTypeStaticFieldsInline")]
|
||||||
static Platform()
|
static Platform()
|
||||||
{
|
{
|
||||||
IsApp64bit = IntPtr.Size == 8;
|
IsApp64bit = IntPtr.Size == 8;
|
||||||
@@ -29,6 +30,8 @@ namespace NTwain
|
|||||||
IsOnMono = Type.GetType("Mono.Runtime") != null;
|
IsOnMono = Type.GetType("Mono.Runtime") != null;
|
||||||
IsWin = Environment.OSVersion.Platform == PlatformID.Win32NT;
|
IsWin = Environment.OSVersion.Platform == PlatformID.Win32NT;
|
||||||
IsLinux = Environment.OSVersion.Platform == PlatformID.Unix;
|
IsLinux = Environment.OSVersion.Platform == PlatformID.Unix;
|
||||||
|
|
||||||
|
_defaultMemManager = new WinMemoryManager();
|
||||||
}
|
}
|
||||||
|
|
||||||
internal static readonly bool UseNewDSM;
|
internal static readonly bool UseNewDSM;
|
||||||
@@ -61,8 +64,8 @@ namespace NTwain
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static readonly WinMemoryManager _defaultMemManager = new WinMemoryManager();
|
static readonly WinMemoryManager _defaultMemManager;
|
||||||
static IMemoryManager _specifiedMemManager = null;
|
static IMemoryManager _specifiedMemManager;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets the <see cref="IMemoryManager"/> for communicating with data sources.
|
/// Gets the <see cref="IMemoryManager"/> for communicating with data sources.
|
||||||
|
|||||||
@@ -14,7 +14,8 @@ namespace NTwain.Triplets
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="info">The info.</param>
|
/// <param name="info">The info.</param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
public ReturnCode Get(out TWAudioInfo info)
|
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1021:AvoidOutParameters", MessageId = "0#")]
|
||||||
|
public ReturnCode Get(out TWAudioInfo info)
|
||||||
{
|
{
|
||||||
Session.VerifyState(6, 7, DataGroups.Audio, DataArgumentType.AudioInfo, Message.Get);
|
Session.VerifyState(6, 7, DataGroups.Audio, DataArgumentType.AudioInfo, Message.Get);
|
||||||
info = new TWAudioInfo();
|
info = new TWAudioInfo();
|
||||||
|
|||||||
@@ -16,7 +16,8 @@ namespace NTwain.Triplets
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="customData">The custom data.</param>
|
/// <param name="customData">The custom data.</param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
public ReturnCode Get(out TWCustomDSData customData)
|
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1021:AvoidOutParameters", MessageId = "0#")]
|
||||||
|
public ReturnCode Get(out TWCustomDSData customData)
|
||||||
{
|
{
|
||||||
Session.VerifyState(4, 4, DataGroups.Control, DataArgumentType.CustomDSData, Message.Get);
|
Session.VerifyState(4, 4, DataGroups.Control, DataArgumentType.CustomDSData, Message.Get);
|
||||||
customData = new TWCustomDSData();
|
customData = new TWCustomDSData();
|
||||||
|
|||||||
@@ -9,7 +9,8 @@ namespace NTwain.Triplets
|
|||||||
public sealed class DeviceEvent : OpBase
|
public sealed class DeviceEvent : OpBase
|
||||||
{
|
{
|
||||||
internal DeviceEvent(ITwainSessionInternal session) : base(session) { }
|
internal DeviceEvent(ITwainSessionInternal session) : base(session) { }
|
||||||
public ReturnCode Get(out TWDeviceEvent sourceDeviceEvent)
|
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1021:AvoidOutParameters", MessageId = "0#")]
|
||||||
|
public ReturnCode Get(out TWDeviceEvent sourceDeviceEvent)
|
||||||
{
|
{
|
||||||
Session.VerifyState(4, 7, DataGroups.Control, DataArgumentType.DeviceEvent, Message.Get);
|
Session.VerifyState(4, 7, DataGroups.Control, DataArgumentType.DeviceEvent, Message.Get);
|
||||||
sourceDeviceEvent = new TWDeviceEvent();
|
sourceDeviceEvent = new TWDeviceEvent();
|
||||||
|
|||||||
@@ -33,7 +33,8 @@ namespace NTwain.Triplets
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="source">The source.</param>
|
/// <param name="source">The source.</param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
public ReturnCode GetDefault(out TWIdentity source)
|
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1021:AvoidOutParameters", MessageId = "0#")]
|
||||||
|
public ReturnCode GetDefault(out TWIdentity source)
|
||||||
{
|
{
|
||||||
Session.VerifyState(3, 7, DataGroups.Control, DataArgumentType.Identity, Message.GetDefault);
|
Session.VerifyState(3, 7, DataGroups.Control, DataArgumentType.Identity, Message.GetDefault);
|
||||||
source = new TWIdentity();
|
source = new TWIdentity();
|
||||||
@@ -47,7 +48,8 @@ namespace NTwain.Triplets
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="source">The source.</param>
|
/// <param name="source">The source.</param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
public ReturnCode GetFirst(out TWIdentity source)
|
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1021:AvoidOutParameters", MessageId = "0#")]
|
||||||
|
public ReturnCode GetFirst(out TWIdentity source)
|
||||||
{
|
{
|
||||||
Session.VerifyState(3, 7, DataGroups.Control, DataArgumentType.Identity, Message.GetFirst);
|
Session.VerifyState(3, 7, DataGroups.Control, DataArgumentType.Identity, Message.GetFirst);
|
||||||
source = new TWIdentity();
|
source = new TWIdentity();
|
||||||
@@ -60,7 +62,8 @@ namespace NTwain.Triplets
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="source">The source.</param>
|
/// <param name="source">The source.</param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
public ReturnCode GetNext(out TWIdentity source)
|
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1021:AvoidOutParameters", MessageId = "0#")]
|
||||||
|
public ReturnCode GetNext(out TWIdentity source)
|
||||||
{
|
{
|
||||||
Session.VerifyState(3, 7, DataGroups.Control, DataArgumentType.Identity, Message.GetNext);
|
Session.VerifyState(3, 7, DataGroups.Control, DataArgumentType.Identity, Message.GetNext);
|
||||||
source = new TWIdentity();
|
source = new TWIdentity();
|
||||||
@@ -103,7 +106,8 @@ namespace NTwain.Triplets
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="source">The source.</param>
|
/// <param name="source">The source.</param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
public ReturnCode UserSelect(out TWIdentity source)
|
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1021:AvoidOutParameters", MessageId = "0#")]
|
||||||
|
public ReturnCode UserSelect(out TWIdentity source)
|
||||||
{
|
{
|
||||||
Session.VerifyState(3, 7, DataGroups.Control, DataArgumentType.Identity, Message.UserSelect);
|
Session.VerifyState(3, 7, DataGroups.Control, DataArgumentType.Identity, Message.UserSelect);
|
||||||
source = new TWIdentity();
|
source = new TWIdentity();
|
||||||
|
|||||||
@@ -21,8 +21,8 @@ namespace NTwain.Triplets
|
|||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
public ReturnCode CloseDsm(IntPtr handle)
|
public ReturnCode CloseDsm(IntPtr handle)
|
||||||
{
|
{
|
||||||
Session.VerifyState(3, 3, DataGroups.Control, DataArgumentType.Parent, Message.CloseDsm);
|
Session.VerifyState(3, 3, DataGroups.Control, DataArgumentType.Parent, Message.CloseDSM);
|
||||||
var rc = Dsm.DsmEntry(Session.AppId, null, DataGroups.Control, DataArgumentType.Parent, Message.CloseDsm, ref handle);
|
var rc = Dsm.DsmEntry(Session.AppId, null, DataGroups.Control, DataArgumentType.Parent, Message.CloseDSM, ref handle);
|
||||||
if (rc == ReturnCode.Success)
|
if (rc == ReturnCode.Success)
|
||||||
{
|
{
|
||||||
Session.ChangeState(2, true);
|
Session.ChangeState(2, true);
|
||||||
@@ -39,8 +39,8 @@ namespace NTwain.Triplets
|
|||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
public ReturnCode OpenDsm(IntPtr handle)
|
public ReturnCode OpenDsm(IntPtr handle)
|
||||||
{
|
{
|
||||||
Session.VerifyState(1, 2, DataGroups.Control, DataArgumentType.Parent, Message.OpenDsm);
|
Session.VerifyState(1, 2, DataGroups.Control, DataArgumentType.Parent, Message.OpenDSM);
|
||||||
var rc = Dsm.DsmEntry(Session.AppId, null, DataGroups.Control, DataArgumentType.Parent, Message.OpenDsm, ref handle);
|
var rc = Dsm.DsmEntry(Session.AppId, null, DataGroups.Control, DataArgumentType.Parent, Message.OpenDSM, ref handle);
|
||||||
if (rc == ReturnCode.Success)
|
if (rc == ReturnCode.Success)
|
||||||
{
|
{
|
||||||
Session.ChangeState(3, true);
|
Session.ChangeState(3, true);
|
||||||
|
|||||||
@@ -6,7 +6,8 @@ namespace NTwain.Triplets
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// Represents <see cref="DataArgumentType.SetupFileXfer"/>.
|
/// Represents <see cref="DataArgumentType.SetupFileXfer"/>.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public sealed class SetupFileXfer : OpBase
|
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", MessageId = "Xfer")]
|
||||||
|
public sealed class SetupFileXfer : OpBase
|
||||||
{
|
{
|
||||||
internal SetupFileXfer(ITwainSessionInternal session) : base(session) { }
|
internal SetupFileXfer(ITwainSessionInternal session) : base(session) { }
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -15,7 +16,8 @@ namespace NTwain.Triplets
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="setupFileXfer">The setup file xfer.</param>
|
/// <param name="setupFileXfer">The setup file xfer.</param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
public ReturnCode Get(out TWSetupFileXfer setupFileXfer)
|
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1021:AvoidOutParameters", MessageId = "0#")]
|
||||||
|
public ReturnCode Get(out TWSetupFileXfer setupFileXfer)
|
||||||
{
|
{
|
||||||
Session.VerifyState(4, 6, DataGroups.Control, DataArgumentType.SetupFileXfer, Message.Get);
|
Session.VerifyState(4, 6, DataGroups.Control, DataArgumentType.SetupFileXfer, Message.Get);
|
||||||
setupFileXfer = new TWSetupFileXfer();
|
setupFileXfer = new TWSetupFileXfer();
|
||||||
@@ -27,7 +29,8 @@ namespace NTwain.Triplets
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="setupFileXfer">The setup file xfer.</param>
|
/// <param name="setupFileXfer">The setup file xfer.</param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
public ReturnCode GetDefault(out TWSetupFileXfer setupFileXfer)
|
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1021:AvoidOutParameters", MessageId = "0#")]
|
||||||
|
public ReturnCode GetDefault(out TWSetupFileXfer setupFileXfer)
|
||||||
{
|
{
|
||||||
Session.VerifyState(4, 6, DataGroups.Control, DataArgumentType.SetupFileXfer, Message.GetDefault);
|
Session.VerifyState(4, 6, DataGroups.Control, DataArgumentType.SetupFileXfer, Message.GetDefault);
|
||||||
setupFileXfer = new TWSetupFileXfer();
|
setupFileXfer = new TWSetupFileXfer();
|
||||||
@@ -40,7 +43,8 @@ namespace NTwain.Triplets
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="setupFileXfer">The setup file xfer.</param>
|
/// <param name="setupFileXfer">The setup file xfer.</param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
public ReturnCode Reset(out TWSetupFileXfer setupFileXfer)
|
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1021:AvoidOutParameters", MessageId = "0#")]
|
||||||
|
public ReturnCode Reset(out TWSetupFileXfer setupFileXfer)
|
||||||
{
|
{
|
||||||
Session.VerifyState(4, 4, DataGroups.Control, DataArgumentType.SetupFileXfer, Message.Reset);
|
Session.VerifyState(4, 4, DataGroups.Control, DataArgumentType.SetupFileXfer, Message.Reset);
|
||||||
setupFileXfer = new TWSetupFileXfer();
|
setupFileXfer = new TWSetupFileXfer();
|
||||||
|
|||||||
@@ -6,7 +6,8 @@ namespace NTwain.Triplets
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// Represents <see cref="DataArgumentType.SetupMemXfer"/>.
|
/// Represents <see cref="DataArgumentType.SetupMemXfer"/>.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public sealed class SetupMemXfer : OpBase
|
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", MessageId = "Mem")]
|
||||||
|
public sealed class SetupMemXfer : OpBase
|
||||||
{
|
{
|
||||||
internal SetupMemXfer(ITwainSessionInternal session) : base(session) { }
|
internal SetupMemXfer(ITwainSessionInternal session) : base(session) { }
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -15,7 +16,8 @@ namespace NTwain.Triplets
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="setupMemXfer">The setup mem xfer.</param>
|
/// <param name="setupMemXfer">The setup mem xfer.</param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
public ReturnCode Get(out TWSetupMemXfer setupMemXfer)
|
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1021:AvoidOutParameters", MessageId = "0#")]
|
||||||
|
public ReturnCode Get(out TWSetupMemXfer setupMemXfer)
|
||||||
{
|
{
|
||||||
Session.VerifyState(4, 6, DataGroups.Control, DataArgumentType.SetupMemXfer, Message.Get);
|
Session.VerifyState(4, 6, DataGroups.Control, DataArgumentType.SetupMemXfer, Message.Get);
|
||||||
setupMemXfer = new TWSetupMemXfer();
|
setupMemXfer = new TWSetupMemXfer();
|
||||||
|
|||||||
@@ -14,7 +14,8 @@ namespace NTwain.Triplets
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="status">The status.</param>
|
/// <param name="status">The status.</param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
public ReturnCode GetManager(out TWStatus status)
|
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1021:AvoidOutParameters", MessageId = "0#")]
|
||||||
|
public ReturnCode GetManager(out TWStatus status)
|
||||||
{
|
{
|
||||||
Session.VerifyState(2, 7, DataGroups.Control, DataArgumentType.Status, Message.Get);
|
Session.VerifyState(2, 7, DataGroups.Control, DataArgumentType.Status, Message.Get);
|
||||||
status = new TWStatus();
|
status = new TWStatus();
|
||||||
@@ -26,7 +27,8 @@ namespace NTwain.Triplets
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="status">The status.</param>
|
/// <param name="status">The status.</param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
public ReturnCode GetSource(out TWStatus status)
|
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1021:AvoidOutParameters", MessageId = "0#")]
|
||||||
|
public ReturnCode GetSource(out TWStatus status)
|
||||||
{
|
{
|
||||||
Session.VerifyState(4, 7, DataGroups.Control, DataArgumentType.Status, Message.Get);
|
Session.VerifyState(4, 7, DataGroups.Control, DataArgumentType.Status, Message.Get);
|
||||||
status = new TWStatus();
|
status = new TWStatus();
|
||||||
|
|||||||
@@ -16,6 +16,7 @@ namespace NTwain.Triplets
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="value">The value.</param>
|
/// <param name="value">The value.</param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
|
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1045:DoNotPassTypesByReference", MessageId = "0#")]
|
||||||
public ReturnCode Get(ref DataGroups value)
|
public ReturnCode Get(ref DataGroups value)
|
||||||
{
|
{
|
||||||
Session.VerifyState(4, 6, DataGroups.Control, DataArgumentType.XferGroup, Message.Get);
|
Session.VerifyState(4, 6, DataGroups.Control, DataArgumentType.XferGroup, Message.Get);
|
||||||
|
|||||||
@@ -125,7 +125,8 @@ namespace NTwain.Triplets
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
SetupFileXfer _setupFileXfer;
|
SetupFileXfer _setupFileXfer;
|
||||||
public SetupFileXfer SetupFileXfer
|
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", MessageId = "Xfer")]
|
||||||
|
public SetupFileXfer SetupFileXfer
|
||||||
{
|
{
|
||||||
get
|
get
|
||||||
{
|
{
|
||||||
@@ -134,7 +135,8 @@ namespace NTwain.Triplets
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
SetupMemXfer _setupMemXfer;
|
SetupMemXfer _setupMemXfer;
|
||||||
public SetupMemXfer SetupMemXfer
|
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", MessageId = "Xfer"), System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", MessageId = "Mem")]
|
||||||
|
public SetupMemXfer SetupMemXfer
|
||||||
{
|
{
|
||||||
get
|
get
|
||||||
{
|
{
|
||||||
@@ -170,7 +172,8 @@ namespace NTwain.Triplets
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
XferGroup _xferGroup;
|
XferGroup _xferGroup;
|
||||||
public XferGroup XferGroup
|
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", MessageId = "Xfer")]
|
||||||
|
public XferGroup XferGroup
|
||||||
{
|
{
|
||||||
get
|
get
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -16,7 +16,8 @@ namespace NTwain.Triplets
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="cieColor">Color data.</param>
|
/// <param name="cieColor">Color data.</param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
public ReturnCode Get(out TWCieColor cieColor)
|
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1021:AvoidOutParameters", MessageId = "0#")]
|
||||||
|
public ReturnCode Get(out TWCieColor cieColor)
|
||||||
{
|
{
|
||||||
Session.VerifyState(4, 6, DataGroups.Image, DataArgumentType.CieColor, Message.Get);
|
Session.VerifyState(4, 6, DataGroups.Image, DataArgumentType.CieColor, Message.Get);
|
||||||
cieColor = new TWCieColor();
|
cieColor = new TWCieColor();
|
||||||
|
|||||||
@@ -10,7 +10,8 @@ namespace NTwain.Triplets
|
|||||||
{
|
{
|
||||||
internal ExtImageInfo(ITwainSessionInternal session) : base(session) { }
|
internal ExtImageInfo(ITwainSessionInternal session) : base(session) { }
|
||||||
|
|
||||||
public ReturnCode Get(out TWExtImageInfo info)
|
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1021:AvoidOutParameters", MessageId = "0#")]
|
||||||
|
public ReturnCode Get(out TWExtImageInfo info)
|
||||||
{
|
{
|
||||||
Session.VerifyState(7, 7, DataGroups.Image, DataArgumentType.ExtImageInfo, Message.Get);
|
Session.VerifyState(7, 7, DataGroups.Image, DataArgumentType.ExtImageInfo, Message.Get);
|
||||||
info = new TWExtImageInfo();
|
info = new TWExtImageInfo();
|
||||||
|
|||||||
@@ -17,6 +17,7 @@ namespace NTwain.Triplets
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="filter">The filter.</param>
|
/// <param name="filter">The filter.</param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
|
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1021:AvoidOutParameters", MessageId = "0#")]
|
||||||
public ReturnCode Get(out TWFilter filter)
|
public ReturnCode Get(out TWFilter filter)
|
||||||
{
|
{
|
||||||
Session.VerifyState(4, 6, DataGroups.Image, DataArgumentType.Filter, Message.Get);
|
Session.VerifyState(4, 6, DataGroups.Image, DataArgumentType.Filter, Message.Get);
|
||||||
@@ -29,6 +30,7 @@ namespace NTwain.Triplets
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="filter">The filter.</param>
|
/// <param name="filter">The filter.</param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
|
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1021:AvoidOutParameters", MessageId = "0#")]
|
||||||
public ReturnCode GetDefault(out TWFilter filter)
|
public ReturnCode GetDefault(out TWFilter filter)
|
||||||
{
|
{
|
||||||
Session.VerifyState(4, 6, DataGroups.Image, DataArgumentType.Filter, Message.GetDefault);
|
Session.VerifyState(4, 6, DataGroups.Image, DataArgumentType.Filter, Message.GetDefault);
|
||||||
@@ -53,6 +55,7 @@ namespace NTwain.Triplets
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="filter">The filter.</param>
|
/// <param name="filter">The filter.</param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
|
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1021:AvoidOutParameters", MessageId = "0#")]
|
||||||
public ReturnCode Reset(out TWFilter filter)
|
public ReturnCode Reset(out TWFilter filter)
|
||||||
{
|
{
|
||||||
Session.VerifyState(4, 4, DataGroups.Image, DataArgumentType.Filter, Message.Reset);
|
Session.VerifyState(4, 4, DataGroups.Image, DataArgumentType.Filter, Message.Reset);
|
||||||
|
|||||||
@@ -16,7 +16,8 @@ namespace NTwain.Triplets
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="response">The response.</param>
|
/// <param name="response">The response.</param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
public ReturnCode Reset(out TWGrayResponse response)
|
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1021:AvoidOutParameters", MessageId = "0#")]
|
||||||
|
public ReturnCode Reset(out TWGrayResponse response)
|
||||||
{
|
{
|
||||||
Session.VerifyState(4, 4, DataGroups.Image, DataArgumentType.GrayResponse, Message.Reset);
|
Session.VerifyState(4, 4, DataGroups.Image, DataArgumentType.GrayResponse, Message.Reset);
|
||||||
response = new TWGrayResponse();
|
response = new TWGrayResponse();
|
||||||
|
|||||||
@@ -16,7 +16,8 @@ namespace NTwain.Triplets
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="profile">The profile.</param>
|
/// <param name="profile">The profile.</param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
public ReturnCode Get(ref TWMemory profile)
|
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1045:DoNotPassTypesByReference", MessageId = "0#")]
|
||||||
|
public ReturnCode Get(ref TWMemory profile)
|
||||||
{
|
{
|
||||||
Session.VerifyState(6, 7, DataGroups.Image, DataArgumentType.IccProfile, Message.Get);
|
Session.VerifyState(6, 7, DataGroups.Image, DataArgumentType.IccProfile, Message.Get);
|
||||||
profile = new TWMemory();
|
profile = new TWMemory();
|
||||||
|
|||||||
@@ -10,7 +10,8 @@ namespace NTwain.Triplets
|
|||||||
{
|
{
|
||||||
internal ImageInfo(ITwainSessionInternal session) : base(session) { }
|
internal ImageInfo(ITwainSessionInternal session) : base(session) { }
|
||||||
|
|
||||||
public ReturnCode Get(out TWImageInfo info)
|
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1021:AvoidOutParameters", MessageId = "0#")]
|
||||||
|
public ReturnCode Get(out TWImageInfo info)
|
||||||
{
|
{
|
||||||
Session.VerifyState(6, 7, DataGroups.Image, DataArgumentType.ImageInfo, Message.Get);
|
Session.VerifyState(6, 7, DataGroups.Image, DataArgumentType.ImageInfo, Message.Get);
|
||||||
info = new TWImageInfo();
|
info = new TWImageInfo();
|
||||||
|
|||||||
@@ -10,21 +10,24 @@ namespace NTwain.Triplets
|
|||||||
{
|
{
|
||||||
internal ImageLayout(ITwainSessionInternal session) : base(session) { }
|
internal ImageLayout(ITwainSessionInternal session) : base(session) { }
|
||||||
|
|
||||||
public ReturnCode Get(out TWImageLayout layout)
|
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1021:AvoidOutParameters", MessageId = "0#")]
|
||||||
|
public ReturnCode Get(out TWImageLayout layout)
|
||||||
{
|
{
|
||||||
Session.VerifyState(4, 6, DataGroups.Image, DataArgumentType.ImageLayout, Message.Get);
|
Session.VerifyState(4, 6, DataGroups.Image, DataArgumentType.ImageLayout, Message.Get);
|
||||||
layout = new TWImageLayout();
|
layout = new TWImageLayout();
|
||||||
return Dsm.DsmEntry(Session.AppId, Session.SourceId, Message.Get, layout);
|
return Dsm.DsmEntry(Session.AppId, Session.SourceId, Message.Get, layout);
|
||||||
}
|
}
|
||||||
|
|
||||||
public ReturnCode GetDefault(out TWImageLayout layout)
|
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1021:AvoidOutParameters", MessageId = "0#")]
|
||||||
|
public ReturnCode GetDefault(out TWImageLayout layout)
|
||||||
{
|
{
|
||||||
Session.VerifyState(4, 6, DataGroups.Image, DataArgumentType.ImageLayout, Message.GetDefault);
|
Session.VerifyState(4, 6, DataGroups.Image, DataArgumentType.ImageLayout, Message.GetDefault);
|
||||||
layout = new TWImageLayout();
|
layout = new TWImageLayout();
|
||||||
return Dsm.DsmEntry(Session.AppId, Session.SourceId, Message.GetDefault, layout);
|
return Dsm.DsmEntry(Session.AppId, Session.SourceId, Message.GetDefault, layout);
|
||||||
}
|
}
|
||||||
|
|
||||||
public ReturnCode Reset(out TWImageLayout layout)
|
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1021:AvoidOutParameters", MessageId = "0#")]
|
||||||
|
public ReturnCode Reset(out TWImageLayout layout)
|
||||||
{
|
{
|
||||||
Session.VerifyState(4, 4, DataGroups.Image, DataArgumentType.ImageLayout, Message.Reset);
|
Session.VerifyState(4, 4, DataGroups.Image, DataArgumentType.ImageLayout, Message.Reset);
|
||||||
layout = new TWImageLayout();
|
layout = new TWImageLayout();
|
||||||
|
|||||||
@@ -16,7 +16,8 @@ namespace NTwain.Triplets
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="compression">The compression.</param>
|
/// <param name="compression">The compression.</param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
public ReturnCode Get(out TWJpegCompression compression)
|
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1021:AvoidOutParameters", MessageId = "0#")]
|
||||||
|
public ReturnCode Get(out TWJpegCompression compression)
|
||||||
{
|
{
|
||||||
Session.VerifyState(4, 6, DataGroups.Image, DataArgumentType.JpegCompression, Message.Get);
|
Session.VerifyState(4, 6, DataGroups.Image, DataArgumentType.JpegCompression, Message.Get);
|
||||||
compression = new TWJpegCompression();
|
compression = new TWJpegCompression();
|
||||||
@@ -29,7 +30,8 @@ namespace NTwain.Triplets
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="compression">The compression.</param>
|
/// <param name="compression">The compression.</param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
public ReturnCode GetDefault(out TWJpegCompression compression)
|
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1021:AvoidOutParameters", MessageId = "0#")]
|
||||||
|
public ReturnCode GetDefault(out TWJpegCompression compression)
|
||||||
{
|
{
|
||||||
Session.VerifyState(4, 6, DataGroups.Image, DataArgumentType.JpegCompression, Message.GetDefault);
|
Session.VerifyState(4, 6, DataGroups.Image, DataArgumentType.JpegCompression, Message.GetDefault);
|
||||||
compression = new TWJpegCompression();
|
compression = new TWJpegCompression();
|
||||||
@@ -41,7 +43,8 @@ namespace NTwain.Triplets
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="compression">The compression.</param>
|
/// <param name="compression">The compression.</param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
public ReturnCode Reset(out TWJpegCompression compression)
|
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1021:AvoidOutParameters", MessageId = "0#")]
|
||||||
|
public ReturnCode Reset(out TWJpegCompression compression)
|
||||||
{
|
{
|
||||||
Session.VerifyState(4, 4, DataGroups.Image, DataArgumentType.JpegCompression, Message.Reset);
|
Session.VerifyState(4, 4, DataGroups.Image, DataArgumentType.JpegCompression, Message.Reset);
|
||||||
compression = new TWJpegCompression();
|
compression = new TWJpegCompression();
|
||||||
|
|||||||
@@ -15,7 +15,8 @@ namespace NTwain.Triplets
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="palette">The palette.</param>
|
/// <param name="palette">The palette.</param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
public ReturnCode Get(out TWPalette8 palette)
|
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1021:AvoidOutParameters", MessageId = "0#")]
|
||||||
|
public ReturnCode Get(out TWPalette8 palette)
|
||||||
{
|
{
|
||||||
Session.VerifyState(4, 6, DataGroups.Image, DataArgumentType.Palette8, Message.Get);
|
Session.VerifyState(4, 6, DataGroups.Image, DataArgumentType.Palette8, Message.Get);
|
||||||
palette = new TWPalette8();
|
palette = new TWPalette8();
|
||||||
@@ -27,7 +28,8 @@ namespace NTwain.Triplets
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="palette">The palette.</param>
|
/// <param name="palette">The palette.</param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
public ReturnCode GetDefault(out TWPalette8 palette)
|
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1021:AvoidOutParameters", MessageId = "0#")]
|
||||||
|
public ReturnCode GetDefault(out TWPalette8 palette)
|
||||||
{
|
{
|
||||||
Session.VerifyState(4, 6, DataGroups.Image, DataArgumentType.Palette8, Message.GetDefault);
|
Session.VerifyState(4, 6, DataGroups.Image, DataArgumentType.Palette8, Message.GetDefault);
|
||||||
palette = new TWPalette8();
|
palette = new TWPalette8();
|
||||||
@@ -40,7 +42,8 @@ namespace NTwain.Triplets
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="palette">The palette.</param>
|
/// <param name="palette">The palette.</param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
public ReturnCode Reset(out TWPalette8 palette)
|
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1021:AvoidOutParameters", MessageId = "0#")]
|
||||||
|
public ReturnCode Reset(out TWPalette8 palette)
|
||||||
{
|
{
|
||||||
Session.VerifyState(4, 4, DataGroups.Image, DataArgumentType.Palette8, Message.Reset);
|
Session.VerifyState(4, 4, DataGroups.Image, DataArgumentType.Palette8, Message.Reset);
|
||||||
palette = new TWPalette8();
|
palette = new TWPalette8();
|
||||||
|
|||||||
@@ -17,7 +17,8 @@ namespace NTwain.Triplets
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="response">The response.</param>
|
/// <param name="response">The response.</param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
public ReturnCode Reset(out TWRgbResponse response)
|
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1021:AvoidOutParameters", MessageId = "0#")]
|
||||||
|
public ReturnCode Reset(out TWRgbResponse response)
|
||||||
{
|
{
|
||||||
Session.VerifyState(4, 4, DataGroups.Image, DataArgumentType.RgbResponse, Message.Reset);
|
Session.VerifyState(4, 4, DataGroups.Image, DataArgumentType.RgbResponse, Message.Reset);
|
||||||
response = new TWRgbResponse();
|
response = new TWRgbResponse();
|
||||||
|
|||||||
@@ -61,7 +61,7 @@ namespace NTwain
|
|||||||
private set
|
private set
|
||||||
{
|
{
|
||||||
_supportedCaps = value;
|
_supportedCaps = value;
|
||||||
RaisePropertyChanged("SupportedCaps");
|
OnPropertyChanged("SupportedCaps");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -97,7 +97,7 @@ namespace NTwain
|
|||||||
_state = newState;
|
_state = newState;
|
||||||
if (notifyChange)
|
if (notifyChange)
|
||||||
{
|
{
|
||||||
RaisePropertyChanged("State");
|
OnPropertyChanged("State");
|
||||||
SafeAsyncSyncableRaiseOnEvent(OnStateChanged, StateChanged);
|
SafeAsyncSyncableRaiseOnEvent(OnStateChanged, StateChanged);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -110,7 +110,7 @@ namespace NTwain
|
|||||||
void ITwainSessionInternal.ChangeSourceId(TWIdentity sourceId)
|
void ITwainSessionInternal.ChangeSourceId(TWIdentity sourceId)
|
||||||
{
|
{
|
||||||
SourceId = sourceId;
|
SourceId = sourceId;
|
||||||
RaisePropertyChanged("SourceId");
|
OnPropertyChanged("SourceId");
|
||||||
SafeAsyncSyncableRaiseOnEvent(OnSourceChanged, SourceChanged);
|
SafeAsyncSyncableRaiseOnEvent(OnSourceChanged, SourceChanged);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -154,7 +154,7 @@ namespace NTwain
|
|||||||
if (value > 0 && value < 8)
|
if (value > 0 && value < 8)
|
||||||
{
|
{
|
||||||
_state = value;
|
_state = value;
|
||||||
RaisePropertyChanged("State");
|
OnPropertyChanged("State");
|
||||||
SafeAsyncSyncableRaiseOnEvent(OnStateChanged, StateChanged);
|
SafeAsyncSyncableRaiseOnEvent(OnStateChanged, StateChanged);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -216,7 +216,7 @@ namespace NTwain
|
|||||||
/// Raises the <see cref="PropertyChanged"/> event.
|
/// Raises the <see cref="PropertyChanged"/> event.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="propertyName">Name of the property.</param>
|
/// <param name="propertyName">Name of the property.</param>
|
||||||
protected void RaisePropertyChanged(string propertyName)
|
protected void OnPropertyChanged(string propertyName)
|
||||||
{
|
{
|
||||||
if (SynchronizationContext == null)
|
if (SynchronizationContext == null)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
using NTwain.Data;
|
using NTwain.Data;
|
||||||
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
|
|
||||||
@@ -17,6 +18,8 @@ namespace NTwain
|
|||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
public static TWStatus GetManagerStatus(this ITwainOperation session)
|
public static TWStatus GetManagerStatus(this ITwainOperation session)
|
||||||
{
|
{
|
||||||
|
if (session == null) { throw new ArgumentNullException("session"); }
|
||||||
|
|
||||||
TWStatus stat;
|
TWStatus stat;
|
||||||
session.DGControl.Status.GetManager(out stat);
|
session.DGControl.Status.GetManager(out stat);
|
||||||
return stat;
|
return stat;
|
||||||
@@ -28,6 +31,8 @@ namespace NTwain
|
|||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
public static TWStatus GetSourceStatus(this ITwainOperation session)
|
public static TWStatus GetSourceStatus(this ITwainOperation session)
|
||||||
{
|
{
|
||||||
|
if (session == null) { throw new ArgumentNullException("session"); }
|
||||||
|
|
||||||
TWStatus stat;
|
TWStatus stat;
|
||||||
session.DGControl.Status.GetSource(out stat);
|
session.DGControl.Status.GetSource(out stat);
|
||||||
return stat;
|
return stat;
|
||||||
@@ -41,6 +46,8 @@ namespace NTwain
|
|||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
public static IList<TWIdentity> GetSources(this ITwainOperation session)
|
public static IList<TWIdentity> GetSources(this ITwainOperation session)
|
||||||
{
|
{
|
||||||
|
if (session == null) { throw new ArgumentNullException("session"); }
|
||||||
|
|
||||||
List<TWIdentity> list = new List<TWIdentity>();
|
List<TWIdentity> list = new List<TWIdentity>();
|
||||||
|
|
||||||
// now enumerate
|
// now enumerate
|
||||||
@@ -69,6 +76,8 @@ namespace NTwain
|
|||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
public static object GetCurrentCap(this ITwainOperation session, CapabilityId capId)
|
public static object GetCurrentCap(this ITwainOperation session, CapabilityId capId)
|
||||||
{
|
{
|
||||||
|
if (session == null) { throw new ArgumentNullException("session"); }
|
||||||
|
|
||||||
using (TWCapability cap = new TWCapability(capId))
|
using (TWCapability cap = new TWCapability(capId))
|
||||||
{
|
{
|
||||||
var rc = session.DGControl.Capability.GetCurrent(cap);
|
var rc = session.DGControl.Capability.GetCurrent(cap);
|
||||||
@@ -109,6 +118,8 @@ namespace NTwain
|
|||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
public static IList<object> ReadMultiCapValues(this TWCapability capability, IList<object> toPopulate)
|
public static IList<object> ReadMultiCapValues(this TWCapability capability, IList<object> toPopulate)
|
||||||
{
|
{
|
||||||
|
if (capability == null) { throw new ArgumentNullException("capability"); }
|
||||||
|
|
||||||
if (toPopulate == null) { toPopulate = new List<object>(); }
|
if (toPopulate == null) { toPopulate = new List<object>(); }
|
||||||
|
|
||||||
var read = CapReadOut.ReadValue(capability);
|
var read = CapReadOut.ReadValue(capability);
|
||||||
@@ -149,6 +160,8 @@ namespace NTwain
|
|||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
public static IList<object> GetCapabilityValues(this ITwainOperation session, CapabilityId capabilityId)
|
public static IList<object> GetCapabilityValues(this ITwainOperation session, CapabilityId capabilityId)
|
||||||
{
|
{
|
||||||
|
if (session == null) { throw new ArgumentNullException("session"); }
|
||||||
|
|
||||||
var list = new List<object>();
|
var list = new List<object>();
|
||||||
using (TWCapability cap = new TWCapability(capabilityId))
|
using (TWCapability cap = new TWCapability(capabilityId))
|
||||||
{
|
{
|
||||||
@@ -169,6 +182,8 @@ namespace NTwain
|
|||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
internal static IList<CapabilityId> GetCapabilities(this ITwainOperation session)
|
internal static IList<CapabilityId> GetCapabilities(this ITwainOperation session)
|
||||||
{
|
{
|
||||||
|
if (session == null) { throw new ArgumentNullException("session"); }
|
||||||
|
|
||||||
return session.GetCapabilityValues(CapabilityId.CapSupportedCaps).CastToEnum<CapabilityId>(false);
|
return session.GetCapabilityValues(CapabilityId.CapSupportedCaps).CastToEnum<CapabilityId>(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -226,6 +241,8 @@ namespace NTwain
|
|||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
public static IList<FileFormat> CapGetImageFileFormat(this ITwainOperation session)
|
public static IList<FileFormat> CapGetImageFileFormat(this ITwainOperation session)
|
||||||
{
|
{
|
||||||
|
if (session == null) { throw new ArgumentNullException("session"); }
|
||||||
|
|
||||||
return session.GetCapabilityValues(CapabilityId.ICapImageFileFormat).CastToEnum<FileFormat>(true);
|
return session.GetCapabilityValues(CapabilityId.ICapImageFileFormat).CastToEnum<FileFormat>(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -237,6 +254,8 @@ namespace NTwain
|
|||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
public static ReturnCode CapSetImageFormat(this ITwainOperation session, FileFormat format)
|
public static ReturnCode CapSetImageFormat(this ITwainOperation session, FileFormat format)
|
||||||
{
|
{
|
||||||
|
if (session == null) { throw new ArgumentNullException("session"); }
|
||||||
|
|
||||||
using (TWCapability formatCap = new TWCapability(CapabilityId.ICapImageFileFormat, new TWOneValue { Item = (uint)format, ItemType = ItemType.UInt16 }))
|
using (TWCapability formatCap = new TWCapability(CapabilityId.ICapImageFileFormat, new TWOneValue { Item = (uint)format, ItemType = ItemType.UInt16 }))
|
||||||
{
|
{
|
||||||
return session.DGControl.Capability.Set(formatCap);
|
return session.DGControl.Capability.Set(formatCap);
|
||||||
@@ -255,6 +274,8 @@ namespace NTwain
|
|||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
public static IList<PixelType> CapGetPixelTypes(this ITwainOperation session)
|
public static IList<PixelType> CapGetPixelTypes(this ITwainOperation session)
|
||||||
{
|
{
|
||||||
|
if (session == null) { throw new ArgumentNullException("session"); }
|
||||||
|
|
||||||
return session.GetCapabilityValues(CapabilityId.ICapPixelType).CastToEnum<PixelType>(true);
|
return session.GetCapabilityValues(CapabilityId.ICapPixelType).CastToEnum<PixelType>(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -266,6 +287,8 @@ namespace NTwain
|
|||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
public static ReturnCode CapSetPixelType(this ITwainOperation session, PixelType type)
|
public static ReturnCode CapSetPixelType(this ITwainOperation session, PixelType type)
|
||||||
{
|
{
|
||||||
|
if (session == null) { throw new ArgumentNullException("session"); }
|
||||||
|
|
||||||
var one = new TWOneValue();
|
var one = new TWOneValue();
|
||||||
one.Item = (uint)type;
|
one.Item = (uint)type;
|
||||||
one.ItemType = ItemType.UInt16;
|
one.ItemType = ItemType.UInt16;
|
||||||
@@ -287,6 +310,8 @@ namespace NTwain
|
|||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
public static IList<XferMech> CapGetImageXferMechs(this ITwainOperation session)
|
public static IList<XferMech> CapGetImageXferMechs(this ITwainOperation session)
|
||||||
{
|
{
|
||||||
|
if (session == null) { throw new ArgumentNullException("session"); }
|
||||||
|
|
||||||
return session.GetCapabilityValues(CapabilityId.ICapXferMech).CastToEnum<XferMech>(true);
|
return session.GetCapabilityValues(CapabilityId.ICapXferMech).CastToEnum<XferMech>(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -298,6 +323,8 @@ namespace NTwain
|
|||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
public static IList<XferMech> CapGetAudioXferMechs(this ITwainOperation session)
|
public static IList<XferMech> CapGetAudioXferMechs(this ITwainOperation session)
|
||||||
{
|
{
|
||||||
|
if (session == null) { throw new ArgumentNullException("session"); }
|
||||||
|
|
||||||
return session.GetCapabilityValues(CapabilityId.ACapXferMech).CastToEnum<XferMech>(true);
|
return session.GetCapabilityValues(CapabilityId.ACapXferMech).CastToEnum<XferMech>(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -309,6 +336,8 @@ namespace NTwain
|
|||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
public static ReturnCode CapSetImageXferMech(this ITwainOperation session, XferMech type)
|
public static ReturnCode CapSetImageXferMech(this ITwainOperation session, XferMech type)
|
||||||
{
|
{
|
||||||
|
if (session == null) { throw new ArgumentNullException("session"); }
|
||||||
|
|
||||||
var one = new TWOneValue();
|
var one = new TWOneValue();
|
||||||
one.Item = (uint)type;
|
one.Item = (uint)type;
|
||||||
one.ItemType = ItemType.UInt16;
|
one.ItemType = ItemType.UInt16;
|
||||||
@@ -326,6 +355,8 @@ namespace NTwain
|
|||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
public static ReturnCode CapSetAudioXferMech(this ITwainOperation session, XferMech type)
|
public static ReturnCode CapSetAudioXferMech(this ITwainOperation session, XferMech type)
|
||||||
{
|
{
|
||||||
|
if (session == null) { throw new ArgumentNullException("session"); }
|
||||||
|
|
||||||
var one = new TWOneValue();
|
var one = new TWOneValue();
|
||||||
one.Item = (uint)type;
|
one.Item = (uint)type;
|
||||||
one.ItemType = ItemType.UInt16;
|
one.ItemType = ItemType.UInt16;
|
||||||
@@ -347,6 +378,8 @@ namespace NTwain
|
|||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
public static IList<TWFix32> CapGetDPIs(this ITwainOperation session)
|
public static IList<TWFix32> CapGetDPIs(this ITwainOperation session)
|
||||||
{
|
{
|
||||||
|
if (session == null) { throw new ArgumentNullException("session"); }
|
||||||
|
|
||||||
var list = session.GetCapabilityValues(CapabilityId.ICapXResolution);
|
var list = session.GetCapabilityValues(CapabilityId.ICapXResolution);
|
||||||
return list.Select(o => o.ConvertToFix32()).ToList();
|
return list.Select(o => o.ConvertToFix32()).ToList();
|
||||||
}
|
}
|
||||||
@@ -359,6 +392,8 @@ namespace NTwain
|
|||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
public static ReturnCode CapSetDPI(this ITwainOperation session, TWFix32 dpi)
|
public static ReturnCode CapSetDPI(this ITwainOperation session, TWFix32 dpi)
|
||||||
{
|
{
|
||||||
|
if (session == null) { throw new ArgumentNullException("session"); }
|
||||||
|
|
||||||
return CapSetDPI(session, dpi, dpi);
|
return CapSetDPI(session, dpi, dpi);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -371,6 +406,8 @@ namespace NTwain
|
|||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
public static ReturnCode CapSetDPI(this ITwainOperation session, TWFix32 xDPI, TWFix32 yDPI)
|
public static ReturnCode CapSetDPI(this ITwainOperation session, TWFix32 xDPI, TWFix32 yDPI)
|
||||||
{
|
{
|
||||||
|
if (session == null) { throw new ArgumentNullException("session"); }
|
||||||
|
|
||||||
TWOneValue one = new TWOneValue();
|
TWOneValue one = new TWOneValue();
|
||||||
one.Item = (uint)xDPI;// ((uint)dpi) << 16;
|
one.Item = (uint)xDPI;// ((uint)dpi) << 16;
|
||||||
one.ItemType = ItemType.Fix32;
|
one.ItemType = ItemType.Fix32;
|
||||||
@@ -402,6 +439,8 @@ namespace NTwain
|
|||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
public static IList<SupportedSize> CapGetSupportedSizes(this ITwainOperation session)
|
public static IList<SupportedSize> CapGetSupportedSizes(this ITwainOperation session)
|
||||||
{
|
{
|
||||||
|
if (session == null) { throw new ArgumentNullException("session"); }
|
||||||
|
|
||||||
return session.GetCapabilityValues(CapabilityId.ICapSupportedSizes).CastToEnum<SupportedSize>(true);
|
return session.GetCapabilityValues(CapabilityId.ICapSupportedSizes).CastToEnum<SupportedSize>(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -413,6 +452,8 @@ namespace NTwain
|
|||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
public static ReturnCode CapSetSupportedSize(this ITwainOperation session, SupportedSize size)
|
public static ReturnCode CapSetSupportedSize(this ITwainOperation session, SupportedSize size)
|
||||||
{
|
{
|
||||||
|
if (session == null) { throw new ArgumentNullException("session"); }
|
||||||
|
|
||||||
var one = new TWOneValue();
|
var one = new TWOneValue();
|
||||||
one.Item = (uint)size;
|
one.Item = (uint)size;
|
||||||
one.ItemType = ItemType.UInt16;
|
one.ItemType = ItemType.UInt16;
|
||||||
@@ -436,6 +477,8 @@ namespace NTwain
|
|||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
public static ReturnCode CapSetAutoDeskew(this TwainSession session, bool useIt)
|
public static ReturnCode CapSetAutoDeskew(this TwainSession session, bool useIt)
|
||||||
{
|
{
|
||||||
|
if (session == null) { throw new ArgumentNullException("session"); }
|
||||||
|
|
||||||
var rc = ReturnCode.Failure;
|
var rc = ReturnCode.Failure;
|
||||||
if (session.SupportedCaps.Contains(CapabilityId.ICapAutomaticDeskew))
|
if (session.SupportedCaps.Contains(CapabilityId.ICapAutomaticDeskew))
|
||||||
{
|
{
|
||||||
@@ -476,6 +519,8 @@ namespace NTwain
|
|||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
public static ReturnCode CapSetAutoRotate(this ITwainSession session, bool useIt)
|
public static ReturnCode CapSetAutoRotate(this ITwainSession session, bool useIt)
|
||||||
{
|
{
|
||||||
|
if (session == null) { throw new ArgumentNullException("session"); }
|
||||||
|
|
||||||
var rc = ReturnCode.Failure;
|
var rc = ReturnCode.Failure;
|
||||||
if (session.SupportedCaps.Contains(CapabilityId.ICapAutomaticRotate))
|
if (session.SupportedCaps.Contains(CapabilityId.ICapAutomaticRotate))
|
||||||
{
|
{
|
||||||
@@ -514,6 +559,8 @@ namespace NTwain
|
|||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
public static ReturnCode CapSetBorderDetection(this ITwainSession session, bool useIt)
|
public static ReturnCode CapSetBorderDetection(this ITwainSession session, bool useIt)
|
||||||
{
|
{
|
||||||
|
if (session == null) { throw new ArgumentNullException("session"); }
|
||||||
|
|
||||||
var rc = ReturnCode.Failure;
|
var rc = ReturnCode.Failure;
|
||||||
if (session.SupportedCaps.Contains(CapabilityId.ICapAutomaticBorderDetection))
|
if (session.SupportedCaps.Contains(CapabilityId.ICapAutomaticBorderDetection))
|
||||||
{
|
{
|
||||||
@@ -562,6 +609,8 @@ namespace NTwain
|
|||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
public static ReturnCode CapSetDuplex(this ITwainSession session, bool useIt)
|
public static ReturnCode CapSetDuplex(this ITwainSession session, bool useIt)
|
||||||
{
|
{
|
||||||
|
if (session == null) { throw new ArgumentNullException("session"); }
|
||||||
|
|
||||||
if (session.SourceId.ProtocolMajor >= 2)
|
if (session.SourceId.ProtocolMajor >= 2)
|
||||||
{
|
{
|
||||||
// twain 2 likes to use enum :(
|
// twain 2 likes to use enum :(
|
||||||
@@ -596,6 +645,8 @@ namespace NTwain
|
|||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
public static ReturnCode CapSetFeeder(this ITwainSession session, bool useIt)
|
public static ReturnCode CapSetFeeder(this ITwainSession session, bool useIt)
|
||||||
{
|
{
|
||||||
|
if (session == null) { throw new ArgumentNullException("session"); }
|
||||||
|
|
||||||
var rc = ReturnCode.Failure;
|
var rc = ReturnCode.Failure;
|
||||||
if (session.SupportedCaps.Contains(CapabilityId.CapFeederEnabled))
|
if (session.SupportedCaps.Contains(CapabilityId.CapFeederEnabled))
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -15,6 +15,7 @@ namespace NTwain
|
|||||||
/// Initializes a new instance of the <see cref="TwainStateException"/> class.
|
/// Initializes a new instance of the <see cref="TwainStateException"/> class.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public TwainStateException() { }
|
public TwainStateException() { }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Initializes a new instance of the <see cref="TwainStateException"/> class.
|
/// Initializes a new instance of the <see cref="TwainStateException"/> class.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|||||||
@@ -460,7 +460,7 @@ namespace Tester.WPF
|
|||||||
case CapabilityId.ICapICCProfile:
|
case CapabilityId.ICapICCProfile:
|
||||||
CapDetailList.ItemsSource = _twainVM.GetCapabilityValues(cap).CastToEnum<IccProfile>();
|
CapDetailList.ItemsSource = _twainVM.GetCapabilityValues(cap).CastToEnum<IccProfile>();
|
||||||
break;
|
break;
|
||||||
case CapabilityId.ICapImageDataset:
|
case CapabilityId.ICapImageDataSet:
|
||||||
CapDetailList.ItemsSource = _twainVM.GetCapabilityValues(cap);
|
CapDetailList.ItemsSource = _twainVM.GetCapabilityValues(cap);
|
||||||
break;
|
break;
|
||||||
case CapabilityId.ICapImageFileFormat:
|
case CapabilityId.ICapImageFileFormat:
|
||||||
@@ -481,8 +481,8 @@ namespace Tester.WPF
|
|||||||
case CapabilityId.ICapJpegQuality:
|
case CapabilityId.ICapJpegQuality:
|
||||||
CapDetailList.ItemsSource = _twainVM.GetCapabilityValues(cap).CastToEnum<JpegQuality>();
|
CapDetailList.ItemsSource = _twainVM.GetCapabilityValues(cap).CastToEnum<JpegQuality>();
|
||||||
break;
|
break;
|
||||||
case CapabilityId.ICapJpegSubSampling:
|
case CapabilityId.ICapJpegSubsampling:
|
||||||
CapDetailList.ItemsSource = _twainVM.GetCapabilityValues(cap).CastToEnum<JpegSubSampling>();
|
CapDetailList.ItemsSource = _twainVM.GetCapabilityValues(cap).CastToEnum<JpegSubsampling>();
|
||||||
break;
|
break;
|
||||||
case CapabilityId.ICapLampState:
|
case CapabilityId.ICapLampState:
|
||||||
CapDetailList.ItemsSource = _twainVM.GetCapabilityValues(cap);
|
CapDetailList.ItemsSource = _twainVM.GetCapabilityValues(cap);
|
||||||
|
|||||||
@@ -21,6 +21,14 @@ namespace Tester.WPF
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//public void SupportedOperations
|
||||||
|
//{
|
||||||
|
// get
|
||||||
|
// {
|
||||||
|
|
||||||
|
// }
|
||||||
|
//}
|
||||||
|
|
||||||
public override string ToString()
|
public override string ToString()
|
||||||
{
|
{
|
||||||
return Name;
|
return Name;
|
||||||
|
|||||||
@@ -35,7 +35,7 @@ namespace Tester.WPF
|
|||||||
set
|
set
|
||||||
{
|
{
|
||||||
_image = value;
|
_image = value;
|
||||||
RaisePropertyChanged("Image");
|
OnPropertyChanged("Image");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user