mirror of
https://github.com/jkocon/g-helper.git
synced 2026-02-23 13:00:52 +01:00
Toggle one time 100% charge limit https://github.com/seerge/g-helper/issues/1390
This commit is contained in:
@@ -3,6 +3,12 @@
|
|||||||
internal class BatteryControl
|
internal class BatteryControl
|
||||||
{
|
{
|
||||||
|
|
||||||
|
public static void ToggleBatteryLimitFull()
|
||||||
|
{
|
||||||
|
if (AppConfig.Is("charge_full")) SetBatteryChargeLimit();
|
||||||
|
else SetBatteryLimitFull();
|
||||||
|
}
|
||||||
|
|
||||||
public static void SetBatteryLimitFull()
|
public static void SetBatteryLimitFull()
|
||||||
{
|
{
|
||||||
AppConfig.Set("charge_full", 1);
|
AppConfig.Set("charge_full", 1);
|
||||||
|
|||||||
@@ -214,7 +214,7 @@ namespace GHelper
|
|||||||
|
|
||||||
private void ButtonBatteryFull_Click(object? sender, EventArgs e)
|
private void ButtonBatteryFull_Click(object? sender, EventArgs e)
|
||||||
{
|
{
|
||||||
BatteryControl.SetBatteryLimitFull();
|
BatteryControl.ToggleBatteryLimitFull();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void ButtonBatteryFull_MouseLeave(object? sender, EventArgs e)
|
private void ButtonBatteryFull_MouseLeave(object? sender, EventArgs e)
|
||||||
|
|||||||
Reference in New Issue
Block a user