public override object EditValue(ITypeDescriptorContext context, System.IServiceProvider provider, object value)
{
if (context != null && context.Instance != null && provider != null)
{
edSvc = (IWindowsFormsEditorService)provider.GetService(typeof(IWindowsFormsEditorService));
if (edSvc != null)
{
string currentTunerDevice = (string)value; // context.Instance;
System.Windows.Forms.ListBox vListBox = new ListBox();
vListBox.BorderStyle = BorderStyle.None;
vListBox.Click += new EventHandler(List_Click);
vListBox.Items.Add("");
// Enumerate BDA Source filters category and found one that can connect to the network provider
DsDevice[] capDevices = DsDevice.GetDevicesOfCat(FilterCategory.BDAReceiverComponentsCategory);
foreach (DirectShowLib.DsDevice d in capDevices)
if (d.Name != null)
vListBox.Items.Add(d.Name);
vListBox.SelectedItem = currentTunerDevice;
edSvc.DropDownControl(vListBox);
return vListBox.SelectedItem;
}
}
return null;
}