mirror of
https://github.com/jkocon/g-helper.git
synced 2026-02-23 13:00:52 +01:00
Make low battery warning values configureable per mouse
This commit is contained in:
@@ -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())
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -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;
|
||||||
|
|||||||
Reference in New Issue
Block a user