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

@ -44,9 +44,10 @@
this.exitToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.propertyGridUpdateTimer = new System.Windows.Forms.Timer(this.components);
this.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel();
this.label1 = new System.Windows.Forms.Label();
this.helpLabel = new System.Windows.Forms.Label();
this.sensorWarningLabel = new System.Windows.Forms.Label();
this.propertyGrid1 = new System.Windows.Forms.PropertyGrid();
this.helpLabel = new System.Windows.Forms.Label();
this.contextMenu.SuspendLayout();
this.menuStrip1.SuspendLayout();
this.tableLayoutPanel1.SuspendLayout();
@ -76,25 +77,25 @@
this.toolStripSeparator1,
this.toolStripMenuItem1});
this.contextMenu.Name = "fanModeSelectMenu";
this.contextMenu.Size = new System.Drawing.Size(182, 96);
this.contextMenu.Size = new System.Drawing.Size(311, 96);
//
// fanModeSelectNotifyMenu
//
this.fanModeSelectNotifyMenu.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.fanModeSelectNotifyMenu.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.fanModeSelectNotifyMenu.Name = "fanModeSelectNotifyMenu";
this.fanModeSelectNotifyMenu.Size = new System.Drawing.Size(121, 40);
this.fanModeSelectNotifyMenu.Size = new System.Drawing.Size(250, 40);
this.fanModeSelectNotifyMenu.SelectedIndexChanged += new System.EventHandler(this.fanModeSelect_SelectedValueChanged);
//
// toolStripSeparator1
//
this.toolStripSeparator1.Name = "toolStripSeparator1";
this.toolStripSeparator1.Size = new System.Drawing.Size(178, 6);
this.toolStripSeparator1.Size = new System.Drawing.Size(307, 6);
//
// toolStripMenuItem1
//
this.toolStripMenuItem1.Name = "toolStripMenuItem1";
this.toolStripMenuItem1.Size = new System.Drawing.Size(181, 38);
this.toolStripMenuItem1.Size = new System.Drawing.Size(310, 38);
this.toolStripMenuItem1.Text = "Exit";
this.toolStripMenuItem1.Click += new System.EventHandler(this.formClose_Event);
//
@ -116,7 +117,7 @@
this.fanModeSelectMenu.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.fanModeSelectMenu.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.fanModeSelectMenu.Name = "fanModeSelectMenu";
this.fanModeSelectMenu.Size = new System.Drawing.Size(121, 40);
this.fanModeSelectMenu.Size = new System.Drawing.Size(250, 40);
this.fanModeSelectMenu.SelectedIndexChanged += new System.EventHandler(this.fanModeSelect_SelectedValueChanged);
//
// controlToolStripMenuItem
@ -158,19 +159,51 @@
//
this.tableLayoutPanel1.ColumnCount = 1;
this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100F));
this.tableLayoutPanel1.Controls.Add(this.label1, 0, 3);
this.tableLayoutPanel1.Controls.Add(this.helpLabel, 0, 3);
this.tableLayoutPanel1.Controls.Add(this.sensorWarningLabel, 0, 1);
this.tableLayoutPanel1.Controls.Add(this.propertyGrid1, 0, 0);
this.tableLayoutPanel1.Controls.Add(this.helpLabel, 0, 2);
this.tableLayoutPanel1.Dock = System.Windows.Forms.DockStyle.Fill;
this.tableLayoutPanel1.Location = new System.Drawing.Point(0, 44);
this.tableLayoutPanel1.Name = "tableLayoutPanel1";
this.tableLayoutPanel1.RowCount = 3;
this.tableLayoutPanel1.RowCount = 4;
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F));
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle());
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle());
this.tableLayoutPanel1.Size = new System.Drawing.Size(712, 885);
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle());
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle());
this.tableLayoutPanel1.Size = new System.Drawing.Size(712, 989);
this.tableLayoutPanel1.TabIndex = 5;
//
// label1
//
this.label1.AutoSize = true;
this.label1.Dock = System.Windows.Forms.DockStyle.Fill;
this.label1.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.label1.Font = new System.Drawing.Font("Segoe UI", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point);
this.label1.ForeColor = System.Drawing.Color.Red;
this.label1.Location = new System.Drawing.Point(3, 893);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(706, 64);
this.label1.TabIndex = 9;
this.label1.Text = "This application is highly experimental.\r\nUse at your own risk!";
this.label1.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
//
// helpLabel
//
this.helpLabel.AutoSize = true;
this.helpLabel.Cursor = System.Windows.Forms.Cursors.Hand;
this.helpLabel.Dock = System.Windows.Forms.DockStyle.Fill;
this.helpLabel.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.helpLabel.Font = new System.Drawing.Font("Segoe UI", 9F, ((System.Drawing.FontStyle)((System.Drawing.FontStyle.Bold | System.Drawing.FontStyle.Underline))), System.Drawing.GraphicsUnit.Point);
this.helpLabel.ForeColor = System.Drawing.SystemColors.HotTrack;
this.helpLabel.Location = new System.Drawing.Point(3, 957);
this.helpLabel.Name = "helpLabel";
this.helpLabel.Size = new System.Drawing.Size(706, 32);
this.helpLabel.TabIndex = 8;
this.helpLabel.Text = "https://github.com/ayufan-research/SteamDeckTools";
this.helpLabel.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
//
// sensorWarningLabel
//
this.sensorWarningLabel.AutoSize = true;
@ -178,12 +211,12 @@
this.sensorWarningLabel.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.sensorWarningLabel.Font = new System.Drawing.Font("Segoe UI", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point);
this.sensorWarningLabel.ForeColor = System.Drawing.Color.Red;
this.sensorWarningLabel.Location = new System.Drawing.Point(3, 725);
this.sensorWarningLabel.Location = new System.Drawing.Point(3, 797);
this.sensorWarningLabel.Name = "sensorWarningLabel";
this.sensorWarningLabel.Size = new System.Drawing.Size(706, 128);
this.sensorWarningLabel.Size = new System.Drawing.Size(706, 96);
this.sensorWarningLabel.TabIndex = 6;
this.sensorWarningLabel.Text = "Some sensors are missing.\r\nThe fan behavior might be incorrect.\r\nWhich might resu" +
"lt in device failure.\r\nUse at your own risk!";
"lt in device overheating.\r\n";
this.sensorWarningLabel.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
this.sensorWarningLabel.Visible = false;
//
@ -194,31 +227,15 @@
this.propertyGrid1.HelpVisible = false;
this.propertyGrid1.Location = new System.Drawing.Point(3, 3);
this.propertyGrid1.Name = "propertyGrid1";
this.propertyGrid1.Size = new System.Drawing.Size(706, 719);
this.propertyGrid1.Size = new System.Drawing.Size(706, 791);
this.propertyGrid1.TabIndex = 1;
this.propertyGrid1.ToolbarVisible = false;
//
// helpLabel
//
this.helpLabel.AutoSize = true;
this.helpLabel.Cursor = System.Windows.Forms.Cursors.Hand;
this.helpLabel.Dock = System.Windows.Forms.DockStyle.Fill;
this.helpLabel.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.helpLabel.Font = new System.Drawing.Font("Segoe UI", 9F, ((System.Drawing.FontStyle)((System.Drawing.FontStyle.Bold | System.Drawing.FontStyle.Underline))), System.Drawing.GraphicsUnit.Point);
this.helpLabel.ForeColor = System.Drawing.SystemColors.HotTrack;
this.helpLabel.Location = new System.Drawing.Point(3, 853);
this.helpLabel.Name = "helpLabel";
this.helpLabel.Size = new System.Drawing.Size(706, 32);
this.helpLabel.TabIndex = 7;
this.helpLabel.Text = "https://github.com/ayufan-research/SteamDeckTools";
this.helpLabel.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
this.helpLabel.DoubleClick += new System.EventHandler(this.help_DoubleClick);
//
// FanControlForm
//
this.AutoScaleDimensions = new System.Drawing.SizeF(13F, 32F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(712, 929);
this.ClientSize = new System.Drawing.Size(712, 1033);
this.Controls.Add(this.tableLayoutPanel1);
this.Controls.Add(this.menuStrip1);
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
@ -259,6 +276,7 @@
private PropertyGrid propertyGrid1;
private ToolStripMenuItem toolStripMenuItemStartupOnBoot;
private ToolStripSeparator toolStripSeparator2;
private Label label1;
private Label helpLabel;
}
}