Disable the button if the mouse is not ready yet.

This commit is contained in:
IceStormNG
2023-07-23 17:54:37 +02:00
parent 117ffd0f62
commit e825612396

View File

@@ -1094,11 +1094,13 @@ namespace GHelper
{ {
b.Text = m.GetDisplayName() + "\n" + m.Battery + "%" b.Text = m.GetDisplayName() + "\n" + m.Battery + "%"
+ (m.Charging ? "(" + Properties.Strings.Charging + ")" : ""); + (m.Charging ? "(" + Properties.Strings.Charging + ")" : "");
b.Enabled = true;
} }
else 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 + ")";
b.Enabled = false;
} }
switch (m.DeviceType()) switch (m.DeviceType())