Class TwainScanHandler
Main class for handling a Scan process. This class control a Scan process and provides a smooth communication between a Scan-controller and a Scan viewer.
Inheritance
System.Object
TwainScanHandler
Inherited Members
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace: Simplic.Twain
Assembly: Simplic.Twain.dll
Syntax
public class TwainScanHandler
Constructors
| Improve this Doc View SourceTwainScanHandler(ITwainScanController, ITwainDocumentViewer, IntPtr)
Create new handler to provide communication between Scaner, controller and viewer
Declaration
public TwainScanHandler(ITwainScanController twainController, ITwainDocumentViewer twainViewer, IntPtr handle)
Parameters
Type | Name | Description |
---|---|---|
ITwainScanController | twainController | |
ITwainDocumentViewer | twainViewer | |
System.IntPtr | handle | Handle for working with UI |
Properties
| Improve this Doc View SourceMultipageTiff
Get or set start multipage tiff or scanned document
Declaration
public byte[] MultipageTiff { get; set; }
Property Value
Type | Description |
---|---|
System.Byte[] |
PageCount
Get the amount of scanned pages
Declaration
public int PageCount { get; set; }
Property Value
Type | Description |
---|---|
System.Int32 |
Methods
| Improve this Doc View SourceAddTiffPage(Byte[])
Add a page to the scanned tif
Declaration
public void AddTiffPage(byte[] data)
Parameters
Type | Name | Description |
---|---|---|
System.Byte[] | data | Tiff as byte-array |
Dispose()
Dispose the current scan process
Declaration
public void Dispose()
RefreshViewer(ImageChangeTypes)
Refresh the viewer content and reload scanned tiff
Declaration
public void RefreshViewer(ImageChangeTypes changeType)
Parameters
Type | Name | Description |
---|---|---|
ImageChangeTypes | changeType |
Reset()
Resets the handler
Declaration
public void Reset()
Events
| Improve this Doc View SourceCompleted
Scan completed event-handler
Declaration
public event CompletedEventHandler Completed
Event Type
Type | Description |
---|---|
CompletedEventHandler |
OnPageScanned
Will be executed if a page was scanned
Declaration
public event TwainScanHandler.OnPageScannedEventHandler OnPageScanned
Event Type
Type | Description |
---|---|
TwainScanHandler.OnPageScannedEventHandler |
OnPageScanning
Declaration
public event TwainScanHandler.OnPageScanningEventHandler OnPageScanning
Event Type
Type | Description |
---|---|
TwainScanHandler.OnPageScanningEventHandler |