-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #315 from open-ephys/issue-100-2
Functional onix-headstage-neuropix1 support
- Loading branch information
Showing
48 changed files
with
6,053 additions
and
659 deletions.
There are no files selected for viewing
2 changes: 1 addition & 1 deletion
2
...V1eChannelConfigurationDialog.Designer.cs → ...sV1ChannelConfigurationDialog.Designer.cs
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,78 @@ | ||
using System; | ||
using System.Windows.Forms; | ||
|
||
namespace OpenEphys.Onix1.Design | ||
{ | ||
/// <summary> | ||
/// Partial class to create a GUI for <see cref="ConfigureNeuropixelsV1e"/>. | ||
/// </summary> | ||
public partial class NeuropixelsV1Dialog : Form | ||
{ | ||
readonly NeuropixelsV1ProbeConfigurationDialog ProbeConfigurationDialog; | ||
|
||
/// <summary> | ||
/// Public <see cref="IConfigureNeuropixelsV1"/> interface that is manipulated by | ||
/// <see cref="NeuropixelsV1Dialog"/>. | ||
/// </summary> | ||
public IConfigureNeuropixelsV1 ConfigureNode { get; set; } | ||
|
||
/// <summary> | ||
/// Initializes a new instance of <see cref="NeuropixelsV1Dialog"/>. | ||
/// </summary> | ||
/// <param name="configureNode">A <see cref="ConfigureNeuropixelsV1e"/> object holding the current configuration settings.</param> | ||
public NeuropixelsV1Dialog(IConfigureNeuropixelsV1 configureNode) | ||
{ | ||
InitializeComponent(); | ||
Shown += FormShown; | ||
|
||
if (configureNode is ConfigureNeuropixelsV1e configureV1e) | ||
{ | ||
ConfigureNode = new ConfigureNeuropixelsV1e(configureV1e); | ||
} | ||
else if (configureNode is ConfigureNeuropixelsV1f configureV1f) | ||
{ | ||
ConfigureNode = new ConfigureNeuropixelsV1f(configureV1f); | ||
} | ||
|
||
ProbeConfigurationDialog = new(ConfigureNode.ProbeConfiguration, ConfigureNode.AdcCalibrationFile, ConfigureNode.GainCalibrationFile) | ||
{ | ||
TopLevel = false, | ||
FormBorderStyle = FormBorderStyle.None, | ||
Dock = DockStyle.Fill, | ||
Parent = this | ||
}; | ||
|
||
panelProbe.Controls.Add(ProbeConfigurationDialog); | ||
|
||
this.AddMenuItemsFromDialogToFileOption(ProbeConfigurationDialog); | ||
} | ||
|
||
private void FormShown(object sender, EventArgs e) | ||
{ | ||
if (!TopLevel) | ||
{ | ||
tableLayoutPanel1.Controls.Remove(flowLayoutPanel1); | ||
tableLayoutPanel1.RowCount = 1; | ||
|
||
menuStrip.Visible = false; | ||
} | ||
|
||
ProbeConfigurationDialog.Show(); | ||
} | ||
|
||
internal void Okay_Click(object sender, EventArgs e) | ||
{ | ||
SaveVariables(); | ||
|
||
DialogResult = DialogResult.OK; | ||
} | ||
|
||
internal void SaveVariables() | ||
{ | ||
ConfigureNode.ProbeConfiguration = ProbeConfigurationDialog.ProbeConfiguration; | ||
|
||
ConfigureNode.GainCalibrationFile = ProbeConfigurationDialog.textBoxGainCalibrationFile.Text; | ||
ConfigureNode.AdcCalibrationFile = ProbeConfigurationDialog.textBoxAdcCalibrationFile.Text; | ||
} | ||
} | ||
} |
Oops, something went wrong.