Skip to content

Commit 8a3d201

Browse files
committed
Squashed commit of the following:
commit 7616b9013b43d2cedaf01f2f30a740ad2ec907e8 Author: jonnew <[email protected]> Date: Tue Sep 17 17:11:02 2024 -0400 Add missing Design files - I didn't add these in my last commit commit 760215b Author: jonnew <[email protected]> Date: Tue Sep 17 16:49:30 2024 -0400 Combine all polled Bno055 classes into common type - ConfigurePolledBno055 and PolledBno055Data classes replace headstage specific versions of the same thing. Axis map is defined via a couple properties that are not browsable in editor - Old configuraiton and data operators are marked obsolete
1 parent 5970b1e commit 8a3d201

19 files changed

+306
-521
lines changed

OpenEphys.Onix1.Design/NeuropixelsV1eBno055Dialog.cs

Lines changed: 0 additions & 42 deletions
This file was deleted.

OpenEphys.Onix1.Design/NeuropixelsV1eHeadstageDialog.cs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ namespace OpenEphys.Onix1.Design
77
/// </summary>
88
/// <remarks>
99
/// Within the GUI, there is a tab for both devices encapsulated by a <see cref="ConfigureNeuropixelsV1eHeadstage"/>,
10-
/// specifically a <see cref="ConfigureNeuropixelsV1e"/> and a <see cref="ConfigureNeuropixelsV1eBno055"/>.
10+
/// specifically a <see cref="ConfigureNeuropixelsV1e"/> and a <see cref="ConfigurePolledBno055"/>.
1111
/// </remarks>
1212
public partial class NeuropixelsV1eHeadstageDialog : Form
1313
{
@@ -17,16 +17,16 @@ public partial class NeuropixelsV1eHeadstageDialog : Form
1717
public readonly NeuropixelsV1eDialog DialogNeuropixelsV1e;
1818

1919
/// <summary>
20-
/// Public method that provides access to the <see cref="NeuropixelsV1eBno055Dialog"/>.
20+
/// Public method that provides access to the <see cref="PolledBno055Dialog"/>.
2121
/// </summary>
22-
public readonly NeuropixelsV1eBno055Dialog DialogBno055;
22+
public readonly PolledBno055Dialog DialogBno055;
2323

2424
/// <summary>
2525
/// Initializes a new instance of a <see cref="NeuropixelsV1eHeadstageDialog"/>.
2626
/// </summary>
2727
/// <param name="configureNeuropixelsV1e">Configuration settings for a <see cref="ConfigureNeuropixelsV1e"/>.</param>
28-
/// <param name="configureBno055">Configuration settings for a <see cref="ConfigureNeuropixelsV1eBno055"/>.</param>
29-
public NeuropixelsV1eHeadstageDialog(ConfigureNeuropixelsV1e configureNeuropixelsV1e, ConfigureNeuropixelsV1eBno055 configureBno055)
28+
/// <param name="configureBno055">Configuration settings for a <see cref="ConfigurePolledBno055"/>.</param>
29+
public NeuropixelsV1eHeadstageDialog(ConfigureNeuropixelsV1e configureNeuropixelsV1e, ConfigurePolledBno055 configureBno055)
3030
{
3131
InitializeComponent();
3232

OpenEphys.Onix1.Design/NeuropixelsV2eBno055Dialog.Designer.cs

Lines changed: 0 additions & 39 deletions
This file was deleted.

OpenEphys.Onix1.Design/NeuropixelsV2eBno055Dialog.cs

Lines changed: 0 additions & 42 deletions
This file was deleted.

OpenEphys.Onix1.Design/NeuropixelsV2eBno055Editor.cs

Lines changed: 0 additions & 35 deletions
This file was deleted.

OpenEphys.Onix1.Design/NeuropixelsV2eHeadstageDialog.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,16 +13,16 @@ public partial class NeuropixelsV2eHeadstageDialog : Form
1313
public readonly NeuropixelsV2eDialog DialogNeuropixelsV2e;
1414

1515
/// <summary>
16-
/// A <see cref="NeuropixelsV2eBno055Dialog"/> that configures a <see cref="ConfigureNeuropixelsV2eBno055"/>.
16+
/// A <see cref="PolledBno055Dialog"/> that configures a <see cref="ConfigurePolledBno055"/>.
1717
/// </summary>
18-
public readonly NeuropixelsV2eBno055Dialog DialogBno055;
18+
public readonly PolledBno055Dialog DialogBno055;
1919

2020
/// <summary>
2121
/// Initializes a new instance of a <see cref="NeuropixelsV2eHeadstageDialog"/>.
2222
/// </summary>
2323
/// <param name="configureNeuropixelsV2e">Configuration settings for a <see cref="ConfigureNeuropixelsV2e"/>.</param>
24-
/// <param name="configureBno055">Configuration settings for a <see cref="ConfigureNeuropixelsV2eBno055"/>.</param>
25-
public NeuropixelsV2eHeadstageDialog(IConfigureNeuropixelsV2 configureNeuropixelsV2e, ConfigureNeuropixelsV2eBno055 configureBno055)
24+
/// <param name="configureBno055">Configuration settings for a <see cref="ConfigurePolledBno055"/>.</param>
25+
public NeuropixelsV2eHeadstageDialog(IConfigureNeuropixelsV2 configureNeuropixelsV2e, ConfigurePolledBno055 configureBno055)
2626
{
2727
InitializeComponent();
2828

OpenEphys.Onix1.Design/NeuropixelsV1eBno055Dialog.Designer.cs renamed to OpenEphys.Onix1.Design/PolledBno055Dialog.Designer.cs

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
using System;
2+
3+
namespace OpenEphys.Onix1.Design
4+
{
5+
/// <summary>
6+
/// Partial class to create a GUI for <see cref="ConfigurePolledBno055"/>.
7+
/// </summary>
8+
public partial class PolledBno055Dialog : GenericDeviceDialog
9+
{
10+
/// <summary>
11+
/// Gets or sets the <see cref="ConfigurePolledBno055"/> object attached to
12+
/// the property grid.
13+
/// </summary>
14+
public ConfigurePolledBno055 ConfigureNode
15+
{
16+
get => (ConfigurePolledBno055)propertyGrid.SelectedObject;
17+
set => propertyGrid.SelectedObject = value;
18+
}
19+
20+
/// <summary>
21+
/// Initializes a new <see cref="PolledBno055Dialog"/> instance with the given
22+
/// <see cref="ConfigurePolledBno055"/> object.
23+
/// </summary>
24+
/// <param name="configureNode">A <see cref="ConfigurePolledBno055"/> object that contains configuration settings.</param>
25+
public PolledBno055Dialog(ConfigurePolledBno055 configureNode)
26+
{
27+
InitializeComponent();
28+
Shown += FormShown;
29+
30+
ConfigureNode = new(configureNode);
31+
}
32+
33+
private void FormShown(object sender, EventArgs e)
34+
{
35+
if (!TopLevel)
36+
{
37+
splitContainer1.Panel2Collapsed = true;
38+
splitContainer1.Panel2.Hide();
39+
}
40+
}
41+
}
42+
}

OpenEphys.Onix1.Design/NeuropixelsV1eBno055Editor.cs renamed to OpenEphys.Onix1.Design/PolledBno055Editor.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,16 +5,16 @@
55

66
namespace OpenEphys.Onix1.Design
77
{
8-
internal class NeuropixelsV1eBno055Editor : WorkflowComponentEditor
8+
internal class PolledBno055Editor : WorkflowComponentEditor
99
{
1010
public override bool EditComponent(ITypeDescriptorContext context, object component, IServiceProvider provider, IWin32Window owner)
1111
{
1212
if (provider != null)
1313
{
1414
var editorState = (IWorkflowEditorState)provider.GetService(typeof(IWorkflowEditorState));
15-
if (editorState != null && !editorState.WorkflowRunning && component is ConfigureNeuropixelsV1eBno055 configureBno055)
15+
if (editorState != null && !editorState.WorkflowRunning && component is ConfigurePolledBno055 configureBno055)
1616
{
17-
using var editorDialog = new NeuropixelsV1eBno055Dialog(configureBno055);
17+
using var editorDialog = new PolledBno055Dialog(configureBno055);
1818

1919
if (editorDialog.ShowDialog() == DialogResult.OK)
2020
{

0 commit comments

Comments
 (0)