Battery Health UI changes

This commit is contained in:
Serge
2023-07-20 18:08:11 +02:00
parent 2c0fdb7773
commit 1e89039b02
5 changed files with 224 additions and 245 deletions

View File

@@ -1,7 +1,4 @@
using GHelper.Helpers;
using System.Diagnostics;
namespace GHelper.Battery
namespace GHelper.Battery
{
internal class BatteryControl
{
@@ -13,18 +10,8 @@ namespace GHelper.Battery
if (limit < 40 || limit > 100) return;
Program.settingsForm.VisualiseBattery(limit);
Program.acpi.DeviceSet(AsusACPI.BatteryLimit, limit, "BatteryLimit");
try
{
OptimizationService.SetChargeLimit(limit);
}
catch (Exception ex)
{
Debug.WriteLine(ex);
}
AppConfig.Set("charge_limit", limit);
}