Search code examples
c#selectdevicetwain

C# - What is the Select Source dialog as it applies to the GetDevice method?


I am trying to use a method that is described like this:

public Device GetDevice(string productName)

The productName is the name of the device as it appears in the Select Source dialog.

What is the Select Source dialog that's being referred to?


Solution

  • As this link mentions (look for the "Showing the “Select Source” dialog" heading), this is a dialog that allows users to select an ISIS device. It's part of the DotImage framework, called with ShowSelectSource and is used like this:

    IsisDevice dev = null;
    if (this.acquisition.ShowSelectSource(this)) dev = this.acquisition.Devices.Default;
    

    I would guess that this works similarly to a FolderBrowserDialog. The user selects the device of his choosing and you can then use his selection to retrieve the Device itself with GetDevice.