Add support for battery monitoring (#612)

Thanks to @EMN-CSharp.
This commit is contained in:
EMN-CSharp
2022-02-07 17:05:36 +01:00
committed by GitHub
parent 0ed564e7c6
commit 5152b435fc
19 changed files with 844 additions and 149 deletions
+7
View File
@@ -50,6 +50,7 @@ namespace LibreHardwareMonitor.UI
private readonly UserOption _readHddSensors;
private readonly UserOption _readNicSensors;
private readonly UserOption _readPsuSensors;
private readonly UserOption _readBatterySensors;
private readonly UserOption _showGadget;
private UserRadioGroup _plotLocation;
@@ -262,6 +263,12 @@ namespace LibreHardwareMonitor.UI
_computer.IsPsuEnabled = _readPsuSensors.Value;
};
_readBatterySensors = new UserOption("batteryMenuItem", true, batteryMenuItem, _settings);
_readBatterySensors.Changed += delegate
{
_computer.IsBatteryEnabled = _readBatterySensors.Value;
};
_showGadget = new UserOption("gadgetMenuItem", false, gadgetMenuItem, _settings);
_showGadget.Changed += delegate
{