Skip to content

Commit 7eae139

Browse files
committed
Refactor Rhs2116 design files
- Utilize the main library classes directly instead of passing individual properties to the design library
1 parent faf6ea1 commit 7eae139

File tree

6 files changed

+124
-113
lines changed

6 files changed

+124
-113
lines changed

OpenEphys.Onix1.Design/HeadstageRhs2116Dialog.Designer.cs

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

OpenEphys.Onix1.Design/HeadstageRhs2116Dialog.cs

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -15,22 +15,16 @@ public partial class HeadstageRhs2116Dialog : Form
1515
internal readonly Rhs2116StimulusSequenceDialog StimulusSequenceDialog;
1616
internal readonly GenericDeviceDialog Rhs2116Dialog;
1717

18-
internal Rhs2116ProbeGroup ProbeGroup;
19-
2018
/// <summary>
2119
/// Initializes a new instance of a <see cref="HeadstageRhs2116Dialog"/>.
2220
/// </summary>
23-
/// <param name="probeGroup">Current channel configuration settings for a <see cref="Rhs2116ProbeGroup"/>.</param>
24-
/// <param name="sequence">Current stimulus sequence for a <see cref="Rhs2116StimulusSequencePair"/>.</param>
21+
/// <param name="rhs2116Trigger">Current configuration settings for <see cref="ConfigureRhs2116Trigger"/>.</param>
2522
/// <param name="rhs2116">Current configuration settings for a single <see cref="ConfigureRhs2116"/>.</param>
26-
public HeadstageRhs2116Dialog(Rhs2116ProbeGroup probeGroup, Rhs2116StimulusSequencePair sequence,
27-
ConfigureRhs2116Pair rhs2116)
23+
public HeadstageRhs2116Dialog(ConfigureRhs2116Trigger rhs2116Trigger, ConfigureRhs2116Pair rhs2116)
2824
{
2925
InitializeComponent();
3026

31-
ProbeGroup = new Rhs2116ProbeGroup(probeGroup);
32-
33-
StimulusSequenceDialog = new Rhs2116StimulusSequenceDialog(sequence, ProbeGroup);
27+
StimulusSequenceDialog = new Rhs2116StimulusSequenceDialog(rhs2116Trigger);
3428

3529
StimulusSequenceDialog.SetChildFormProperties(this).AddDialogToTab(tabPageStimulusSequence);
3630
this.AddMenuItemsFromDialogToFileOption(StimulusSequenceDialog);

OpenEphys.Onix1.Design/HeadstageRhs2116Editor.cs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,11 @@ public override bool EditComponent(ITypeDescriptorContext context, object compon
1818
var editorState = (IWorkflowEditorState)provider.GetService(typeof(IWorkflowEditorState));
1919
if (editorState != null && !editorState.WorkflowRunning && component is ConfigureHeadstageRhs2116 configureNode)
2020
{
21-
using var editorDialog = new HeadstageRhs2116Dialog(configureNode.StimulusTrigger.ProbeGroup,
22-
configureNode.StimulusTrigger.StimulusSequence, configureNode.Rhs2116Pair);
21+
using var editorDialog = new HeadstageRhs2116Dialog(configureNode.StimulusTrigger, configureNode.Rhs2116Pair);
2322

2423
if (editorDialog.ShowDialog() == DialogResult.OK)
2524
{
26-
configureNode.StimulusTrigger.StimulusSequence = editorDialog.StimulusSequenceDialog.Sequence;
27-
configureNode.StimulusTrigger.ProbeGroup = (Rhs2116ProbeGroup)editorDialog.StimulusSequenceDialog.ChannelDialog.ProbeGroup;
25+
configureNode.StimulusTrigger = editorDialog.StimulusSequenceDialog.Trigger;
2826
DesignHelper.CopyProperties((ConfigureRhs2116Pair)editorDialog.Rhs2116Dialog.Device, configureNode.Rhs2116Pair, DesignHelper.PropertiesToIgnore);
2927

3028
return true;

0 commit comments

Comments
 (0)