Save backlight levels per battery / power

This commit is contained in:
Serge
2023-06-02 12:57:09 +02:00
parent b97a06eb56
commit 4f6db4ae0a
5 changed files with 143 additions and 136 deletions

View File

@@ -181,6 +181,13 @@ namespace GHelper
CheckForUpdatesAsync();
});
Activated += SettingsForm_Activated;
}
private void SettingsForm_Activated(object? sender, EventArgs e)
{
if (fans != null && fans.Text != "") fans.BringToFront();
}
protected override void WndProc(ref Message m)
@@ -1279,15 +1286,7 @@ namespace GHelper
public void AutoKeyboard()
{
AsusUSB.Init();
int backlight = AppConfig.getConfig("keyboard_brightness");
if (AppConfig.isConfig("keyboard_auto") && SystemInformation.PowerStatus.PowerLineStatus != PowerLineStatus.Online)
AsusUSB.ApplyBrightness(0);
else
AsusUSB.ApplyBrightness(backlight);
InputDispatcher.SetBacklightAuto();
}
public void AutoPerformance()