Beispiel #1
0
        private void cbDevices_SelectedIndexChanged(object sender, EventArgs e)
        {
            groupPicture.Enabled = (cbDevices.SelectedIndex != -1);

            if (groupPicture.Enabled && !DriverInterface.SelectDevice(((DeviceInfo)cbDevices.SelectedItem).Path))
            {
                cbDevices.SelectedIndex = -1;
                MessageBox.Show("Failed to select device!");
                return;
            }
        }
        private void cbDevices_SelectedIndexChanged(object sender, EventArgs e)
        {
            hasDevice = false;

            if (!DriverInterface.SelectDevice(((DeviceInfo)cbDevices.SelectedItem).Path))
            {
                cbDevices.SelectedIndex = -1;
                MessageBox.Show("Failed to select device!");
                return;
            }

            hasDevice = (cbDevices.SelectedIndex > -1);
        }