Make low battery warning values configureable per mouse

This commit is contained in:
IceStormNG
2023-09-02 00:53:00 +02:00
parent ce128adc4f
commit e7eb7fab8a
2 changed files with 16 additions and 0 deletions

View File

@@ -602,6 +602,12 @@ namespace GHelper
labelLowBatteryWarningValue.Visible = false; labelLowBatteryWarningValue.Visible = false;
sliderLowBatteryWarning.Visible = false; sliderLowBatteryWarning.Visible = false;
} }
else
{
sliderLowBatteryWarning.Min = 0;
sliderLowBatteryWarning.Step = mouse.LowBatteryWarningStep();
sliderLowBatteryWarning.Max = mouse.LowBatteryWarningMax();
}
if (!mouse.HasAutoPowerOff() && !mouse.HasLowBatteryWarning()) if (!mouse.HasAutoPowerOff() && !mouse.HasLowBatteryWarning())
{ {

View File

@@ -445,6 +445,16 @@ namespace GHelper.Peripherals.Mouse
return false; return false;
} }
public virtual int LowBatteryWarningStep()
{
return 10;
}
public virtual int LowBatteryWarningMax()
{
return 50;
}
public virtual bool HasLowBatteryWarning() public virtual bool HasLowBatteryWarning()
{ {
return false; return false;