Unoptimised but working verison of AsusFanControl with a fan curve.

This commit is contained in:
Darren Ohonba - Evans
2024-05-18 06:56:04 +01:00
parent 5a17ba223f
commit 79bc42e24d
11 changed files with 644 additions and 51 deletions

View File

@@ -35,7 +35,6 @@
this.label2 = new System.Windows.Forms.Label();
this.button1 = new System.Windows.Forms.Button();
this.labelRPM = new System.Windows.Forms.Label();
this.checkBoxTurnOn = new System.Windows.Forms.CheckBox();
this.labelCPUTemp = new System.Windows.Forms.Label();
this.button2 = new System.Windows.Forms.Button();
this.label4 = new System.Windows.Forms.Label();
@@ -44,16 +43,24 @@
this.toolStripMenuItemTurnOffControlOnExit = new System.Windows.Forms.ToolStripMenuItem();
this.toolStripMenuItemForbidUnsafeSettings = new System.Windows.Forms.ToolStripMenuItem();
this.toolStripMenuItemCheckForUpdates = new System.Windows.Forms.ToolStripMenuItem();
this.label5 = new System.Windows.Forms.Label();
this.pictureBoxFanCurve = new System.Windows.Forms.PictureBox();
this.groupBox1 = new System.Windows.Forms.GroupBox();
this.fanControl = new System.Windows.Forms.RadioButton();
this.fanCurveControl = new System.Windows.Forms.RadioButton();
((System.ComponentModel.ISupportInitialize)(this.trackBarFanSpeed)).BeginInit();
this.menuStrip1.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.pictureBoxFanCurve)).BeginInit();
this.groupBox1.SuspendLayout();
this.SuspendLayout();
//
// trackBarFanSpeed
//
this.trackBarFanSpeed.Location = new System.Drawing.Point(12, 62);
this.trackBarFanSpeed.Location = new System.Drawing.Point(17, 54);
this.trackBarFanSpeed.Margin = new System.Windows.Forms.Padding(4);
this.trackBarFanSpeed.Maximum = 100;
this.trackBarFanSpeed.Name = "trackBarFanSpeed";
this.trackBarFanSpeed.Size = new System.Drawing.Size(300, 45);
this.trackBarFanSpeed.Size = new System.Drawing.Size(400, 56);
this.trackBarFanSpeed.TabIndex = 0;
this.trackBarFanSpeed.Value = 100;
this.trackBarFanSpeed.KeyUp += new System.Windows.Forms.KeyEventHandler(this.trackBarFanSpeed_KeyUp);
@@ -62,35 +69,39 @@
// label1
//
this.label1.AutoSize = true;
this.label1.Location = new System.Drawing.Point(12, 110);
this.label1.Location = new System.Drawing.Point(13, 401);
this.label1.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(73, 13);
this.label1.Size = new System.Drawing.Size(88, 16);
this.label1.TabIndex = 1;
this.label1.Text = "Current value:";
//
// labelValue
//
this.labelValue.AutoSize = true;
this.labelValue.Location = new System.Drawing.Point(91, 110);
this.labelValue.Location = new System.Drawing.Point(118, 401);
this.labelValue.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
this.labelValue.Name = "labelValue";
this.labelValue.Size = new System.Drawing.Size(10, 13);
this.labelValue.Size = new System.Drawing.Size(11, 16);
this.labelValue.TabIndex = 2;
this.labelValue.Text = "-";
//
// label2
//
this.label2.AutoSize = true;
this.label2.Location = new System.Drawing.Point(40, 139);
this.label2.Location = new System.Drawing.Point(50, 437);
this.label2.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(71, 13);
this.label2.Size = new System.Drawing.Size(85, 16);
this.label2.TabIndex = 3;
this.label2.Text = "Current RPM:";
//
// button1
//
this.button1.Location = new System.Drawing.Point(12, 134);
this.button1.Location = new System.Drawing.Point(13, 431);
this.button1.Margin = new System.Windows.Forms.Padding(4);
this.button1.Name = "button1";
this.button1.Size = new System.Drawing.Size(22, 23);
this.button1.Size = new System.Drawing.Size(29, 28);
this.button1.TabIndex = 4;
this.button1.Text = "↻";
this.button1.UseVisualStyleBackColor = true;
@@ -99,37 +110,29 @@
// labelRPM
//
this.labelRPM.AutoSize = true;
this.labelRPM.Location = new System.Drawing.Point(117, 139);
this.labelRPM.Location = new System.Drawing.Point(153, 437);
this.labelRPM.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
this.labelRPM.Name = "labelRPM";
this.labelRPM.Size = new System.Drawing.Size(10, 13);
this.labelRPM.Size = new System.Drawing.Size(11, 16);
this.labelRPM.TabIndex = 5;
this.labelRPM.Text = "-";
//
// checkBoxTurnOn
//
this.checkBoxTurnOn.AutoSize = true;
this.checkBoxTurnOn.Location = new System.Drawing.Point(12, 37);
this.checkBoxTurnOn.Name = "checkBoxTurnOn";
this.checkBoxTurnOn.Size = new System.Drawing.Size(116, 17);
this.checkBoxTurnOn.TabIndex = 6;
this.checkBoxTurnOn.Text = "Turn on fan control";
this.checkBoxTurnOn.UseVisualStyleBackColor = true;
this.checkBoxTurnOn.CheckedChanged += new System.EventHandler(this.checkBoxTurnOn_CheckedChanged);
//
// labelCPUTemp
//
this.labelCPUTemp.AutoSize = true;
this.labelCPUTemp.Location = new System.Drawing.Point(141, 168);
this.labelCPUTemp.Location = new System.Drawing.Point(185, 473);
this.labelCPUTemp.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
this.labelCPUTemp.Name = "labelCPUTemp";
this.labelCPUTemp.Size = new System.Drawing.Size(10, 13);
this.labelCPUTemp.Size = new System.Drawing.Size(11, 16);
this.labelCPUTemp.TabIndex = 9;
this.labelCPUTemp.Text = "-";
//
// button2
//
this.button2.Location = new System.Drawing.Point(12, 163);
this.button2.Location = new System.Drawing.Point(13, 467);
this.button2.Margin = new System.Windows.Forms.Padding(4);
this.button2.Name = "button2";
this.button2.Size = new System.Drawing.Size(22, 23);
this.button2.Size = new System.Drawing.Size(29, 28);
this.button2.TabIndex = 8;
this.button2.Text = "↻";
this.button2.UseVisualStyleBackColor = true;
@@ -138,20 +141,22 @@
// label4
//
this.label4.AutoSize = true;
this.label4.Location = new System.Drawing.Point(40, 168);
this.label4.Location = new System.Drawing.Point(50, 473);
this.label4.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
this.label4.Name = "label4";
this.label4.Size = new System.Drawing.Size(95, 13);
this.label4.Size = new System.Drawing.Size(116, 16);
this.label4.TabIndex = 7;
this.label4.Text = "Current CPU temp:";
//
// menuStrip1
//
this.menuStrip1.ImageScalingSize = new System.Drawing.Size(20, 20);
this.menuStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.toolStripMenuItem1,
this.toolStripMenuItemCheckForUpdates});
this.menuStrip1.Location = new System.Drawing.Point(0, 0);
this.menuStrip1.Name = "menuStrip1";
this.menuStrip1.Size = new System.Drawing.Size(324, 24);
this.menuStrip1.Size = new System.Drawing.Size(510, 28);
this.menuStrip1.TabIndex = 10;
this.menuStrip1.Text = "menuStrip1";
//
@@ -161,14 +166,14 @@
this.toolStripMenuItemTurnOffControlOnExit,
this.toolStripMenuItemForbidUnsafeSettings});
this.toolStripMenuItem1.Name = "toolStripMenuItem1";
this.toolStripMenuItem1.Size = new System.Drawing.Size(72, 20);
this.toolStripMenuItem1.Size = new System.Drawing.Size(89, 24);
this.toolStripMenuItem1.Text = "Advanced";
//
// toolStripMenuItemTurnOffControlOnExit
//
this.toolStripMenuItemTurnOffControlOnExit.CheckOnClick = true;
this.toolStripMenuItemTurnOffControlOnExit.Name = "toolStripMenuItemTurnOffControlOnExit";
this.toolStripMenuItemTurnOffControlOnExit.Size = new System.Drawing.Size(196, 22);
this.toolStripMenuItemTurnOffControlOnExit.Size = new System.Drawing.Size(244, 26);
this.toolStripMenuItemTurnOffControlOnExit.Text = "Turn off control on exit";
this.toolStripMenuItemTurnOffControlOnExit.CheckedChanged += new System.EventHandler(this.toolStripMenuItemTurnOffControlOnExit_CheckedChanged);
//
@@ -176,40 +181,103 @@
//
this.toolStripMenuItemForbidUnsafeSettings.CheckOnClick = true;
this.toolStripMenuItemForbidUnsafeSettings.Name = "toolStripMenuItemForbidUnsafeSettings";
this.toolStripMenuItemForbidUnsafeSettings.Size = new System.Drawing.Size(196, 22);
this.toolStripMenuItemForbidUnsafeSettings.Size = new System.Drawing.Size(244, 26);
this.toolStripMenuItemForbidUnsafeSettings.Text = "Forbid unsafe settings";
this.toolStripMenuItemForbidUnsafeSettings.CheckedChanged += new System.EventHandler(this.toolStripMenuItemForbidUnsafeSettings_CheckedChanged);
//
// toolStripMenuItemCheckForUpdates
//
this.toolStripMenuItemCheckForUpdates.Name = "toolStripMenuItemCheckForUpdates";
this.toolStripMenuItemCheckForUpdates.Size = new System.Drawing.Size(115, 20);
this.toolStripMenuItemCheckForUpdates.Size = new System.Drawing.Size(142, 24);
this.toolStripMenuItemCheckForUpdates.Text = "Check for updates";
this.toolStripMenuItemCheckForUpdates.Click += new System.EventHandler(this.toolStripMenuItemCheckForUpdates_Click);
//
// label5
//
this.label5.AutoSize = true;
this.label5.Location = new System.Drawing.Point(341, 28);
this.label5.Name = "label5";
this.label5.Size = new System.Drawing.Size(76, 16);
this.label5.TabIndex = 13;
this.label5.Text = "PWM value";
//
// pictureBoxFanCurve
//
this.pictureBoxFanCurve.Location = new System.Drawing.Point(13, 184);
this.pictureBoxFanCurve.Name = "pictureBoxFanCurve";
this.pictureBoxFanCurve.Size = new System.Drawing.Size(477, 203);
this.pictureBoxFanCurve.TabIndex = 0;
this.pictureBoxFanCurve.TabStop = false;
this.pictureBoxFanCurve.Paint += new System.Windows.Forms.PaintEventHandler(this.pictureBoxFanCurve_Paint);
this.pictureBoxFanCurve.MouseClick += new System.Windows.Forms.MouseEventHandler(this.pictureBoxFanCurve_MouseClick);
this.pictureBoxFanCurve.MouseDoubleClick += new System.Windows.Forms.MouseEventHandler(this.pictureBoxFanCurve_MouseDoubleClick);
this.pictureBoxFanCurve.MouseDown += new System.Windows.Forms.MouseEventHandler(this.pictureBoxFanCurve_MouseDown);
this.pictureBoxFanCurve.MouseMove += new System.Windows.Forms.MouseEventHandler(this.pictureBoxFanCurve_MouseMove);
this.pictureBoxFanCurve.MouseUp += new System.Windows.Forms.MouseEventHandler(this.pictureBoxFanCurve_MouseUp);
//
// groupBox1
//
this.groupBox1.Controls.Add(this.fanControl);
this.groupBox1.Controls.Add(this.fanCurveControl);
this.groupBox1.Controls.Add(this.trackBarFanSpeed);
this.groupBox1.Controls.Add(this.label5);
this.groupBox1.Location = new System.Drawing.Point(12, 32);
this.groupBox1.Name = "groupBox1";
this.groupBox1.Size = new System.Drawing.Size(486, 146);
this.groupBox1.TabIndex = 14;
this.groupBox1.TabStop = false;
this.groupBox1.Text = "groupBox1";
//
// fanControl
//
this.fanControl.AutoSize = true;
this.fanControl.Location = new System.Drawing.Point(20, 27);
this.fanControl.Name = "fanControl";
this.fanControl.Size = new System.Drawing.Size(137, 20);
this.fanControl.TabIndex = 15;
this.fanControl.Text = "Turn on fan control";
this.fanControl.UseVisualStyleBackColor = true;
this.fanControl.CheckedChanged += new System.EventHandler(this.radioButton2_CheckedChanged);
//
// fanCurveControl
//
this.fanCurveControl.AutoSize = true;
this.fanCurveControl.Location = new System.Drawing.Point(20, 108);
this.fanCurveControl.Name = "fanCurveControl";
this.fanCurveControl.Size = new System.Drawing.Size(130, 20);
this.fanCurveControl.TabIndex = 14;
this.fanCurveControl.Text = "Turn on fan curve";
this.fanCurveControl.UseVisualStyleBackColor = true;
this.fanCurveControl.CheckedChanged += new System.EventHandler(this.fanCurve_CheckedChanged);
//
// Form1
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 16F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(324, 198);
this.ClientSize = new System.Drawing.Size(510, 523);
this.Controls.Add(this.pictureBoxFanCurve);
this.Controls.Add(this.labelCPUTemp);
this.Controls.Add(this.button2);
this.Controls.Add(this.label4);
this.Controls.Add(this.checkBoxTurnOn);
this.Controls.Add(this.labelRPM);
this.Controls.Add(this.button1);
this.Controls.Add(this.label2);
this.Controls.Add(this.labelValue);
this.Controls.Add(this.label1);
this.Controls.Add(this.trackBarFanSpeed);
this.Controls.Add(this.menuStrip1);
this.Controls.Add(this.groupBox1);
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
this.MainMenuStrip = this.menuStrip1;
this.Margin = new System.Windows.Forms.Padding(4);
this.Name = "Form1";
this.Text = "Asus Fan Control";
this.Load += new System.EventHandler(this.Form1_Load);
((System.ComponentModel.ISupportInitialize)(this.trackBarFanSpeed)).EndInit();
this.menuStrip1.ResumeLayout(false);
this.menuStrip1.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.pictureBoxFanCurve)).EndInit();
this.groupBox1.ResumeLayout(false);
this.groupBox1.PerformLayout();
this.ResumeLayout(false);
this.PerformLayout();
@@ -223,7 +291,6 @@
private System.Windows.Forms.Label label2;
private System.Windows.Forms.Button button1;
private System.Windows.Forms.Label labelRPM;
private System.Windows.Forms.CheckBox checkBoxTurnOn;
private System.Windows.Forms.Label labelCPUTemp;
private System.Windows.Forms.Button button2;
private System.Windows.Forms.Label label4;
@@ -232,6 +299,11 @@
private System.Windows.Forms.ToolStripMenuItem toolStripMenuItemTurnOffControlOnExit;
private System.Windows.Forms.ToolStripMenuItem toolStripMenuItemForbidUnsafeSettings;
private System.Windows.Forms.ToolStripMenuItem toolStripMenuItemCheckForUpdates;
private System.Windows.Forms.Label label5;
private System.Windows.Forms.PictureBox pictureBoxFanCurve;
private System.Windows.Forms.GroupBox groupBox1;
private System.Windows.Forms.RadioButton fanCurveControl;
private System.Windows.Forms.RadioButton fanControl;
}
}