private void DeviceConfigure(object sender, EventArgs e) { DeviceConfigure dlg = new DeviceConfigure(); dlg.deviceConfigParms = deviceConfigParms; dlg.AttachedDevices = FootPedalMonitor.ListDevices(); var rc = dlg.ShowDialog(); if (rc == DialogResult.OK) { // TODO: Save the configuration } }
public static IDiscoveryDocumentBuilder <TEntity> ConfigureDevice <TEntity>(this IDiscoveryDocumentBuilder <TEntity> builder, DeviceConfigure configure) where TEntity : IHassDiscoveryDocument { configure(builder.Discovery.Device); return(builder); }