Example #1
0
 void UpdateProviders(LuiOptionsListDialog <IGpibProvider, GpibProviderParameters> GpibOptionsList)
 {
     GpibProvider.Control.Items.Clear();
     foreach (var item in GpibOptionsList.TransientItems)
     {
         GpibProvider.Control.Items.Add(item);
     }
 }
Example #2
0
 public DG535ConfigPanel(LuiOptionsListDialog <IGpibProvider, GpibProviderParameters> GpibOptionsList)
     : this()
 {
     GpibProvider = new LabeledControl <ComboBox>(new ComboBox(), "GPIB Provider:");
     GpibProvider.Control.DisplayMember         = "Name";
     GpibProvider.Control.DropDownStyle         = ComboBoxStyle.DropDownList;
     GpibOptionsList.OptionsChanged            += (s, e) => UpdateProviders(GpibOptionsList);
     GpibOptionsList.ConfigMatched             += (s, e) => UpdateProviders(GpibOptionsList);
     GpibProvider.Control.SelectedIndexChanged += OnOptionsChanged;
     Controls.Add(GpibProvider);
 }