mirror of
https://github.com/jkocon/g-helper.git
synced 2026-02-23 13:00:52 +01:00
Compare commits
26 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
5701a287aa | ||
|
|
1968b6487c | ||
|
|
95103108f2 | ||
|
|
defb0790e5 | ||
|
|
9da45b43ea | ||
|
|
32a20c3cce | ||
|
|
763337aedd | ||
|
|
f1b51a726b | ||
|
|
a085615398 | ||
|
|
d32a3452f9 | ||
|
|
433022b65d | ||
|
|
460f921836 | ||
|
|
1e2620c484 | ||
|
|
e774f704dd | ||
|
|
aa327f563f | ||
|
|
b9de97ecf4 | ||
|
|
5d7af9bdcd | ||
|
|
c2ca761d99 | ||
|
|
e480ee6f12 | ||
|
|
393cb3300c | ||
|
|
ee90fe4a3d | ||
|
|
a0628ef368 | ||
|
|
701a7d99c4 | ||
|
|
667d365992 | ||
|
|
6232fb1cfb | ||
|
|
a92924840b |
13
.github/workflows/release.yml
vendored
13
.github/workflows/release.yml
vendored
@@ -3,6 +3,8 @@ name: Release
|
||||
on:
|
||||
release:
|
||||
types: [ published ]
|
||||
workflow_dispatch:
|
||||
|
||||
|
||||
permissions:
|
||||
contents: write
|
||||
@@ -20,9 +22,18 @@ jobs:
|
||||
- name: Publish
|
||||
run: |
|
||||
dotnet publish app/GHelper.sln --configuration Release --runtime win-x64 -p:PublishSingleFile=true --no-self-contained
|
||||
powershell Compress-Archive app/bin/x64/Release/net7.0-windows/win-x64/publish/* GHelper.zip
|
||||
powershell Compress-Archive app/bin/x64/Release/net7.0-windows/win-x64/publish/* GHelper-${{ github.sha }}.zip
|
||||
|
||||
- name: Upload
|
||||
if: github.event_name != 'workflow_dispatch'
|
||||
env:
|
||||
GH_TOKEN: ${{ github.token }}
|
||||
run: |
|
||||
gh release upload ${{ github.ref_name }} GHelper.zip
|
||||
|
||||
- name: Artifact
|
||||
if: github.event_name == 'workflow_dispatch'
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: GHelper-release-${{ github.sha }}
|
||||
path: GHelper-*.zip
|
||||
|
||||
@@ -9,6 +9,7 @@ public static class AppConfig
|
||||
private static string configFile;
|
||||
|
||||
private static string? _model;
|
||||
private static string? _modelShort;
|
||||
private static string? _bios;
|
||||
|
||||
private static Dictionary<string, object> config = new Dictionary<string, object>();
|
||||
@@ -73,7 +74,7 @@ public static class AppConfig
|
||||
|
||||
public static (string, string) GetBiosAndModel()
|
||||
{
|
||||
if (_bios is not null && _model is not null) return (_bios, _model);
|
||||
if (_bios is not null && _modelShort is not null) return (_bios, _modelShort);
|
||||
|
||||
using (ManagementObjectSearcher objSearcher = new ManagementObjectSearcher(@"SELECT * FROM Win32_BIOS"))
|
||||
{
|
||||
@@ -85,16 +86,16 @@ public static class AppConfig
|
||||
string[] results = obj["SMBIOSBIOSVersion"].ToString().Split(".");
|
||||
if (results.Length > 1)
|
||||
{
|
||||
_model = results[0];
|
||||
_modelShort = results[0];
|
||||
_bios = results[1];
|
||||
}
|
||||
else
|
||||
{
|
||||
_model = obj["SMBIOSBIOSVersion"].ToString();
|
||||
_modelShort = obj["SMBIOSBIOSVersion"].ToString();
|
||||
}
|
||||
}
|
||||
|
||||
return (_bios, _model);
|
||||
return (_bios, _modelShort);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -327,7 +328,7 @@ public static class AppConfig
|
||||
// Devices with bugged bios command to change brightness
|
||||
public static bool SwappedBrightness()
|
||||
{
|
||||
return ContainsModel("FA506IH") || ContainsModel("FX506LU") || ContainsModel("FX506IC");
|
||||
return ContainsModel("FA506IH") || ContainsModel("FX506LU") || ContainsModel("FX506IC") || ContainsModel("FX506LH");
|
||||
}
|
||||
|
||||
|
||||
@@ -344,7 +345,7 @@ public static class AppConfig
|
||||
|
||||
public static bool IsSingleColor()
|
||||
{
|
||||
return ContainsModel("GA401");
|
||||
return ContainsModel("GA401") || ContainsModel("FX517Z") || ContainsModel("X13");
|
||||
}
|
||||
|
||||
public static bool IsStrix()
|
||||
@@ -352,6 +353,11 @@ public static class AppConfig
|
||||
return ContainsModel("Strix") || ContainsModel("Scar");
|
||||
}
|
||||
|
||||
public static bool IsStrixLimitedRGB()
|
||||
{
|
||||
return ContainsModel("G614JV") || ContainsModel("G614JZ");
|
||||
}
|
||||
|
||||
public static bool IsZ13()
|
||||
{
|
||||
return ContainsModel("Z13");
|
||||
|
||||
@@ -121,7 +121,7 @@ namespace GHelper
|
||||
{
|
||||
timer.Elapsed += Timer_Elapsed;
|
||||
|
||||
isSingleColor = AppConfig.ContainsModel("GA401") || AppConfig.ContainsModel("X13"); // Mono Color
|
||||
isSingleColor = AppConfig.IsSingleColor(); // Mono Color
|
||||
|
||||
var device = GetDevice(AURA_HID_ID);
|
||||
if (device is not null && (device.Attributes.Version == 22 || device.Attributes.Version == 23) && (AppConfig.ContainsModel("GA402X") || AppConfig.ContainsModel("GA402N"))) isSingleColor = true;
|
||||
@@ -211,7 +211,7 @@ namespace GHelper
|
||||
return _modes;
|
||||
}
|
||||
|
||||
if (AppConfig.IsStrix())
|
||||
if (AppConfig.IsStrix() && !AppConfig.IsStrixLimitedRGB())
|
||||
{
|
||||
return _modesStrix;
|
||||
}
|
||||
|
||||
33
app/Extra.cs
33
app/Extra.cs
@@ -276,22 +276,27 @@ namespace GHelper
|
||||
checkSleepBar.Visible = false;
|
||||
checkShutdownBar.Visible = false;
|
||||
|
||||
if (!AppConfig.IsZ13())
|
||||
{
|
||||
labelBacklightLid.Visible = false;
|
||||
checkAwakeLid.Visible = false;
|
||||
checkBootLid.Visible = false;
|
||||
checkSleepLid.Visible = false;
|
||||
checkShutdownLid.Visible = false;
|
||||
}
|
||||
|
||||
labelBacklightLogo.Visible = false;
|
||||
checkAwakeLogo.Visible = false;
|
||||
checkBootLogo.Visible = false;
|
||||
checkSleepLogo.Visible = false;
|
||||
checkShutdownLogo.Visible = false;
|
||||
if ((!AppConfig.IsStrix() && !AppConfig.IsZ13()) || AppConfig.IsStrixLimitedRGB())
|
||||
{
|
||||
labelBacklightLid.Visible = false;
|
||||
checkAwakeLid.Visible = false;
|
||||
checkBootLid.Visible = false;
|
||||
checkSleepLid.Visible = false;
|
||||
checkShutdownLid.Visible = false;
|
||||
|
||||
labelBacklightKeyboard.Visible = false;
|
||||
}
|
||||
labelBacklightLogo.Visible = false;
|
||||
checkAwakeLogo.Visible = false;
|
||||
checkBootLogo.Visible = false;
|
||||
checkSleepLogo.Visible = false;
|
||||
checkShutdownLogo.Visible = false;
|
||||
|
||||
}
|
||||
|
||||
if (!AppConfig.IsStrix() && !AppConfig.IsZ13())
|
||||
{
|
||||
labelBacklightKeyboard.Visible = false;
|
||||
}
|
||||
|
||||
//checkAutoToggleClamshellMode.Visible = clamshellControl.IsExternalDisplayConnected();
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||
<ProduceReferenceAssembly>False</ProduceReferenceAssembly>
|
||||
<AllowUnsafeBlocks>True</AllowUnsafeBlocks>
|
||||
<AssemblyVersion>0.128</AssemblyVersion>
|
||||
<AssemblyVersion>0.129</AssemblyVersion>
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
|
||||
|
||||
209
app/Peripherals/Mouse/Models/Chakram.cs
Normal file
209
app/Peripherals/Mouse/Models/Chakram.cs
Normal file
@@ -0,0 +1,209 @@
|
||||
|
||||
namespace GHelper.Peripherals.Mouse.Models
|
||||
{
|
||||
//P704
|
||||
public class Chakram : AsusMouse
|
||||
{
|
||||
public Chakram() : base(0x0B05, 0x18E5, "mi_00", true) {
|
||||
|
||||
}
|
||||
|
||||
protected Chakram(ushort vendorId, bool wireless) : base(0x0B05, vendorId, "mi_00", wireless)
|
||||
{
|
||||
}
|
||||
public override int DPIProfileCount()
|
||||
{
|
||||
return 4;
|
||||
}
|
||||
|
||||
public override string GetDisplayName()
|
||||
{
|
||||
return "ROG Chakram (Wireless)";
|
||||
}
|
||||
|
||||
public override PollingRate[] SupportedPollingrates()
|
||||
{
|
||||
return new PollingRate[] {
|
||||
PollingRate.PR125Hz,
|
||||
PollingRate.PR250Hz,
|
||||
PollingRate.PR500Hz,
|
||||
PollingRate.PR1000Hz
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
public override int ProfileCount()
|
||||
{
|
||||
return 3;
|
||||
}
|
||||
public override int MaxDPI()
|
||||
{
|
||||
return 16_000;
|
||||
}
|
||||
|
||||
public override bool HasDebounceSetting()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
public override bool HasLiftOffSetting()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
public override int DPIIncrements()
|
||||
{
|
||||
return 100;
|
||||
}
|
||||
|
||||
public override bool HasRGB()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
public override int MaxBrightness()
|
||||
{
|
||||
return 4;
|
||||
}
|
||||
|
||||
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 HasAngleTuning()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
public override bool HasLowBatteryWarning()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
public override int LowBatteryWarningStep()
|
||||
{
|
||||
return 25;
|
||||
}
|
||||
|
||||
public override int LowBatteryWarningMax()
|
||||
{
|
||||
return 100;
|
||||
}
|
||||
|
||||
protected override int ParseBattery(byte[] packet)
|
||||
{
|
||||
return base.ParseBattery(packet) * 25;
|
||||
}
|
||||
protected override int ParseLowBatteryWarning(byte[] packet)
|
||||
{
|
||||
return base.ParseLowBatteryWarning(packet) * 25;
|
||||
}
|
||||
protected override byte[] GetUpdateEnergySettingsPacket(int lowBatteryWarning, PowerOffSetting powerOff)
|
||||
{
|
||||
return base.GetUpdateEnergySettingsPacket(lowBatteryWarning / 25, powerOff);
|
||||
}
|
||||
protected override byte[] GetReadLightingModePacket(LightingZone zone)
|
||||
{
|
||||
return new byte[] { 0x00, 0x12, 0x03, 0x00 };
|
||||
}
|
||||
|
||||
protected LightingSetting? ParseLightingSetting(byte[] packet, LightingZone zone)
|
||||
{
|
||||
if (packet[1] != 0x12 || packet[2] != 0x03)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
int offset = 5 + (((int)zone) * 5);
|
||||
|
||||
LightingSetting setting = new LightingSetting();
|
||||
|
||||
setting.LightingMode = LightingModeForIndex(packet[offset + 0]);
|
||||
setting.Brightness = packet[offset + 1];
|
||||
|
||||
setting.RGBColor = Color.FromArgb(packet[offset + 2], packet[offset + 3], packet[offset + 4]);
|
||||
|
||||
setting.AnimationDirection = SupportsAnimationDirection(setting.LightingMode)
|
||||
? (AnimationDirection)packet[21]
|
||||
: AnimationDirection.Clockwise;
|
||||
|
||||
if (setting.AnimationDirection != AnimationDirection.Clockwise
|
||||
&& setting.AnimationDirection != AnimationDirection.CounterClockwise)
|
||||
{
|
||||
setting.AnimationDirection = AnimationDirection.Clockwise;
|
||||
}
|
||||
|
||||
setting.RandomColor = SupportsRandomColor(setting.LightingMode) && packet[22] == 0x01;
|
||||
setting.AnimationSpeed = SupportsAnimationSpeed(setting.LightingMode)
|
||||
? (AnimationSpeed)packet[23]
|
||||
: AnimationSpeed.Medium;
|
||||
|
||||
//If the mouse reports an out of range value, which it does when the current setting has no speed option, chose medium as default
|
||||
if (setting.AnimationSpeed != AnimationSpeed.Fast
|
||||
&& setting.AnimationSpeed != AnimationSpeed.Medium
|
||||
&& setting.AnimationSpeed != AnimationSpeed.Slow)
|
||||
{
|
||||
setting.AnimationSpeed = AnimationSpeed.Medium;
|
||||
}
|
||||
return setting;
|
||||
}
|
||||
|
||||
public override void ReadLightingSetting()
|
||||
{
|
||||
if (!HasRGB())
|
||||
{
|
||||
return;
|
||||
}
|
||||
//Mouse sends all lighting zones in one response
|
||||
//21: Direction
|
||||
//22: Random
|
||||
//23: Speed
|
||||
// 20 21 22 23
|
||||
//00 12 03 00 00 [03 04 00 00 ff] [03 04 00 00 ff] [03 04 00 00 ff] 00 04 00 00
|
||||
//00 12 03 00 00 [05 02 ff 00 ff] [05 02 ff 00 ff] [05 02 ff 00 ff] 00 01 01 00
|
||||
//00 12 03 00 00 [03 01 00 00 ff] [03 01 00 00 ff] [03 01 00 00 ff] 00 01 00 01
|
||||
byte[]? response = WriteForResponse(GetReadLightingModePacket(LightingZone.All));
|
||||
if (response is null) return;
|
||||
|
||||
LightingZone[] lz = SupportedLightingZones();
|
||||
for (int i = 0; i < lz.Length; ++i)
|
||||
{
|
||||
LightingSetting? ls = ParseLightingSetting(response, lz[i]);
|
||||
if (ls is null)
|
||||
{
|
||||
Logger.WriteLine(GetDisplayName() + ": Failed to read RGB Setting for Zone " + lz[i].ToString());
|
||||
continue;
|
||||
}
|
||||
|
||||
Logger.WriteLine(GetDisplayName() + ": Read RGB Setting for Zone " + lz[i].ToString() + ": " + ls.ToString());
|
||||
LightingSetting[i] = ls;
|
||||
}
|
||||
}
|
||||
|
||||
public override bool CanChangeDPIProfile()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public class ChakramWired : Chakram
|
||||
{
|
||||
public ChakramWired() : base(0x18E3, false)
|
||||
{
|
||||
}
|
||||
|
||||
public override string GetDisplayName()
|
||||
{
|
||||
return "ROG Chakram (Wired)";
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -66,6 +66,15 @@
|
||||
return new LightingZone[] { LightingZone.Logo };
|
||||
}
|
||||
|
||||
public override bool IsLightingModeSupported(LightingMode lightingMode)
|
||||
{
|
||||
return lightingMode == LightingMode.Static
|
||||
|| lightingMode == LightingMode.Breathing
|
||||
|| lightingMode == LightingMode.ColorCycle
|
||||
|| lightingMode == LightingMode.BatteryState
|
||||
|| lightingMode == LightingMode.React;
|
||||
}
|
||||
|
||||
public override bool HasAutoPowerOff()
|
||||
{
|
||||
return true;
|
||||
|
||||
170
app/Peripherals/Mouse/Models/TUFM5.cs
Normal file
170
app/Peripherals/Mouse/Models/TUFM5.cs
Normal file
@@ -0,0 +1,170 @@
|
||||
namespace GHelper.Peripherals.Mouse.Models
|
||||
{
|
||||
//P304
|
||||
public class TUFM5 : AsusMouse
|
||||
{
|
||||
public TUFM5() : base(0x0B05, 0x1898, "mi_02", false)
|
||||
{
|
||||
}
|
||||
|
||||
public override int DPIProfileCount()
|
||||
{
|
||||
return 2;
|
||||
}
|
||||
|
||||
public override string GetDisplayName()
|
||||
{
|
||||
return "TUF GAMING M5";
|
||||
}
|
||||
|
||||
|
||||
public override PollingRate[] SupportedPollingrates()
|
||||
{
|
||||
return new PollingRate[] {
|
||||
PollingRate.PR125Hz,
|
||||
PollingRate.PR250Hz,
|
||||
PollingRate.PR500Hz,
|
||||
PollingRate.PR1000Hz
|
||||
};
|
||||
}
|
||||
|
||||
//Mouse has React mapped to 0x03 instead of 0x04 like other mice
|
||||
protected override byte IndexForLightingMode(LightingMode lightingMode)
|
||||
{
|
||||
if (lightingMode == LightingMode.React)
|
||||
{
|
||||
return 0x03;
|
||||
}
|
||||
return ((byte)lightingMode);
|
||||
}
|
||||
|
||||
//Mouse has React mapped to 0x03 instead of 0x04 like other mice
|
||||
protected override LightingMode LightingModeForIndex(byte lightingMode)
|
||||
{
|
||||
if (lightingMode == 0x03)
|
||||
{
|
||||
return LightingMode.React;
|
||||
}
|
||||
return base.LightingModeForIndex(lightingMode);
|
||||
|
||||
}
|
||||
|
||||
public override int ProfileCount()
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
public override int MaxDPI()
|
||||
{
|
||||
return 6_200;
|
||||
}
|
||||
public override bool HasBattery()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
public override bool HasLiftOffSetting()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
public override LightingZone[] SupportedLightingZones()
|
||||
{
|
||||
return new LightingZone[] { LightingZone.Logo };
|
||||
}
|
||||
|
||||
public override bool HasRGB()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
public override bool HasAngleSnapping()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
public override int DPIIncrements()
|
||||
{
|
||||
return 100;
|
||||
}
|
||||
|
||||
public override bool CanChangeDPIProfile()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
public override bool HasDebounceSetting()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
public override int MaxBrightness()
|
||||
{
|
||||
return 4;
|
||||
}
|
||||
|
||||
public override bool IsLightingModeSupported(LightingMode lightingMode)
|
||||
{
|
||||
return lightingMode == LightingMode.Static
|
||||
|| lightingMode == LightingMode.Breathing
|
||||
|| lightingMode == LightingMode.ColorCycle
|
||||
|| lightingMode == LightingMode.React;
|
||||
}
|
||||
|
||||
|
||||
protected override byte[] GetUpdatePollingRatePacket(PollingRate pollingRate)
|
||||
{
|
||||
return new byte[] { reportId, 0x51, 0x31, 0x02, 0x00, (byte)pollingRate };
|
||||
}
|
||||
|
||||
protected override byte[] GetUpdateAngleSnappingPacket(bool angleSnapping)
|
||||
{
|
||||
return new byte[] { reportId, 0x51, 0x31, 0x04, 0x00, (byte)(angleSnapping ? 0x01 : 0x00) };
|
||||
}
|
||||
|
||||
protected override PollingRate ParsePollingRate(byte[] packet)
|
||||
{
|
||||
|
||||
if (packet[1] == 0x12 && packet[2] == 0x04 && packet[3] == 0x00)
|
||||
{
|
||||
return (PollingRate)packet[9];
|
||||
}
|
||||
|
||||
return PollingRate.PR125Hz;
|
||||
}
|
||||
|
||||
protected override bool ParseAngleSnapping(byte[] packet)
|
||||
{
|
||||
|
||||
if (packet[1] == 0x12 && packet[2] == 0x04 && packet[3] == 0x00)
|
||||
{
|
||||
return packet[13] == 0x01;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
protected override byte[] GetUpdateDebouncePacket(DebounceTime debounce)
|
||||
{
|
||||
return new byte[] { reportId, 0x51, 0x31, 0x03, 0x00, ((byte)debounce) };
|
||||
}
|
||||
|
||||
protected override DebounceTime ParseDebounce(byte[] packet)
|
||||
{
|
||||
if (packet[1] != 0x12 || packet[2] != 0x04 || packet[3] != 0x00)
|
||||
{
|
||||
return DebounceTime.MS12;
|
||||
}
|
||||
|
||||
if (packet[11] < 0x02)
|
||||
{
|
||||
return DebounceTime.MS12;
|
||||
}
|
||||
|
||||
if (packet[11] > 0x07)
|
||||
{
|
||||
return DebounceTime.MS32;
|
||||
}
|
||||
|
||||
return (DebounceTime)packet[11];
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -200,11 +200,14 @@ namespace GHelper.Peripherals
|
||||
DetectMouse(new HarpeAceAimLabEditionWired());
|
||||
DetectMouse(new HarpeAceAimLabEditionOmni());
|
||||
DetectMouse(new TUFM3());
|
||||
DetectMouse(new TUFM5());
|
||||
DetectMouse(new KerisWirelssAimpoint());
|
||||
DetectMouse(new KerisWirelssAimpointWired());
|
||||
DetectMouse(new PugioII());
|
||||
DetectMouse(new PugioIIWired());
|
||||
DetectMouse(new StrixImpactII());
|
||||
DetectMouse(new Chakram());
|
||||
DetectMouse(new ChakramWired());
|
||||
}
|
||||
|
||||
public static void DetectMouse(AsusMouse am)
|
||||
|
||||
@@ -213,13 +213,13 @@ namespace GHelper
|
||||
SetAutoModes(true);
|
||||
}
|
||||
|
||||
public static void SettingsToggle(string action = "", bool checkForFocus = true)
|
||||
public static void SettingsToggle(string action = "", bool checkForFocus = true, bool trayClick = false)
|
||||
{
|
||||
if (settingsForm.Visible)
|
||||
{
|
||||
// If helper window is not on top, this just focuses on the app again
|
||||
// Pressing the ghelper button again will hide the app
|
||||
if (checkForFocus && !settingsForm.HasAnyFocus())
|
||||
if (checkForFocus && !settingsForm.HasAnyFocus(trayClick))
|
||||
{
|
||||
settingsForm.ShowAll();
|
||||
}
|
||||
@@ -275,7 +275,7 @@ namespace GHelper
|
||||
static void TrayIcon_MouseClick(object? sender, MouseEventArgs e)
|
||||
{
|
||||
if (e.Button == MouseButtons.Left)
|
||||
SettingsToggle();
|
||||
SettingsToggle(trayClick: true);
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -253,7 +253,7 @@
|
||||
<value>Stan baterii</value>
|
||||
</data>
|
||||
<data name="BatteryLimitFull" xml:space="preserve">
|
||||
<value>One time charge to 100%</value>
|
||||
<value>Jednorazowo naładuj do 100%</value>
|
||||
</data>
|
||||
<data name="BiosAndDriverUpdates" xml:space="preserve">
|
||||
<value>Aktualizacje BIOS i sterowników</value>
|
||||
|
||||
@@ -235,7 +235,7 @@
|
||||
<value>Pil tasarrufu için 60Hz kullanılır ve şarja takıldığında eski haline getirir</value>
|
||||
</data>
|
||||
<data name="Awake" xml:space="preserve">
|
||||
<value>Uyanık</value>
|
||||
<value>Uyanırken</value>
|
||||
</data>
|
||||
<data name="BacklightTimeout" xml:space="preserve">
|
||||
<value>Pildeyken klavye ışığının kapanma süresi</value>
|
||||
@@ -253,7 +253,7 @@
|
||||
<value>Pil Sağlığı</value>
|
||||
</data>
|
||||
<data name="BatteryLimitFull" xml:space="preserve">
|
||||
<value>One time charge to 100%</value>
|
||||
<value>Bir seferlik %100 şarj etme</value>
|
||||
</data>
|
||||
<data name="BiosAndDriverUpdates" xml:space="preserve">
|
||||
<value>BIOS ve Sürücü Güncellemeleri</value>
|
||||
@@ -298,7 +298,7 @@
|
||||
<value>Ekran overdrive özelliğini devre dışı bırak</value>
|
||||
</data>
|
||||
<data name="Discharging" xml:space="preserve">
|
||||
<value>Pil boşalıyor</value>
|
||||
<value>Şarj azalıyor</value>
|
||||
</data>
|
||||
<data name="DownloadUpdate" xml:space="preserve">
|
||||
<value>İndir</value>
|
||||
@@ -396,7 +396,7 @@ Yine de devam etmek istiyor musunuz?</value>
|
||||
<value>Yüksek</value>
|
||||
</data>
|
||||
<data name="KeyBindings" xml:space="preserve">
|
||||
<value>Tuş Bağlantıları</value>
|
||||
<value>Tuş Atamaları</value>
|
||||
</data>
|
||||
<data name="Keyboard" xml:space="preserve">
|
||||
<value>Klavye</value>
|
||||
@@ -432,7 +432,7 @@ Yine de devam etmek istiyor musunuz?</value>
|
||||
<value>Ses Görselleştirici</value>
|
||||
</data>
|
||||
<data name="MatrixBanner" xml:space="preserve">
|
||||
<value>Matrix Banner</value>
|
||||
<value>Binary Banner</value>
|
||||
</data>
|
||||
<data name="MatrixBright" xml:space="preserve">
|
||||
<value>Parlak</value>
|
||||
@@ -567,10 +567,10 @@ Yine de devam etmek istiyor musunuz?</value>
|
||||
<value>Screenpad Parlaklığını Azalt</value>
|
||||
</data>
|
||||
<data name="ScreenPadUp" xml:space="preserve">
|
||||
<value>Screenpad Parlaklığını Arttır</value>
|
||||
<value>Screenpad Parlaklığını Artır</value>
|
||||
</data>
|
||||
<data name="Shutdown" xml:space="preserve">
|
||||
<value>Kapalı</value>
|
||||
<value>Kapatma</value>
|
||||
</data>
|
||||
<data name="Silent" xml:space="preserve">
|
||||
<value>Sessiz</value>
|
||||
@@ -603,7 +603,7 @@ Yine de devam etmek istiyor musunuz?</value>
|
||||
<value>Hizmetler Durduruluyor</value>
|
||||
</data>
|
||||
<data name="ToggleAura" xml:space="preserve">
|
||||
<value>Aura'yı Değiştir</value>
|
||||
<value>Aura'yı Kullan</value>
|
||||
</data>
|
||||
<data name="ToggleClamshellMode" xml:space="preserve">
|
||||
<value>Otomatik Clamshell Modunu Aç</value>
|
||||
@@ -648,7 +648,7 @@ Yine de devam etmek istiyor musunuz?</value>
|
||||
<value>Sesi Kapat</value>
|
||||
</data>
|
||||
<data name="VolumeUp" xml:space="preserve">
|
||||
<value>Sesi Arttır</value>
|
||||
<value>Sesi Artır</value>
|
||||
</data>
|
||||
<data name="WindowTop" xml:space="preserve">
|
||||
<value>Uygulama penceresini her zaman en üstte tut</value>
|
||||
|
||||
@@ -118,7 +118,7 @@
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<data name="Acceleration" xml:space="preserve">
|
||||
<value>Acceleration</value>
|
||||
<value>加速</value>
|
||||
</data>
|
||||
<data name="ACPIError" xml:space="preserve">
|
||||
<value>无法连接到ASUS ACPI。 没有它应用程序将无法运行。 请尝试安装Asus System Control Interface驱动。</value>
|
||||
@@ -223,7 +223,7 @@
|
||||
<value>滚轮</value>
|
||||
</data>
|
||||
<data name="AuraZoneUnderglow" xml:space="preserve">
|
||||
<value>Underglow</value>
|
||||
<value>底灯</value>
|
||||
</data>
|
||||
<data name="AutoApply" xml:space="preserve">
|
||||
<value>自动应用</value>
|
||||
@@ -253,7 +253,7 @@
|
||||
<value>电池健康</value>
|
||||
</data>
|
||||
<data name="BatteryLimitFull" xml:space="preserve">
|
||||
<value>One time charge to 100%</value>
|
||||
<value>一次性充电至 100%</value>
|
||||
</data>
|
||||
<data name="BiosAndDriverUpdates" xml:space="preserve">
|
||||
<value>BIOS 和驱动程序更新</value>
|
||||
@@ -274,7 +274,7 @@
|
||||
<value>提高亮度</value>
|
||||
</data>
|
||||
<data name="Calibrate" xml:space="preserve">
|
||||
<value>Calibrate</value>
|
||||
<value>校准</value>
|
||||
</data>
|
||||
<data name="Charging" xml:space="preserve">
|
||||
<value>充电中</value>
|
||||
@@ -289,7 +289,7 @@
|
||||
<value>自定义设置</value>
|
||||
</data>
|
||||
<data name="Deceleration" xml:space="preserve">
|
||||
<value>Deceleration</value>
|
||||
<value>减速</value>
|
||||
</data>
|
||||
<data name="Default" xml:space="preserve">
|
||||
<value>默认</value>
|
||||
@@ -313,12 +313,12 @@
|
||||
<value>集显模式</value>
|
||||
</data>
|
||||
<data name="EnableOptimusText" xml:space="preserve">
|
||||
<value>若未在nVIDIA控制面板的混合显示模式中设置为Optimus,关闭独立显卡可能会导致亮度控制在系统重启前都不可用。
|
||||
<value>NVIDIA 控制面板中的显示模式未设置为 Optimus 时,通过集显模式禁用独立显卡可能会使亮度控制出现问题,直到下次重启后才能恢复。
|
||||
|
||||
确定还要继续吗?</value>
|
||||
</data>
|
||||
<data name="EnableOptimusTitle" xml:space="preserve">
|
||||
<value>NVIDIA 显示模式未设置为自动切换</value>
|
||||
<value>NVIDIA 显示模式未设置为 Optimus</value>
|
||||
</data>
|
||||
<data name="EnergySettings" xml:space="preserve">
|
||||
<value>电源设置</value>
|
||||
@@ -342,7 +342,7 @@
|
||||
<value>GPU 风扇配置文件</value>
|
||||
</data>
|
||||
<data name="FanProfileMid" xml:space="preserve">
|
||||
<value>中等风扇配置</value>
|
||||
<value>Mid 风扇配置文件</value>
|
||||
</data>
|
||||
<data name="FanProfiles" xml:space="preserve">
|
||||
<value>风扇配置</value>
|
||||
@@ -465,7 +465,7 @@
|
||||
<value>分钟</value>
|
||||
</data>
|
||||
<data name="Minutes" xml:space="preserve">
|
||||
<value>分组</value>
|
||||
<value>分钟</value>
|
||||
</data>
|
||||
<data name="MouseAngleSnapping" xml:space="preserve">
|
||||
<value>角度校正</value>
|
||||
@@ -477,7 +477,7 @@
|
||||
<value>按键响应</value>
|
||||
</data>
|
||||
<data name="MouseLiftOffDistance" xml:space="preserve">
|
||||
<value>静默高度</value>
|
||||
<value>响应高度</value>
|
||||
</data>
|
||||
<data name="MouseLowBatteryWarning" xml:space="preserve">
|
||||
<value>低于该电量时警告</value>
|
||||
|
||||
@@ -882,14 +882,14 @@ namespace GHelper
|
||||
/// Check if any of fans, keyboard, update, or itself has focus
|
||||
/// </summary>
|
||||
/// <returns>Focus state</returns>
|
||||
public bool HasAnyFocus()
|
||||
public bool HasAnyFocus(bool lostFocusCheck = false)
|
||||
{
|
||||
return (fansForm != null && fansForm.ContainsFocus) ||
|
||||
(extraForm != null && extraForm.ContainsFocus) ||
|
||||
(updatesForm != null && updatesForm.ContainsFocus) ||
|
||||
(matrixForm != null && matrixForm.ContainsFocus) ||
|
||||
this.ContainsFocus ||
|
||||
Math.Abs(DateTimeOffset.Now.ToUnixTimeMilliseconds() - lastLostFocus) < 300;
|
||||
(lostFocusCheck && Math.Abs(DateTimeOffset.Now.ToUnixTimeMilliseconds() - lastLostFocus) < 300);
|
||||
}
|
||||
|
||||
private void SettingsForm_FormClosing(object? sender, FormClosingEventArgs e)
|
||||
|
||||
Reference in New Issue
Block a user