Skip to content

Commit

Permalink
Add icons to NPX 2.0 dialog status strip
Browse files Browse the repository at this point in the history
- This is to match the look and feel of the 1.0 dialog status strip
  • Loading branch information
bparks13 committed Oct 11, 2024
1 parent 67e8857 commit 48f3c28
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 21 deletions.

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

12 changes: 11 additions & 1 deletion OpenEphys.Onix1.Design/NeuropixelsV2eProbeConfigurationDialog.cs
Original file line number Diff line number Diff line change
Expand Up @@ -514,6 +514,9 @@ private void FileTextChanged(object sender, EventArgs e)

private void CheckStatus()
{
const string NoFileSelected = "No file selected.";
const string InvalidFile = "Invalid file.";

NeuropixelsV2GainCorrection? gainCorrection;

try
Expand All @@ -539,7 +542,14 @@ private void CheckStatus()

toolStripGainCalSN.Text = gainCorrection.HasValue
? gainCorrection.Value.SerialNumber.ToString()
: string.IsNullOrEmpty(textBoxProbeCalibrationFile.Text) ? "No file found." : "Invalid file.";
: string.IsNullOrEmpty(textBoxProbeCalibrationFile.Text) ? NoFileSelected : InvalidFile;

if (toolStripGainCalSN.Text == NoFileSelected)
toolStripLabelGainCalibrationSN.Image = Properties.Resources.StatusWarningImage;
else if (toolStripGainCalSN.Text == InvalidFile)
toolStripLabelGainCalibrationSN.Image = Properties.Resources.StatusCriticalImage;
else
toolStripLabelGainCalibrationSN.Image = Properties.Resources.StatusReadyImage;
}

internal void ChooseCalibrationFile_Click(object sender, EventArgs e)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -135,9 +135,6 @@
<metadata name="label1.GenerateMember" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>False</value>
</metadata>
<metadata name="toolStripLabelGainCalibrationSN.GenerateMember" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>False</value>
</metadata>
<metadata name="menuStrip.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
</metadata>
Expand Down

0 comments on commit 48f3c28

Please sign in to comment.