PPT for 2021 model

This commit is contained in:
seerge
2023-03-02 19:17:10 +01:00
parent 6a71a64c96
commit ed579f25d6
3 changed files with 12 additions and 19 deletions

View File

@@ -749,18 +749,12 @@ namespace GHelper
public void SetBatteryChargeLimit(int limit = 100)
{
if (limit < 50 || limit > 100) limit = 100;
if (limit < 40 || limit > 100) return;
labelBatteryTitle.Text = "Battery Charge Limit: " + limit.ToString() + "%";
trackBattery.Value = limit;
try
{
Program.wmi.DeviceSet(ASUSWmi.BatteryLimit, limit);
}
catch
{
Debug.WriteLine("Can't set battery charge limit");
}
Program.wmi.DeviceSet(ASUSWmi.BatteryLimit, limit);
Program.config.setConfig("charge_limit", limit);
}