Skip to content

Commit d4fa769

Browse files
committed
Update GenericDeviceDialog, and address review comments
- GenericDeviceDialog was not updated to use `TableLayoutPanel` and `FlowLayoutPanel`, so the buttons were getting clipped at different scales. This has been corrected - Typos and whitespace fixes
1 parent 8a3d201 commit d4fa769

File tree

7 files changed

+55
-48
lines changed

7 files changed

+55
-48
lines changed

OpenEphys.Onix1.Design/Bno055Dialog.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,8 @@ private void FormShown(object sender, EventArgs e)
3232
{
3333
if (!TopLevel)
3434
{
35-
splitContainer1.Panel2Collapsed = true;
36-
splitContainer1.Panel2.Hide();
35+
tableLayoutPanel1.Controls.Remove(flowLayoutPanel1);
36+
tableLayoutPanel1.RowCount = 1;
3737

3838
MaximumSize = new System.Drawing.Size(0, 0);
3939
}

OpenEphys.Onix1.Design/Bno055Editor.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@ public override bool EditComponent(ITypeDescriptorContext context, object compon
2323
if (editorDialog.ShowDialog() == DialogResult.OK)
2424
{
2525
configureBno055.Enable = editorDialog.ConfigureNode.Enable;
26+
configureBno055.DeviceAddress = editorDialog.ConfigureNode.DeviceAddress;
27+
configureBno055.DeviceName = editorDialog.ConfigureNode.DeviceName;
2628

2729
return true;
2830
}

OpenEphys.Onix1.Design/GenericDeviceDialog.Designer.cs

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

OpenEphys.Onix1.Design/PolledBno055Dialog.cs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,10 @@ private void FormShown(object sender, EventArgs e)
3434
{
3535
if (!TopLevel)
3636
{
37-
splitContainer1.Panel2Collapsed = true;
38-
splitContainer1.Panel2.Hide();
37+
tableLayoutPanel1.Controls.Remove(flowLayoutPanel1);
38+
tableLayoutPanel1.RowCount = 1;
39+
40+
MaximumSize = new System.Drawing.Size(0, 0);
3941
}
4042
}
4143
}

OpenEphys.Onix1.Design/PolledBno055Editor.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@ public override bool EditComponent(ITypeDescriptorContext context, object compon
1919
if (editorDialog.ShowDialog() == DialogResult.OK)
2020
{
2121
configureBno055.Enable = editorDialog.ConfigureNode.Enable;
22+
configureBno055.DeviceAddress = editorDialog.ConfigureNode.DeviceAddress;
23+
configureBno055.DeviceName = editorDialog.ConfigureNode.DeviceName;
2224

2325
return true;
2426
}

OpenEphys.Onix1/ConfigureNeuropixelsV1eHeadstage.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ public ConfigureNeuropixelsV1eHeadstage()
4343
[Category(DevicesCategory)]
4444
[TypeConverter(typeof(SingleDeviceFactoryConverter))]
4545
[Description("Specifies the configuration for the NeuropixelsV1e device.")]
46-
public ConfigureNeuropixelsV1e NeuropixelsV1e { get; set; } = new();
46+
public ConfigureNeuropixelsV1e NeuropixelsV1e { get; set; } = new();
4747

4848
/// <summary>
4949
/// Gets or sets the Bno055 9-axis inertial measurement unit configuration.

OpenEphys.Onix1/ConfigurePolledBno055.cs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ namespace OpenEphys.Onix1
1414
[Description("Configures a PolledBno055 device.")]
1515
public class ConfigurePolledBno055 : SingleDeviceFactory
1616
{
17-
1817
/// <summary>
1918
/// Initializes a new instance of the <see cref="ConfigurePolledBno055"/> class.
2019
/// </summary>
@@ -140,7 +139,7 @@ public PolledBno055DeviceInfo(ContextTask context, Type deviceType, uint deviceA
140139
/// </summary>
141140
/// <remarks>
142141
/// The axis of the device can be reconfigured to the new reference axis to account for
143-
/// differences it its mounting position. The following values can be applied to the Bno055's
142+
/// differences in its mounting position. The following values can be applied to the Bno055's
144143
/// AXIS_MAP_CONFIG register at address 0x41.
145144
/// </remarks>
146145
public enum Bno055AxisMap : uint
@@ -176,7 +175,7 @@ public enum Bno055AxisMap : uint
176175
/// </summary>
177176
/// <remarks>
178177
/// The axis of the device can be reconfigured to the new reference axis to account for
179-
/// differences it its mounting position. The following values can be applied to the Bno055's
178+
/// differences in its mounting position. The following values can be applied to the Bno055's
180179
/// AXIS_MAP_SIGN register at address 0x42.
181180
/// </remarks>
182181
[Flags]

0 commit comments

Comments
 (0)