Esempio n. 1
0
        private void InitDeviceTypes()
        {
            cmbDeviceTypes.Items.Clear();
            List <string> deviceTypes = DeviceN.GetDeviceTypes();

            cmbDeviceTypes.DataSource = deviceTypes;
        }
Esempio n. 2
0
        private void ListCamerasByType()
        {
            string        type       = cmbDeviceTypes.SelectedValue?.ToString();
            List <string> cameraList = new List <string>();

            if (type == DeviceType.Basler.ToString())
            {
                _curDeviceType = DeviceType.Basler;
            }
            else if (type == DeviceType.Dahua.ToString())
            {
                _curDeviceType = DeviceType.Dahua;
                cameraList     = DeviceN.GetCameraKeys(DeviceType.Dahua);
            }

            cmbCameraName.Items.Clear();
            foreach (string key in cameraList)
            {
                cmbCameraName.Items.Add(key);
            }
        }