Пример #1
0
 private void CheckConnectedScanners()
 {
     scanners = _manager.GetDevices();
     scannersCombo.ItemsSource = scanners;
     if (scanners.Count > 0)
     {
         scannersCombo.SelectedIndex = 0;
         Panel1.IsEnabled            = true;
     }
     else
     {
         Panel1.IsEnabled = false;
     }
 }
Пример #2
0
        public void WiaDeviceTest()
        {
            using var manager = new WiaManager();
            var devicesInfo = manager.GetDevices();

            Assert.IsTrue(devicesInfo.Count > 0);
            foreach (var deviceInfo in devicesInfo)
            {
                var device   = deviceInfo.Connect();
                var commands = device.Commands;
                Assert.IsTrue(commands.Count > 0);

                // Scan
                // TODO: Make this more intuitive... var imageFile = device.Items[0].Transfer();
            }
        }