Download ScannerTest.zip, last updated 06/11/2020 (1.38 MB)

Download
  • md5: e7275805cdf93e2f8240e6e0ee5ca17a
  • sha1: 2153ecf3bd4cd364692127f90c2be83d7b7fe25d
  • sha256: c8ce412bbf8f88594e975d27e25bb0b767e6a1c4bcb9471a4eb749a3a9ed556e
using WIA;

// An introduction to using Windows Image Acquisition (WIA) via C#
// https://www.cyotek.com/blog/an-introduction-to-using-windows-image-acquisition-wia-via-csharp

// Copyright © 2019-2020 Cyotek Ltd. All Rights Reserved.

// This work is licensed under the MIT License.
// See LICENSE.TXT for the full text

// Found this example useful?
// https://www.paypal.me/cyotek

namespace Cyotek.Demo.ScannerTest
{
  internal sealed class DeviceListBoxItem
  {
    #region Private Fields

    private string _deviceId;

    private string _name;

    #endregion Private Fields

    #region Public Constructors

    public DeviceListBoxItem(IDeviceInfo device)
    {
      _deviceId = device.DeviceID;
      _name = (string)device.Properties["Name"].get_Value();
    }

    #endregion Public Constructors

    #region Public Properties

    public string DeviceId
    {
      get { return _deviceId; }
      set { _deviceId = value; }
    }

    public string Name
    {
      get { return _name; }
      set { _name = value; }
    }

    #endregion Public Properties

    #region Public Methods

    public override string ToString()
    {
      return _name;
    }

    #endregion Public Methods
  }
}

Donate

Donate