All products / Saraff.Twain.DS / Contents
OnXferReady
Invoked to indicate that the Source has data that is ready to be transferred.
Syntax
protected virtual void OnXferReady()
Remarks
The base implementation initializes XferEnvironment.PendingXfers from ICAP_XFERCOUNT and notifies the application with MSG_XFERREADY.
- If
ICAP_XFERCOUNTis-1,XferEnvironment.PendingXfersIndeterminateis set totrueandDAT_PENDINGXFERSreports0xFFFF; the Source stays in State 6 untilEndOfXfers()is called. - Otherwise
PendingXfersis set to the configured count.
If you override OnXferReady, call base.OnXferReady() so that the pending count and the MSG_XFERREADY notification are handled by the framework.
Examples
this._acquireForm.AcquireRequred+=(sender,e) => {
this[TwCap.XResolution].Value=e.Args.Resolution;
this[TwCap.YResolution].Value=e.Args.Resolution;
this[TwCap.IPixelType].Value=e.Args.PixelType;
this[TwCap.FeederEnabled].Value=e.Args.FeederEnable;
this[(TwCap)0x8001].Value=(short)e.Args.XferCount;
this[TwCap.BitDepth].Value=(ushort)e.Args.BitDepth;
this.OnXferReady();
};