Strong validate firmware version (to ensure that it is correct)

This commit is contained in:
Kamil Trzciński 2022-11-12 14:25:57 +01:00
parent 52d68d4b7f
commit a5fc409bfc
4 changed files with 115 additions and 30 deletions

View file

@ -25,6 +25,19 @@ namespace FanControl
Text += " v" + Application.ProductVersion.ToString();
notifyIcon.Text = Text;
if (!Vlv0100.IsSupported())
{
String message = "";
message += "Current device is not supported.\n";
message += "FirmwareVersion: " + Vlv0100.GetFirmwareVersion().ToString("X") + "\n";
message += "BoardID: " + Vlv0100.GetBoardID().ToString("X") + "\n";
message += "PDCS: " + Vlv0100.GetPDCS().ToString("X") + "\n";
MessageBox.Show(message, Text, MessageBoxButtons.OK, MessageBoxIcon.Error);
Application.Exit();
return;
}
toolStripMenuItemStartupOnBoot.Visible = startupManager.IsAvailable;
toolStripMenuItemStartupOnBoot.Checked = startupManager.Startup;
@ -80,6 +93,7 @@ namespace FanControl
{
WindowState = FormWindowState.Normal;
Show();
Activate();
propertyGrid1.Refresh();
}