mirror of
https://github.com/jkocon/g-helper.git
synced 2026-02-23 13:00:52 +01:00
It's fine
This commit is contained in:
@@ -207,11 +207,13 @@ namespace GHelper
|
||||
|
||||
private void Fans_FormClosing(object? sender, FormClosingEventArgs e)
|
||||
{
|
||||
|
||||
/*
|
||||
if (e.CloseReason == CloseReason.UserClosing)
|
||||
{
|
||||
e.Cancel = true;
|
||||
Hide();
|
||||
}
|
||||
}*/
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -15,7 +15,6 @@ public static class HardwareMonitor
|
||||
public static string? gpuFan;
|
||||
public static string? midFan;
|
||||
|
||||
//public static List<int> gpuUsage = new List<int>();
|
||||
public static int? gpuUse;
|
||||
|
||||
public static int GetFanMax()
|
||||
@@ -78,9 +77,10 @@ public static class HardwareMonitor
|
||||
|
||||
if (cpuTemp < 0) try
|
||||
{
|
||||
var ct = new PerformanceCounter("Thermal Zone Information", "Temperature", @"\_TZ.THRM", true);
|
||||
cpuTemp = ct.NextValue() - 273;
|
||||
ct.Dispose();
|
||||
using (var ct = new PerformanceCounter("Thermal Zone Information", "Temperature", @"\_TZ.THRM", true))
|
||||
{
|
||||
cpuTemp = ct.NextValue() - 273;
|
||||
}
|
||||
}
|
||||
catch
|
||||
{
|
||||
@@ -102,17 +102,12 @@ public static class HardwareMonitor
|
||||
if (gpuTemp is null || gpuTemp < 0)
|
||||
gpuTemp = Program.wmi.DeviceGet(ASUSWmi.Temp_GPU);
|
||||
|
||||
/*
|
||||
gpuUsage.Add(GetGpuUse());
|
||||
if (gpuUsage.Count > 3) gpuUsage.RemoveAt(0);
|
||||
*/
|
||||
|
||||
try
|
||||
{
|
||||
var cb = new PerformanceCounter("Power Meter", "Power", "Power Meter (0)", true);
|
||||
batteryDischarge = cb.NextValue() / 1000;
|
||||
cb.Dispose();
|
||||
|
||||
using (var cb = new PerformanceCounter("Power Meter", "Power", "Power Meter (0)", true))
|
||||
{
|
||||
batteryDischarge = cb.NextValue() / 1000;
|
||||
}
|
||||
}
|
||||
catch
|
||||
{
|
||||
|
||||
@@ -206,7 +206,7 @@
|
||||
<value>..\Resources\icons8-speed-48.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="everything-is-fine-itsfine" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\everything-is-fine-itsfine.gif;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
<value>..\Resources\itsfine.jpg;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="icons8-help-64" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\icons8-help-64.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 220 KiB |
BIN
app/Resources/itsfine.jpg
Normal file
BIN
app/Resources/itsfine.jpg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 18 KiB |
@@ -560,7 +560,7 @@ namespace GHelper
|
||||
|
||||
if (fans.Visible)
|
||||
{
|
||||
fans.Hide();
|
||||
fans.Close();
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -917,7 +917,7 @@ namespace GHelper
|
||||
if (cpuResult != 1 || gpuResult != 1)
|
||||
{
|
||||
int mode = Program.config.getConfig("performance_mode");
|
||||
Logger.WriteLine("Driver rejected fan curve, resetting mode to " + mode);
|
||||
Logger.WriteLine("ASUS BIOS rejected fan curve, resetting mode to " + mode);
|
||||
Program.wmi.DeviceSet(ASUSWmi.PerformanceMode, mode, "PerformanceMode");
|
||||
}
|
||||
else customFans = true;
|
||||
|
||||
Reference in New Issue
Block a user