using NTwain.Data; using System; namespace NTwain { /// /// Contains event data when a data transfer is ready to be processed. /// public class TransferReadyEventArgs : EventArgs { /// /// Initializes a new instance of the class. /// /// The pending count. /// if set to true [end of job]. /// The image information. /// The audio information. public TransferReadyEventArgs(int pendingCount, bool endOfJob, TWImageInfo imageInfo, TWAudioInfo audioInfo) { PendingTransferCount = pendingCount; EndOfJob = endOfJob; PendingImageInfo = imageInfo; AudioInfo = audioInfo; } /// /// Gets or sets a value indicating whether the current transfer should be canceled /// and continue next transfer if there are more data. /// /// true to cancel current transfer; otherwise, false. public bool CancelCurrent { get; set; } /// /// Gets or sets a value indicating whether all transfers should be canceled. /// /// true to cancel all transfers; otherwise, false. public bool CancelAll { get; set; } /// /// Gets a value indicating whether current transfer signifies an end of job in TWAIN world. /// /// true if transfer is end of job; otherwise, false. public bool EndOfJob { get; private set; } /// /// Gets the known pending transfer count. This may not be appilicable /// for certain scanning modes. /// /// The pending count. public int PendingTransferCount { get; private set; } /// /// Gets the tentative image information for the current transfer if applicable. /// This may differ from the final image depending on the transfer mode used (mostly when doing mem xfer). /// /// /// The image info. /// public TWImageInfo PendingImageInfo { get; private set; } /// /// Gets the audio information for the current transfer if applicable. /// /// /// The audio information. /// public TWAudioInfo AudioInfo { get; private set; } } }