mirror of
https://github.com/jkocon/g-helper.git
synced 2026-02-23 13:00:52 +01:00
Cleanup
This commit is contained in:
@@ -146,7 +146,7 @@ public class ASUSWmi
|
||||
byte[] args = new byte[8];
|
||||
BitConverter.GetBytes((uint)DeviceID).CopyTo(args, 0);
|
||||
byte[] status = CallMethod(DSTS, args);
|
||||
return BitConverter.ToInt32(status, 0)-65536;
|
||||
return BitConverter.ToInt32(status, 0) - 65536;
|
||||
}
|
||||
|
||||
public byte[] DeviceGetBuffer(uint DeviceID, int Status = 0)
|
||||
|
||||
@@ -33,7 +33,6 @@
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="hidlibrary" Version="3.3.40" />
|
||||
<PackageReference Include="Microsoft.Toolkit.Uwp.Notifications" Version="7.1.3" />
|
||||
<PackageReference Include="LibreHardwareMonitorLib" Version="0.9.1" />
|
||||
<PackageReference Include="TaskScheduler" Version="2.10.1" />
|
||||
</ItemGroup>
|
||||
|
||||
12
Settings.cs
12
Settings.cs
@@ -375,12 +375,6 @@ namespace GHelper
|
||||
buttonBalanced.FlatAppearance.BorderSize = buttonInactive;
|
||||
buttonTurbo.FlatAppearance.BorderSize = buttonInactive;
|
||||
|
||||
string[] mode = new string[]{
|
||||
"Balanced",
|
||||
"Turbo",
|
||||
"Silent"
|
||||
};
|
||||
|
||||
switch (PerformanceMode)
|
||||
{
|
||||
case ASUSWmi.PerformanceSilent:
|
||||
@@ -398,13 +392,13 @@ namespace GHelper
|
||||
break;
|
||||
}
|
||||
|
||||
string notifTitle = "Performance Mode Changed";
|
||||
string notifBody = "Switched to: " + mode[PerformanceMode];
|
||||
|
||||
Program.config.setConfig("performance_mode", PerformanceMode);
|
||||
try
|
||||
{
|
||||
Program.wmi.DeviceSet(ASUSWmi.PerformanceMode, PerformanceMode);
|
||||
} catch
|
||||
}
|
||||
catch
|
||||
{
|
||||
labelPerf.Text = "Performance Mode: not supported";
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user