Skip to content

Commit

Permalink
Hide unsupported power sliders
Browse files Browse the repository at this point in the history
  • Loading branch information
seerge committed Mar 7, 2023
1 parent cf20163 commit 30f678d
Show file tree
Hide file tree
Showing 3 changed files with 148 additions and 116 deletions.
208 changes: 117 additions & 91 deletions Fans.Designer.cs

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

4 changes: 3 additions & 1 deletion Fans.cs
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,6 @@ private void ButtonApplyPower_Click(object? sender, EventArgs e)
Program.wmi.DeviceSet(ASUSWmi.PPT_TotalA1, limit_total);

Program.wmi.DeviceSet(ASUSWmi.PPT_CPUB0, limit_cpu);
Program.wmi.DeviceSet(ASUSWmi.PPT_CPUA2, limit_cpu);

labelApplied.ForeColor = Color.Blue;
labelApplied.Text = "Applied";
Expand All @@ -155,6 +154,9 @@ private void ButtonApplyPower_Click(object? sender, EventArgs e)
public void VisualisePower(bool init = false)
{

panelTotal.Visible = (Program.wmi.DeviceGet(ASUSWmi.PPT_TotalA0) >= 0);
panelCPU.Visible = (Program.wmi.DeviceGet(ASUSWmi.PPT_CPUB0) >= 0);

int limit_total;
int limit_cpu;

Expand Down
Loading

0 comments on commit 30f678d

Please sign in to comment.