public TwainDotNetSource(int i, string sourceName, TwainDotNet.Twain twain, WindowsMessageLoopThread windowsMessageLoop)
		{
			Name = sourceName;
			Index = i;
			_windowsMessageLoop = windowsMessageLoop;
			_scanCompleteEvent = new ManualResetEvent(false);
			_twain = twain;
			_log = LogManager.GetLogger(typeof (TwainDotNetSource));

			_log.Debug(string.Format("Created TWAIN name={0}, index={1}", sourceName, i));
		}
Exemple #2
0
 private void SetScannerPageSize(TwainDotNet.TwainNative.PageType size)
 {
     Settings.Default.ScannerPageSize = size;
     this.ScannerPageSizeNoneButton.IsChecked = (size == TwainDotNet.TwainNative.PageType.None);
     this.ScannerPageSizeA4Button.IsChecked = (size == TwainDotNet.TwainNative.PageType.A4);
     this.ScannerPageSizeA5Button.IsChecked = (size == TwainDotNet.TwainNative.PageType.A5);
     TwainSettings.Area = null;
     TwainSettings.Page.Size = size;
 }
Exemple #3
0
 private void SetScannerPageOrientation(TwainDotNet.TwainNative.Orientation orientation)
 {
     Settings.Default.ScannerPageOrientation = orientation;
     this.ScannerPageOrientationPortraitButton.IsChecked = (orientation == TwainDotNet.TwainNative.Orientation.Portrait);
     this.ScannerPageOrientationLandscapeButton.IsChecked = (orientation == TwainDotNet.TwainNative.Orientation.Landscape);
     TwainSettings.Page.Orientation = orientation;
 }