Skip to content

Commit

Permalink
Squashed commit of the following:
Browse files Browse the repository at this point in the history
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
  • Loading branch information
jonnew committed Sep 17, 2024
1 parent 5970b1e commit 8a3d201
Show file tree
Hide file tree
Showing 19 changed files with 306 additions and 521 deletions.
42 changes: 0 additions & 42 deletions OpenEphys.Onix1.Design/NeuropixelsV1eBno055Dialog.cs

This file was deleted.

10 changes: 5 additions & 5 deletions OpenEphys.Onix1.Design/NeuropixelsV1eHeadstageDialog.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ namespace OpenEphys.Onix1.Design
/// </summary>
/// <remarks>
/// Within the GUI, there is a tab for both devices encapsulated by a <see cref="ConfigureNeuropixelsV1eHeadstage"/>,
/// specifically a <see cref="ConfigureNeuropixelsV1e"/> and a <see cref="ConfigureNeuropixelsV1eBno055"/>.
/// specifically a <see cref="ConfigureNeuropixelsV1e"/> and a <see cref="ConfigurePolledBno055"/>.
/// </remarks>
public partial class NeuropixelsV1eHeadstageDialog : Form
{
Expand All @@ -17,16 +17,16 @@ public partial class NeuropixelsV1eHeadstageDialog : Form
public readonly NeuropixelsV1eDialog DialogNeuropixelsV1e;

/// <summary>
/// Public method that provides access to the <see cref="NeuropixelsV1eBno055Dialog"/>.
/// Public method that provides access to the <see cref="PolledBno055Dialog"/>.
/// </summary>
public readonly NeuropixelsV1eBno055Dialog DialogBno055;
public readonly PolledBno055Dialog DialogBno055;

/// <summary>
/// Initializes a new instance of a <see cref="NeuropixelsV1eHeadstageDialog"/>.
/// </summary>
/// <param name="configureNeuropixelsV1e">Configuration settings for a <see cref="ConfigureNeuropixelsV1e"/>.</param>
/// <param name="configureBno055">Configuration settings for a <see cref="ConfigureNeuropixelsV1eBno055"/>.</param>
public NeuropixelsV1eHeadstageDialog(ConfigureNeuropixelsV1e configureNeuropixelsV1e, ConfigureNeuropixelsV1eBno055 configureBno055)
/// <param name="configureBno055">Configuration settings for a <see cref="ConfigurePolledBno055"/>.</param>
public NeuropixelsV1eHeadstageDialog(ConfigureNeuropixelsV1e configureNeuropixelsV1e, ConfigurePolledBno055 configureBno055)
{
InitializeComponent();

Expand Down
39 changes: 0 additions & 39 deletions OpenEphys.Onix1.Design/NeuropixelsV2eBno055Dialog.Designer.cs

This file was deleted.

42 changes: 0 additions & 42 deletions OpenEphys.Onix1.Design/NeuropixelsV2eBno055Dialog.cs

This file was deleted.

35 changes: 0 additions & 35 deletions OpenEphys.Onix1.Design/NeuropixelsV2eBno055Editor.cs

This file was deleted.

8 changes: 4 additions & 4 deletions OpenEphys.Onix1.Design/NeuropixelsV2eHeadstageDialog.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,16 @@ public partial class NeuropixelsV2eHeadstageDialog : Form
public readonly NeuropixelsV2eDialog DialogNeuropixelsV2e;

/// <summary>
/// A <see cref="NeuropixelsV2eBno055Dialog"/> that configures a <see cref="ConfigureNeuropixelsV2eBno055"/>.
/// A <see cref="PolledBno055Dialog"/> that configures a <see cref="ConfigurePolledBno055"/>.
/// </summary>
public readonly NeuropixelsV2eBno055Dialog DialogBno055;
public readonly PolledBno055Dialog DialogBno055;

/// <summary>
/// Initializes a new instance of a <see cref="NeuropixelsV2eHeadstageDialog"/>.
/// </summary>
/// <param name="configureNeuropixelsV2e">Configuration settings for a <see cref="ConfigureNeuropixelsV2e"/>.</param>
/// <param name="configureBno055">Configuration settings for a <see cref="ConfigureNeuropixelsV2eBno055"/>.</param>
public NeuropixelsV2eHeadstageDialog(IConfigureNeuropixelsV2 configureNeuropixelsV2e, ConfigureNeuropixelsV2eBno055 configureBno055)
/// <param name="configureBno055">Configuration settings for a <see cref="ConfigurePolledBno055"/>.</param>
public NeuropixelsV2eHeadstageDialog(IConfigureNeuropixelsV2 configureNeuropixelsV2e, ConfigurePolledBno055 configureBno055)
{
InitializeComponent();

Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

42 changes: 42 additions & 0 deletions OpenEphys.Onix1.Design/PolledBno055Dialog.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
using System;

namespace OpenEphys.Onix1.Design
{
/// <summary>
/// Partial class to create a GUI for <see cref="ConfigurePolledBno055"/>.
/// </summary>
public partial class PolledBno055Dialog : GenericDeviceDialog
{
/// <summary>
/// Gets or sets the <see cref="ConfigurePolledBno055"/> object attached to
/// the property grid.
/// </summary>
public ConfigurePolledBno055 ConfigureNode
{
get => (ConfigurePolledBno055)propertyGrid.SelectedObject;
set => propertyGrid.SelectedObject = value;
}

/// <summary>
/// Initializes a new <see cref="PolledBno055Dialog"/> instance with the given
/// <see cref="ConfigurePolledBno055"/> object.
/// </summary>
/// <param name="configureNode">A <see cref="ConfigurePolledBno055"/> object that contains configuration settings.</param>
public PolledBno055Dialog(ConfigurePolledBno055 configureNode)
{
InitializeComponent();
Shown += FormShown;

ConfigureNode = new(configureNode);
}

private void FormShown(object sender, EventArgs e)
{
if (!TopLevel)
{
splitContainer1.Panel2Collapsed = true;
splitContainer1.Panel2.Hide();
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,16 @@

namespace OpenEphys.Onix1.Design
{
internal class NeuropixelsV1eBno055Editor : WorkflowComponentEditor
internal class PolledBno055Editor : WorkflowComponentEditor
{
public override bool EditComponent(ITypeDescriptorContext context, object component, IServiceProvider provider, IWin32Window owner)
{
if (provider != null)
{
var editorState = (IWorkflowEditorState)provider.GetService(typeof(IWorkflowEditorState));
if (editorState != null && !editorState.WorkflowRunning && component is ConfigureNeuropixelsV1eBno055 configureBno055)
if (editorState != null && !editorState.WorkflowRunning && component is ConfigurePolledBno055 configureBno055)
{
using var editorDialog = new NeuropixelsV1eBno055Dialog(configureBno055);
using var editorDialog = new PolledBno055Dialog(configureBno055);

if (editorDialog.ShowDialog() == DialogResult.OK)
{
Expand Down
Loading

0 comments on commit 8a3d201

Please sign in to comment.