private void InitDeviceTypes() { cmbDeviceTypes.Items.Clear(); List <string> deviceTypes = DeviceN.GetDeviceTypes(); cmbDeviceTypes.DataSource = deviceTypes; }
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); } }