Exemple #1
0
        private void Cbb_ScanDeviceLists_SelectedIndexChanged(object sender, EventArgs e)
        {
            ComboBox cbb = sender as ComboBox;

            SetDefaultUI();
            if (cbb.SelectedItem != null)
            {
                Dictionary <string, string> properties = WIAScannerControl.GetDevicesProperty(cbb.SelectedItem.ToString().Trim());
                if (properties != null)
                {
                    foreach (KeyValuePair <string, string> p in properties)
                    {
                        lst_ScanProperties.Items.Add($"{p.Key}: {p.Value}");
                    }
                }
            }
        }
Exemple #2
0
        private void ScanDeviceSelectDialog_Load(object sender, EventArgs e)
        {
            List <string> devices = WIAScannerControl.GetDevices();

            cbb_ScanDeviceLists.UpdateUI(devices, devices.Count > 0 ? devices[0] : null);
        }