mirror of
https://github.com/jkocon/g-helper.git
synced 2026-02-23 13:00:52 +01:00
Adds support for Gladius III Wireless (P706_Wireless). Renamed the other Gladius III (Wireless Aimpoint) to differentiate them. Fixes a crashbug that can occurs when opening the
This commit is contained in:
@@ -196,7 +196,7 @@ namespace GHelper
|
|||||||
}
|
}
|
||||||
|
|
||||||
mouse.SetProfile(comboProfile.SelectedIndex);
|
mouse.SetProfile(comboProfile.SelectedIndex);
|
||||||
Task task = Task.Run((Action)RefreshMouseData);
|
RefreshMouseData();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void ComboBoxPollingRate_DropDownClosed(object? sender, EventArgs e)
|
private void ComboBoxPollingRate_DropDownClosed(object? sender, EventArgs e)
|
||||||
@@ -408,13 +408,13 @@ namespace GHelper
|
|||||||
|
|
||||||
private void Mouse_Disconnect(object? sender, EventArgs e)
|
private void Mouse_Disconnect(object? sender, EventArgs e)
|
||||||
{
|
{
|
||||||
|
if (Disposing || IsDisposed)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
//Mouse disconnected. Bye bye.
|
//Mouse disconnected. Bye bye.
|
||||||
this.Invoke(delegate
|
this.Invoke(delegate
|
||||||
{
|
{
|
||||||
if (Disposing || IsDisposed)
|
|
||||||
{
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
this.Close();
|
this.Close();
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -428,18 +428,17 @@ namespace GHelper
|
|||||||
if (!mouse.IsDeviceReady)
|
if (!mouse.IsDeviceReady)
|
||||||
{
|
{
|
||||||
Logger.WriteLine(mouse.GetDisplayName() + " (GUI): Mouse is not ready. Closing view.");
|
Logger.WriteLine(mouse.GetDisplayName() + " (GUI): Mouse is not ready. Closing view.");
|
||||||
this.Invoke(delegate
|
Mouse_Disconnect(this, EventArgs.Empty);
|
||||||
{
|
|
||||||
this.Close();
|
|
||||||
});
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
this.Invoke(delegate
|
if (Disposing || IsDisposed)
|
||||||
{
|
{
|
||||||
VisualizeMouseSettings();
|
return;
|
||||||
VisualizeBatteryState();
|
}
|
||||||
});
|
|
||||||
|
VisualizeMouseSettings();
|
||||||
|
VisualizeBatteryState();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void InitMouseCapabilities()
|
private void InitMouseCapabilities()
|
||||||
@@ -821,7 +820,7 @@ namespace GHelper
|
|||||||
|
|
||||||
private void ButtonSync_Click(object sender, EventArgs e)
|
private void ButtonSync_Click(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
Task task = Task.Run((Action)RefreshMouseData);
|
RefreshMouseData();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
91
app/Peripherals/Mouse/Models/GladiusIII.cs
Normal file
91
app/Peripherals/Mouse/Models/GladiusIII.cs
Normal file
@@ -0,0 +1,91 @@
|
|||||||
|
namespace GHelper.Peripherals.Mouse.Models
|
||||||
|
{
|
||||||
|
//P706_Wireless
|
||||||
|
public class GladiusIII : AsusMouse
|
||||||
|
{
|
||||||
|
public GladiusIII() : base(0x0B05, 0x197F, "mi_00", true)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
protected GladiusIII(ushort vendorId, bool wireless) : base(0x0B05, vendorId, "mi_00", wireless)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
public override int DPIProfileCount()
|
||||||
|
{
|
||||||
|
return 4;
|
||||||
|
}
|
||||||
|
|
||||||
|
public override string GetDisplayName()
|
||||||
|
{
|
||||||
|
return "ROG Gladius III (Wireless)";
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public override PollingRate[] SupportedPollingrates()
|
||||||
|
{
|
||||||
|
return new PollingRate[] {
|
||||||
|
PollingRate.PR125Hz,
|
||||||
|
PollingRate.PR250Hz,
|
||||||
|
PollingRate.PR500Hz,
|
||||||
|
PollingRate.PR1000Hz
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
public override int ProfileCount()
|
||||||
|
{
|
||||||
|
return 5;
|
||||||
|
}
|
||||||
|
public override int MaxDPI()
|
||||||
|
{
|
||||||
|
return 26_000;
|
||||||
|
}
|
||||||
|
|
||||||
|
public override bool HasDebounceSetting()
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
public override bool HasLiftOffSetting()
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
public override bool HasRGB()
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
public override LightingZone[] SupportedLightingZones()
|
||||||
|
{
|
||||||
|
return new LightingZone[] { LightingZone.Logo, LightingZone.Scrollwheel, LightingZone.Underglow };
|
||||||
|
}
|
||||||
|
|
||||||
|
public override bool HasAutoPowerOff()
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
public override bool HasAngleSnapping()
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
public override bool HasLowBatteryWarning()
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public class GladiusIIIWired : GladiusIII
|
||||||
|
{
|
||||||
|
public GladiusIIIWired() : base(0x197d, false)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
public override string GetDisplayName()
|
||||||
|
{
|
||||||
|
return "ROG Gladius III (Wired)";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,5 +1,6 @@
|
|||||||
namespace GHelper.Peripherals.Mouse.Models
|
namespace GHelper.Peripherals.Mouse.Models
|
||||||
{
|
{
|
||||||
|
//P711
|
||||||
public class GladiusIIIAimpoint : AsusMouse
|
public class GladiusIIIAimpoint : AsusMouse
|
||||||
{
|
{
|
||||||
public GladiusIIIAimpoint() : base(0x0B05, 0x1A70, "mi_00", true)
|
public GladiusIIIAimpoint() : base(0x0B05, 0x1A70, "mi_00", true)
|
||||||
@@ -17,7 +18,7 @@
|
|||||||
|
|
||||||
public override string GetDisplayName()
|
public override string GetDisplayName()
|
||||||
{
|
{
|
||||||
return "ROG Gladius III (Wireless)";
|
return "ROG Gladius III Aimpoint (Wireless)";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -99,7 +100,7 @@
|
|||||||
|
|
||||||
public override string GetDisplayName()
|
public override string GetDisplayName()
|
||||||
{
|
{
|
||||||
return "ROG Gladius III (Wired)";
|
return "ROG Gladius III Aimpoint (Wired)";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -192,6 +192,8 @@ namespace GHelper.Peripherals
|
|||||||
DetectMouse(new TUFM4Wirelss());
|
DetectMouse(new TUFM4Wirelss());
|
||||||
DetectMouse(new StrixImpactIIWireless());
|
DetectMouse(new StrixImpactIIWireless());
|
||||||
DetectMouse(new StrixImpactIIWirelessWired());
|
DetectMouse(new StrixImpactIIWirelessWired());
|
||||||
|
DetectMouse(new GladiusIII());
|
||||||
|
DetectMouse(new GladiusIIIWired());
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void DetectMouse(AsusMouse am)
|
public static void DetectMouse(AsusMouse am)
|
||||||
|
|||||||
Reference in New Issue
Block a user