Skip to content

Commit f9d2777

Browse files
committed
Add PropertyGrid to NeuropixelsV1 dialogs
1 parent bfa7251 commit f9d2777

File tree

3 files changed

+162
-66
lines changed

3 files changed

+162
-66
lines changed

OpenEphys.Onix1.Design/NeuropixelsV1Dialog.cs

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,11 @@ public partial class NeuropixelsV1Dialog : Form
1414
/// Public <see cref="IConfigureNeuropixelsV1"/> interface that is manipulated by
1515
/// <see cref="NeuropixelsV1Dialog"/>.
1616
/// </summary>
17-
[Obsolete]
18-
public IConfigureNeuropixelsV1 ConfigureNode { get; set; }
17+
public IConfigureNeuropixelsV1 ConfigureNode
18+
{
19+
get => (IConfigureNeuropixelsV1)ProbeConfigurationDialog.propertyGrid.SelectedObject;
20+
set => ProbeConfigurationDialog.propertyGrid.SelectedObject = value;
21+
}
1922

2023
/// <summary>
2124
/// Initializes a new instance of <see cref="NeuropixelsV1Dialog"/>.
@@ -26,10 +29,8 @@ public NeuropixelsV1Dialog(IConfigureNeuropixelsV1 configureNode)
2629
InitializeComponent();
2730
Shown += FormShown;
2831

29-
ProbeConfigurationDialog = new(configureNode.ProbeConfiguration);
30-
ProbeConfigurationDialog
31-
.SetChildFormProperties(this)
32-
.AddDialogToPanel(panelProbe);
32+
ProbeConfigurationDialog = new(configureNode);
33+
ProbeConfigurationDialog.SetChildFormProperties(this).AddDialogToPanel(panelProbe);
3334

3435
this.AddMenuItemsFromDialogToFileOption(ProbeConfigurationDialog);
3536
}

0 commit comments

Comments
 (0)