PPT labels fixes

This commit is contained in:
Serge
2023-05-30 18:58:44 +02:00
parent f670b9e0dc
commit 1596ce84e8
3 changed files with 56 additions and 34 deletions

54
app/Fans.Designer.cs generated
View File

@@ -31,14 +31,14 @@ namespace GHelper
/// </summary> /// </summary>
private void InitializeComponent() private void InitializeComponent()
{ {
ChartArea chartArea5 = new ChartArea(); ChartArea chartArea9 = new ChartArea();
Title title5 = new Title(); Title title9 = new Title();
ChartArea chartArea6 = new ChartArea(); ChartArea chartArea10 = new ChartArea();
Title title6 = new Title(); Title title10 = new Title();
ChartArea chartArea7 = new ChartArea(); ChartArea chartArea11 = new ChartArea();
Title title7 = new Title(); Title title11 = new Title();
ChartArea chartArea8 = new ChartArea(); ChartArea chartArea12 = new ChartArea();
Title title8 = new Title(); Title title12 = new Title();
panelFans = new Panel(); panelFans = new Panel();
labelTip = new Label(); labelTip = new Label();
tableFanCharts = new TableLayoutPanel(); tableFanCharts = new TableLayoutPanel();
@@ -181,8 +181,8 @@ namespace GHelper
// //
// chartGPU // chartGPU
// //
chartArea5.Name = "ChartArea1"; chartArea9.Name = "ChartArea1";
chartGPU.ChartAreas.Add(chartArea5); chartGPU.ChartAreas.Add(chartArea9);
chartGPU.Dock = DockStyle.Fill; chartGPU.Dock = DockStyle.Fill;
chartGPU.Location = new Point(12, 289); chartGPU.Location = new Point(12, 289);
chartGPU.Margin = new Padding(2, 10, 2, 10); chartGPU.Margin = new Padding(2, 10, 2, 10);
@@ -190,13 +190,13 @@ namespace GHelper
chartGPU.Size = new Size(781, 259); chartGPU.Size = new Size(781, 259);
chartGPU.TabIndex = 17; chartGPU.TabIndex = 17;
chartGPU.Text = "chartGPU"; chartGPU.Text = "chartGPU";
title5.Name = "Title1"; title9.Name = "Title1";
chartGPU.Titles.Add(title5); chartGPU.Titles.Add(title9);
// //
// chartCPU // chartCPU
// //
chartArea6.Name = "ChartArea1"; chartArea10.Name = "ChartArea1";
chartCPU.ChartAreas.Add(chartArea6); chartCPU.ChartAreas.Add(chartArea10);
chartCPU.Dock = DockStyle.Fill; chartCPU.Dock = DockStyle.Fill;
chartCPU.Location = new Point(12, 10); chartCPU.Location = new Point(12, 10);
chartCPU.Margin = new Padding(2, 10, 2, 10); chartCPU.Margin = new Padding(2, 10, 2, 10);
@@ -204,13 +204,13 @@ namespace GHelper
chartCPU.Size = new Size(781, 259); chartCPU.Size = new Size(781, 259);
chartCPU.TabIndex = 14; chartCPU.TabIndex = 14;
chartCPU.Text = "chartCPU"; chartCPU.Text = "chartCPU";
title6.Name = "Title1"; title10.Name = "Title1";
chartCPU.Titles.Add(title6); chartCPU.Titles.Add(title10);
// //
// chartXGM // chartXGM
// //
chartArea7.Name = "ChartAreaXGM"; chartArea11.Name = "ChartAreaXGM";
chartXGM.ChartAreas.Add(chartArea7); chartXGM.ChartAreas.Add(chartArea11);
chartXGM.Dock = DockStyle.Fill; chartXGM.Dock = DockStyle.Fill;
chartXGM.Location = new Point(12, 847); chartXGM.Location = new Point(12, 847);
chartXGM.Margin = new Padding(2, 10, 2, 10); chartXGM.Margin = new Padding(2, 10, 2, 10);
@@ -218,14 +218,14 @@ namespace GHelper
chartXGM.Size = new Size(781, 261); chartXGM.Size = new Size(781, 261);
chartXGM.TabIndex = 14; chartXGM.TabIndex = 14;
chartXGM.Text = "chartXGM"; chartXGM.Text = "chartXGM";
title7.Name = "Title4"; title11.Name = "Title4";
chartXGM.Titles.Add(title7); chartXGM.Titles.Add(title11);
chartXGM.Visible = false; chartXGM.Visible = false;
// //
// chartMid // chartMid
// //
chartArea8.Name = "ChartArea3"; chartArea12.Name = "ChartArea3";
chartMid.ChartAreas.Add(chartArea8); chartMid.ChartAreas.Add(chartArea12);
chartMid.Dock = DockStyle.Fill; chartMid.Dock = DockStyle.Fill;
chartMid.Location = new Point(12, 568); chartMid.Location = new Point(12, 568);
chartMid.Margin = new Padding(2, 10, 2, 10); chartMid.Margin = new Padding(2, 10, 2, 10);
@@ -233,8 +233,8 @@ namespace GHelper
chartMid.Size = new Size(781, 259); chartMid.Size = new Size(781, 259);
chartMid.TabIndex = 14; chartMid.TabIndex = 14;
chartMid.Text = "chartMid"; chartMid.Text = "chartMid";
title8.Name = "Title3"; title12.Name = "Title3";
chartMid.Titles.Add(title8); chartMid.Titles.Add(title12);
chartMid.Visible = false; chartMid.Visible = false;
// //
// panelTitleFans // panelTitleFans
@@ -366,8 +366,8 @@ namespace GHelper
panelPower.AutoSizeMode = AutoSizeMode.GrowAndShrink; panelPower.AutoSizeMode = AutoSizeMode.GrowAndShrink;
panelPower.Controls.Add(panelApplyPower); panelPower.Controls.Add(panelApplyPower);
panelPower.Controls.Add(labelInfo); panelPower.Controls.Add(labelInfo);
panelPower.Controls.Add(panelAPU);
panelPower.Controls.Add(panelCPU); panelPower.Controls.Add(panelCPU);
panelPower.Controls.Add(panelAPU);
panelPower.Controls.Add(panelTotal); panelPower.Controls.Add(panelTotal);
panelPower.Controls.Add(panelTitleCPU); panelPower.Controls.Add(panelTitleCPU);
panelPower.Dock = DockStyle.Fill; panelPower.Dock = DockStyle.Fill;
@@ -419,7 +419,7 @@ namespace GHelper
panelAPU.Controls.Add(labelLeftAPU); panelAPU.Controls.Add(labelLeftAPU);
panelAPU.Controls.Add(trackAPU); panelAPU.Controls.Add(trackAPU);
panelAPU.Dock = DockStyle.Top; panelAPU.Dock = DockStyle.Top;
panelAPU.Location = new Point(0, 342); panelAPU.Location = new Point(0, 206);
panelAPU.Margin = new Padding(4); panelAPU.Margin = new Padding(4);
panelAPU.Name = "panelAPU"; panelAPU.Name = "panelAPU";
panelAPU.Size = new Size(523, 140); panelAPU.Size = new Size(523, 140);
@@ -469,7 +469,7 @@ namespace GHelper
panelCPU.Controls.Add(labelLeftCPU); panelCPU.Controls.Add(labelLeftCPU);
panelCPU.Controls.Add(trackCPU); panelCPU.Controls.Add(trackCPU);
panelCPU.Dock = DockStyle.Top; panelCPU.Dock = DockStyle.Top;
panelCPU.Location = new Point(0, 206); panelCPU.Location = new Point(0, 346);
panelCPU.Margin = new Padding(4); panelCPU.Margin = new Padding(4);
panelCPU.Name = "panelCPU"; panelCPU.Name = "panelCPU";
panelCPU.Size = new Size(523, 136); panelCPU.Size = new Size(523, 136);

View File

@@ -411,18 +411,30 @@ namespace GHelper
public void InitPower(bool changed = false) public void InitPower(bool changed = false)
{ {
bool cpuAmode = (Program.acpi.DeviceGet(AsusACPI.PPT_TotalA0) >= 0); // 2021 model + bool cpuAmode = (Program.acpi.DeviceGet(AsusACPI.PPT_TotalA0) >= 0);
bool cpuBmode = (Program.acpi.DeviceGet(AsusACPI.PPT_CPUB0) >= 0); // 2022 model + bool cpuBmode = (Program.acpi.DeviceGet(AsusACPI.PPT_CPUB1) >= 0);
bool apuMode = (Program.acpi.DeviceGet(AsusACPI.PPT_APUC1) >= 0); bool apuMode = (Program.acpi.DeviceGet(AsusACPI.PPT_APUC1) >= 0);
bool gpuMode = (Program.acpi.DeviceGet(AsusACPI.PPT_GPUC0) >= 0);
bool allAMD = cpuBmode && !gpuMode;
powerVisible = panelPower.Visible = cpuAmode; powerVisible = panelPower.Visible = cpuAmode;
panelCPU.Visible = cpuBmode; panelCPU.Visible = allAMD;
panelAPU.Visible = apuMode; panelAPU.Visible = apuMode;
// Yes, that's stupid, but Total slider on 2021 model actually adjusts CPU PPT // Yes, that's stupid, but Total slider on 2021 model actually adjusts CPU PPT
if (!cpuBmode) if (allAMD)
{ {
labelLeftPlatform.Text = "CPU"; labelLeftPlatform.Text = "Platform Slow (CPU + GPU)";
labelLeftAPU.Text = "Platform Fast (CPU + GPU)";
labelLeftCPU.Text = "CPU";
}
else
{
labelLeftPlatform.Text = "CPU Slow";
labelLeftAPU.Text = "CPU Fast";
} }
int limit_total; int limit_total;

View File

@@ -53,7 +53,7 @@ namespace GHelper
buttonScreenAuto.Text = Properties.Strings.AutoMode; buttonScreenAuto.Text = Properties.Strings.AutoMode;
buttonMiniled.Text = Properties.Strings.ToggleMiniled; buttonMiniled.Text = Properties.Strings.Multizone;
buttonKeyboardColor.Text = Properties.Strings.Color; buttonKeyboardColor.Text = Properties.Strings.Color;
buttonKeyboard.Text = Properties.Strings.Extra; buttonKeyboard.Text = Properties.Strings.Extra;
@@ -1538,7 +1538,17 @@ namespace GHelper
string[] tokill = { "EADesktop", "RadeonSoftware", "epicgameslauncher", "nvdisplay.container", "nvcontainer", "nvcplui" }; string[] tokill = { "EADesktop", "RadeonSoftware", "epicgameslauncher", "nvdisplay.container", "nvcontainer", "nvcplui" };
foreach (string kill in tokill) foreach (string kill in tokill)
foreach (var process in Process.GetProcessesByName(kill)) process.Kill(); foreach (var process in Process.GetProcessesByName(kill))
{
try
{
process.Kill();
Logger.WriteLine($"Stopped: {process.ProcessName}");
} catch (Exception ex)
{
Logger.WriteLine($"Failed to stop: {process.ProcessName} {ex.Message}");
}
}
if (AppConfig.isConfig("kill_gpu_apps") && HardwareControl.GpuControl is not null && HardwareControl.GpuControl.IsNvidia) if (AppConfig.isConfig("kill_gpu_apps") && HardwareControl.GpuControl is not null && HardwareControl.GpuControl.IsNvidia)
{ {