private void loadWIA() { currentDeviceID = ScanSettings.DeviceID; CWIAAPI api; try { api = new CWIAAPI(ScanSettings.DeviceID); } catch (Exceptions.EScannerNotFound) { MessageBox.Show("Device not found.", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); ScanSettings.DeviceID = ""; currentDeviceID = ""; txtDevice.Text = ""; return; } txtDevice.Text = api.DeviceName; }
private void chooseWIA() { string devID; try { devID = CWIAAPI.SelectDeviceUI(); } catch (Exceptions.ENoScannerFound) { MessageBox.Show("No device found.", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); return; } CWIAAPI api = new CWIAAPI(devID); txtDevice.Text = api.DeviceName; currentDeviceID = devID; }