mirror of
https://github.com/jkocon/g-helper.git
synced 2026-02-23 13:00:52 +01:00
Only show battery percentage when the mouse has a battery.
This commit is contained in:
@@ -1135,11 +1135,19 @@ namespace GHelper
|
|||||||
Button b = buttons[i];
|
Button b = buttons[i];
|
||||||
|
|
||||||
if (m.IsDeviceReady)
|
if (m.IsDeviceReady)
|
||||||
|
{
|
||||||
|
if (m.HasBattery())
|
||||||
{
|
{
|
||||||
b.Text = m.GetDisplayName() + "\n" + m.Battery + "%"
|
b.Text = m.GetDisplayName() + "\n" + m.Battery + "%"
|
||||||
+ (m.Charging ? "(" + Properties.Strings.Charging + ")" : "");
|
+ (m.Charging ? "(" + Properties.Strings.Charging + ")" : "");
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
{
|
||||||
|
b.Text = m.GetDisplayName();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
else
|
||||||
{
|
{
|
||||||
//Mouse is either not connected or in standby
|
//Mouse is either not connected or in standby
|
||||||
b.Text = m.GetDisplayName() + "\n(" + Properties.Strings.NotConnected + ")";
|
b.Text = m.GetDisplayName() + "\n(" + Properties.Strings.NotConnected + ")";
|
||||||
|
|||||||
Reference in New Issue
Block a user