mirror of
https://github.com/jkocon/g-helper.git
synced 2026-02-23 13:00:52 +01:00
Moved turbo boost checkbox to Fans and Power window
This commit is contained in:
52
Fans.Designer.cs
generated
52
Fans.Designer.cs
generated
@@ -28,9 +28,10 @@
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
private void InitializeComponent()
|
private void InitializeComponent()
|
||||||
{
|
{
|
||||||
System.Windows.Forms.DataVisualization.Charting.ChartArea chartArea5 = new System.Windows.Forms.DataVisualization.Charting.ChartArea();
|
System.Windows.Forms.DataVisualization.Charting.ChartArea chartArea3 = new System.Windows.Forms.DataVisualization.Charting.ChartArea();
|
||||||
System.Windows.Forms.DataVisualization.Charting.ChartArea chartArea6 = new System.Windows.Forms.DataVisualization.Charting.ChartArea();
|
System.Windows.Forms.DataVisualization.Charting.ChartArea chartArea4 = new System.Windows.Forms.DataVisualization.Charting.ChartArea();
|
||||||
panelFans = new Panel();
|
panelFans = new Panel();
|
||||||
|
labelFans = new Label();
|
||||||
checkAuto = new CheckBox();
|
checkAuto = new CheckBox();
|
||||||
chartGPU = new System.Windows.Forms.DataVisualization.Charting.Chart();
|
chartGPU = new System.Windows.Forms.DataVisualization.Charting.Chart();
|
||||||
buttonReset = new Button();
|
buttonReset = new Button();
|
||||||
@@ -51,6 +52,7 @@
|
|||||||
labelApplied = new Label();
|
labelApplied = new Label();
|
||||||
pictureFine = new PictureBox();
|
pictureFine = new PictureBox();
|
||||||
labelInfo = new Label();
|
labelInfo = new Label();
|
||||||
|
checkBoost = new CheckBox();
|
||||||
panelFans.SuspendLayout();
|
panelFans.SuspendLayout();
|
||||||
((System.ComponentModel.ISupportInitialize)chartGPU).BeginInit();
|
((System.ComponentModel.ISupportInitialize)chartGPU).BeginInit();
|
||||||
((System.ComponentModel.ISupportInitialize)chartCPU).BeginInit();
|
((System.ComponentModel.ISupportInitialize)chartCPU).BeginInit();
|
||||||
@@ -64,6 +66,8 @@
|
|||||||
//
|
//
|
||||||
// panelFans
|
// panelFans
|
||||||
//
|
//
|
||||||
|
panelFans.Controls.Add(checkBoost);
|
||||||
|
panelFans.Controls.Add(labelFans);
|
||||||
panelFans.Controls.Add(checkAuto);
|
panelFans.Controls.Add(checkAuto);
|
||||||
panelFans.Controls.Add(chartGPU);
|
panelFans.Controls.Add(chartGPU);
|
||||||
panelFans.Controls.Add(buttonReset);
|
panelFans.Controls.Add(buttonReset);
|
||||||
@@ -78,11 +82,21 @@
|
|||||||
panelFans.Size = new Size(872, 1089);
|
panelFans.Size = new Size(872, 1089);
|
||||||
panelFans.TabIndex = 12;
|
panelFans.TabIndex = 12;
|
||||||
//
|
//
|
||||||
|
// labelFans
|
||||||
|
//
|
||||||
|
labelFans.AutoSize = true;
|
||||||
|
labelFans.Font = new Font("Segoe UI", 9F, FontStyle.Bold, GraphicsUnit.Point);
|
||||||
|
labelFans.Location = new Point(24, 15);
|
||||||
|
labelFans.Name = "labelFans";
|
||||||
|
labelFans.Size = new Size(138, 32);
|
||||||
|
labelFans.TabIndex = 28;
|
||||||
|
labelFans.Text = "Fan Curves";
|
||||||
|
//
|
||||||
// checkAuto
|
// checkAuto
|
||||||
//
|
//
|
||||||
checkAuto.Anchor = AnchorStyles.Bottom | AnchorStyles.Right;
|
checkAuto.Anchor = AnchorStyles.Bottom | AnchorStyles.Right;
|
||||||
checkAuto.AutoSize = true;
|
checkAuto.AutoSize = true;
|
||||||
checkAuto.Location = new Point(584, 981);
|
checkAuto.Location = new Point(411, 1030);
|
||||||
checkAuto.Margin = new Padding(4, 2, 4, 2);
|
checkAuto.Margin = new Padding(4, 2, 4, 2);
|
||||||
checkAuto.Name = "checkAuto";
|
checkAuto.Name = "checkAuto";
|
||||||
checkAuto.Size = new Size(165, 36);
|
checkAuto.Size = new Size(165, 36);
|
||||||
@@ -93,9 +107,9 @@
|
|||||||
// chartGPU
|
// chartGPU
|
||||||
//
|
//
|
||||||
chartGPU.Anchor = AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right;
|
chartGPU.Anchor = AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right;
|
||||||
chartArea5.Name = "ChartArea1";
|
chartArea3.Name = "ChartArea1";
|
||||||
chartGPU.ChartAreas.Add(chartArea5);
|
chartGPU.ChartAreas.Add(chartArea3);
|
||||||
chartGPU.Location = new Point(22, 502);
|
chartGPU.Location = new Point(22, 547);
|
||||||
chartGPU.Margin = new Padding(4, 2, 4, 2);
|
chartGPU.Margin = new Padding(4, 2, 4, 2);
|
||||||
chartGPU.Name = "chartGPU";
|
chartGPU.Name = "chartGPU";
|
||||||
chartGPU.Size = new Size(810, 460);
|
chartGPU.Size = new Size(810, 460);
|
||||||
@@ -127,9 +141,9 @@
|
|||||||
// chartCPU
|
// chartCPU
|
||||||
//
|
//
|
||||||
chartCPU.Anchor = AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right;
|
chartCPU.Anchor = AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right;
|
||||||
chartArea6.Name = "ChartArea1";
|
chartArea4.Name = "ChartArea1";
|
||||||
chartCPU.ChartAreas.Add(chartArea6);
|
chartCPU.ChartAreas.Add(chartArea4);
|
||||||
chartCPU.Location = new Point(22, 21);
|
chartCPU.Location = new Point(22, 66);
|
||||||
chartCPU.Margin = new Padding(10);
|
chartCPU.Margin = new Padding(10);
|
||||||
chartCPU.Name = "chartCPU";
|
chartCPU.Name = "chartCPU";
|
||||||
chartCPU.Size = new Size(810, 460);
|
chartCPU.Size = new Size(810, 460);
|
||||||
@@ -166,7 +180,7 @@
|
|||||||
//
|
//
|
||||||
checkApplyPower.Anchor = AnchorStyles.Bottom | AnchorStyles.Right;
|
checkApplyPower.Anchor = AnchorStyles.Bottom | AnchorStyles.Right;
|
||||||
checkApplyPower.AutoSize = true;
|
checkApplyPower.AutoSize = true;
|
||||||
checkApplyPower.Location = new Point(17, 981);
|
checkApplyPower.Location = new Point(21, 982);
|
||||||
checkApplyPower.Margin = new Padding(4, 2, 4, 2);
|
checkApplyPower.Margin = new Padding(4, 2, 4, 2);
|
||||||
checkApplyPower.Name = "checkApplyPower";
|
checkApplyPower.Name = "checkApplyPower";
|
||||||
checkApplyPower.Size = new Size(165, 36);
|
checkApplyPower.Size = new Size(165, 36);
|
||||||
@@ -294,7 +308,7 @@
|
|||||||
pictureFine.Anchor = AnchorStyles.Bottom | AnchorStyles.Left | AnchorStyles.Right;
|
pictureFine.Anchor = AnchorStyles.Bottom | AnchorStyles.Left | AnchorStyles.Right;
|
||||||
pictureFine.BackgroundImageLayout = ImageLayout.Zoom;
|
pictureFine.BackgroundImageLayout = ImageLayout.Zoom;
|
||||||
pictureFine.Image = Properties.Resources.everything_is_fine_itsfine;
|
pictureFine.Image = Properties.Resources.everything_is_fine_itsfine;
|
||||||
pictureFine.Location = new Point(17, 694);
|
pictureFine.Location = new Point(17, 671);
|
||||||
pictureFine.Margin = new Padding(4, 2, 4, 2);
|
pictureFine.Margin = new Padding(4, 2, 4, 2);
|
||||||
pictureFine.Name = "pictureFine";
|
pictureFine.Name = "pictureFine";
|
||||||
pictureFine.Size = new Size(327, 254);
|
pictureFine.Size = new Size(327, 254);
|
||||||
@@ -308,10 +322,22 @@
|
|||||||
labelInfo.Location = new Point(17, 603);
|
labelInfo.Location = new Point(17, 603);
|
||||||
labelInfo.Margin = new Padding(4, 0, 4, 0);
|
labelInfo.Margin = new Padding(4, 0, 4, 0);
|
||||||
labelInfo.Name = "labelInfo";
|
labelInfo.Name = "labelInfo";
|
||||||
labelInfo.Size = new Size(327, 371);
|
labelInfo.Size = new Size(327, 330);
|
||||||
labelInfo.TabIndex = 19;
|
labelInfo.TabIndex = 19;
|
||||||
labelInfo.Text = "label";
|
labelInfo.Text = "label";
|
||||||
//
|
//
|
||||||
|
// checkBoost
|
||||||
|
//
|
||||||
|
checkBoost.AutoSize = true;
|
||||||
|
checkBoost.ForeColor = SystemColors.ControlText;
|
||||||
|
checkBoost.Location = new Point(512, 15);
|
||||||
|
checkBoost.Margin = new Padding(4, 2, 4, 2);
|
||||||
|
checkBoost.Name = "checkBoost";
|
||||||
|
checkBoost.Size = new Size(320, 36);
|
||||||
|
checkBoost.TabIndex = 35;
|
||||||
|
checkBoost.Text = "CPU Turbo Boost enabled";
|
||||||
|
checkBoost.UseVisualStyleBackColor = true;
|
||||||
|
//
|
||||||
// Fans
|
// Fans
|
||||||
//
|
//
|
||||||
AutoScaleDimensions = new SizeF(192F, 192F);
|
AutoScaleDimensions = new SizeF(192F, 192F);
|
||||||
@@ -369,5 +395,7 @@
|
|||||||
private PictureBox pictureFine;
|
private PictureBox pictureFine;
|
||||||
private Label labelInfo;
|
private Label labelInfo;
|
||||||
private Label labelPowerLimits;
|
private Label labelPowerLimits;
|
||||||
|
private Label labelFans;
|
||||||
|
private CheckBox checkBoost;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
24
Fans.cs
24
Fans.cs
@@ -22,7 +22,7 @@ namespace GHelper
|
|||||||
title = "CPU Fan Profile";
|
title = "CPU Fan Profile";
|
||||||
|
|
||||||
if (Program.settingsForm.perfName.Length > 0)
|
if (Program.settingsForm.perfName.Length > 0)
|
||||||
title += ": " + Program.settingsForm.perfName;
|
labelFans.Text = "Fan Profiles: " + Program.settingsForm.perfName;
|
||||||
|
|
||||||
if (chart.Titles.Count > 0)
|
if (chart.Titles.Count > 0)
|
||||||
chart.Titles[0].Text = title;
|
chart.Titles[0].Text = title;
|
||||||
@@ -102,11 +102,33 @@ namespace GHelper
|
|||||||
|
|
||||||
InitFans();
|
InitFans();
|
||||||
InitPower();
|
InitPower();
|
||||||
|
InitBoost();
|
||||||
|
|
||||||
|
checkBoost.Click += CheckBoost_Click;
|
||||||
|
|
||||||
Shown += Fans_Shown;
|
Shown += Fans_Shown;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public void InitBoost()
|
||||||
|
{
|
||||||
|
int boost = NativeMethods.GetCPUBoost();
|
||||||
|
checkBoost.Checked = (boost > 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void CheckBoost_Click(object? sender, EventArgs e)
|
||||||
|
{
|
||||||
|
if (sender is null)
|
||||||
|
return;
|
||||||
|
|
||||||
|
CheckBox chk = (CheckBox)sender;
|
||||||
|
if (chk.Checked)
|
||||||
|
NativeMethods.SetCPUBoost(2);
|
||||||
|
else
|
||||||
|
NativeMethods.SetCPUBoost(0);
|
||||||
|
}
|
||||||
|
|
||||||
private void CheckApplyPower_Click(object? sender, EventArgs e)
|
private void CheckApplyPower_Click(object? sender, EventArgs e)
|
||||||
{
|
{
|
||||||
if (sender is null) return;
|
if (sender is null) return;
|
||||||
|
|||||||
@@ -15,7 +15,7 @@
|
|||||||
<AssemblyName>GHelper</AssemblyName>
|
<AssemblyName>GHelper</AssemblyName>
|
||||||
<PlatformTarget>x64</PlatformTarget>
|
<PlatformTarget>x64</PlatformTarget>
|
||||||
<ProduceReferenceAssembly>False</ProduceReferenceAssembly>
|
<ProduceReferenceAssembly>False</ProduceReferenceAssembly>
|
||||||
<AssemblyVersion>0.18.2</AssemblyVersion>
|
<AssemblyVersion>0.20</AssemblyVersion>
|
||||||
<AllowUnsafeBlocks>True</AllowUnsafeBlocks>
|
<AllowUnsafeBlocks>True</AllowUnsafeBlocks>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
|
|||||||
@@ -75,7 +75,6 @@ namespace GHelper
|
|||||||
wmi.SubscribeToEvents(WatcherEventArrived);
|
wmi.SubscribeToEvents(WatcherEventArrived);
|
||||||
|
|
||||||
settingsForm.InitGPUMode();
|
settingsForm.InitGPUMode();
|
||||||
settingsForm.InitBoost();
|
|
||||||
settingsForm.InitAura();
|
settingsForm.InitAura();
|
||||||
settingsForm.InitMatrix();
|
settingsForm.InitMatrix();
|
||||||
|
|
||||||
|
|||||||
15
Settings.Designer.cs
generated
15
Settings.Designer.cs
generated
@@ -48,7 +48,6 @@
|
|||||||
checkStartup = new CheckBox();
|
checkStartup = new CheckBox();
|
||||||
panelPerformance = new Panel();
|
panelPerformance = new Panel();
|
||||||
buttonFans = new Button();
|
buttonFans = new Button();
|
||||||
checkBoost = new CheckBox();
|
|
||||||
picturePerf = new PictureBox();
|
picturePerf = new PictureBox();
|
||||||
labelPerf = new Label();
|
labelPerf = new Label();
|
||||||
labelCPUFan = new Label();
|
labelCPUFan = new Label();
|
||||||
@@ -323,7 +322,6 @@
|
|||||||
// panelPerformance
|
// panelPerformance
|
||||||
//
|
//
|
||||||
panelPerformance.Controls.Add(buttonFans);
|
panelPerformance.Controls.Add(buttonFans);
|
||||||
panelPerformance.Controls.Add(checkBoost);
|
|
||||||
panelPerformance.Controls.Add(picturePerf);
|
panelPerformance.Controls.Add(picturePerf);
|
||||||
panelPerformance.Controls.Add(labelPerf);
|
panelPerformance.Controls.Add(labelPerf);
|
||||||
panelPerformance.Controls.Add(labelCPUFan);
|
panelPerformance.Controls.Add(labelCPUFan);
|
||||||
@@ -348,18 +346,6 @@
|
|||||||
buttonFans.Text = "Fans and Power";
|
buttonFans.Text = "Fans and Power";
|
||||||
buttonFans.UseVisualStyleBackColor = false;
|
buttonFans.UseVisualStyleBackColor = false;
|
||||||
//
|
//
|
||||||
// checkBoost
|
|
||||||
//
|
|
||||||
checkBoost.AutoSize = true;
|
|
||||||
checkBoost.ForeColor = SystemColors.GrayText;
|
|
||||||
checkBoost.Location = new Point(27, 154);
|
|
||||||
checkBoost.Margin = new Padding(4, 2, 4, 2);
|
|
||||||
checkBoost.Name = "checkBoost";
|
|
||||||
checkBoost.Size = new Size(320, 36);
|
|
||||||
checkBoost.TabIndex = 33;
|
|
||||||
checkBoost.Text = "CPU Turbo Boost enabled";
|
|
||||||
checkBoost.UseVisualStyleBackColor = true;
|
|
||||||
//
|
|
||||||
// picturePerf
|
// picturePerf
|
||||||
//
|
//
|
||||||
picturePerf.BackgroundImage = (Image)resources.GetObject("picturePerf.BackgroundImage");
|
picturePerf.BackgroundImage = (Image)resources.GetObject("picturePerf.BackgroundImage");
|
||||||
@@ -872,7 +858,6 @@
|
|||||||
private CheckBox checkStartup;
|
private CheckBox checkStartup;
|
||||||
private Panel panelPerformance;
|
private Panel panelPerformance;
|
||||||
private Button buttonFans;
|
private Button buttonFans;
|
||||||
private CheckBox checkBoost;
|
|
||||||
private PictureBox picturePerf;
|
private PictureBox picturePerf;
|
||||||
private Label labelPerf;
|
private Label labelPerf;
|
||||||
private Label labelCPUFan;
|
private Label labelCPUFan;
|
||||||
|
|||||||
21
Settings.cs
21
Settings.cs
@@ -61,7 +61,6 @@ namespace GHelper
|
|||||||
|
|
||||||
buttonQuit.Click += ButtonQuit_Click;
|
buttonQuit.Click += ButtonQuit_Click;
|
||||||
|
|
||||||
checkBoost.Click += CheckBoost_Click;
|
|
||||||
|
|
||||||
checkScreen.CheckedChanged += checkScreen_CheckedChanged;
|
checkScreen.CheckedChanged += checkScreen_CheckedChanged;
|
||||||
|
|
||||||
@@ -483,19 +482,6 @@ namespace GHelper
|
|||||||
SetAuraMode(cmb.SelectedIndex);
|
SetAuraMode(cmb.SelectedIndex);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
private void CheckBoost_Click(object? sender, EventArgs e)
|
|
||||||
{
|
|
||||||
if (sender is null)
|
|
||||||
return;
|
|
||||||
|
|
||||||
CheckBox chk = (CheckBox)sender;
|
|
||||||
if (chk.Checked)
|
|
||||||
NativeMethods.SetCPUBoost(2);
|
|
||||||
else
|
|
||||||
NativeMethods.SetCPUBoost(0);
|
|
||||||
}
|
|
||||||
|
|
||||||
private void Button120Hz_Click(object? sender, EventArgs e)
|
private void Button120Hz_Click(object? sender, EventArgs e)
|
||||||
{
|
{
|
||||||
SetScreen(1000, 1);
|
SetScreen(1000, 1);
|
||||||
@@ -538,13 +524,6 @@ namespace GHelper
|
|||||||
InitScreen();
|
InitScreen();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public void InitBoost()
|
|
||||||
{
|
|
||||||
int boost = NativeMethods.GetCPUBoost();
|
|
||||||
checkBoost.Checked = (boost > 0);
|
|
||||||
}
|
|
||||||
|
|
||||||
public void InitScreen()
|
public void InitScreen()
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user