Compare commits

...

163 Commits

Author SHA1 Message Date
Serge
8280ce1d1c Aura tweaks 2024-01-09 10:55:55 +01:00
Serge
ea73de4414 Aura tweaks for G513QM https://github.com/seerge/g-helper/issues/1868 2024-01-08 13:49:51 +01:00
Serge
adcba8d35e Keybindings tweak for FA506IV https://github.com/seerge/g-helper/issues/1869 2024-01-08 10:27:03 +01:00
Serge
baf52720bb Fix to prevent config corruption 2024-01-07 21:38:53 +01:00
Serge
8a2eec7823 Config fix 2024-01-07 18:27:43 +01:00
Serge
2be3b831ef UI tweaks https://github.com/seerge/g-helper/issues/533 2024-01-06 19:51:18 +01:00
Serge
3785454200 Reduced Ambient mode refresh rate for M16 2024-01-06 13:38:39 +01:00
Serge
48c6f4f659 Merge branch 'main' of https://github.com/seerge/g-helper 2024-01-05 11:38:23 +01:00
Serge
605c699651 UI error on wrong mouse DPI https://github.com/seerge/g-helper/issues/1850#issuecomment-1878456736 2024-01-05 11:38:21 +01:00
Serge
096366de4e New translations strings.resx (Chinese Simplified) (#1849) 2024-01-05 11:34:46 +01:00
Serge
797381463d Update README.md 2024-01-04 18:30:00 +01:00
IceStormNG
69ec75ff79 Support for Gladius II and Gladius II Origin (#1848) 2024-01-04 18:15:52 +01:00
Serge
dca954a244 Merge branch 'main' of https://github.com/seerge/g-helper 2024-01-04 11:31:57 +01:00
Serge
440632c209 Version Bump 2024-01-04 11:27:30 +01:00
Serge
274c2ef706 New translations strings.resx (Polish) (#1840) 2024-01-03 16:24:54 +01:00
Serge
acb7a45139 Enable GPU on shutdown for all Nvidia devices https://github.com/seerge/g-helper/issues/1841 2024-01-03 15:54:10 +01:00
Serge
9d5c70b4c3 Merge branch 'main' of https://github.com/seerge/g-helper 2024-01-03 13:01:32 +01:00
Serge
cc682412cc HDR check for miniled toggle https://github.com/seerge/g-helper/issues/1822#issuecomment-1874770630 2024-01-03 13:01:30 +01:00
Serge
ee89a2308b New translations strings.resx (Spanish) (#1837) 2024-01-02 22:12:48 +01:00
Serge
1578c7a18e Version Bump 2024-01-02 17:42:32 +01:00
Serge
b50f4f11a4 UI Tweaks 2024-01-02 17:29:59 +01:00
Serge
ad5b3e33c4 UI Tweaks 2024-01-02 17:19:01 +01:00
Serge
5de44067bc Dynamic Boost fallback https://github.com/seerge/g-helper/issues/1834 2024-01-01 22:13:42 +01:00
Serge
82f76b8d80 Accessibility improvements https://github.com/seerge/g-helper/issues/1830 2024-01-01 20:05:44 +01:00
Serge
0823e8efa2 Merge branch 'main' of https://github.com/seerge/g-helper 2024-01-01 16:26:19 +01:00
Serge
7bd0d3594a UI tweaks 2024-01-01 16:26:17 +01:00
Serge
573b56f6b6 New Crowdin updates (#1824)
* New translations strings.resx (French)

* New translations strings.resx (Turkish)

* New translations strings.resx (Romanian)

* New translations strings.resx (Spanish)

* New translations strings.resx (German)

* New translations strings.resx (Hungarian)

* New translations strings.resx (Italian)

* New translations strings.resx (Korean)

* New translations strings.resx (Lithuanian)

* New translations strings.resx (Polish)

* New translations strings.resx (Portuguese)

* New translations strings.resx (Ukrainian)

* New translations strings.resx (Chinese Simplified)

* New translations strings.resx (Chinese Traditional)

* New translations strings.resx (Vietnamese)

* New translations strings.resx (Portuguese, Brazilian)

* New translations strings.resx (Indonesian)
2024-01-01 11:16:25 +01:00
Serge
aabead161a Multizone toggle toast https://github.com/seerge/g-helper/issues/1822 2023-12-31 15:35:00 +01:00
Serge
5602d385f6 Translations for accessible labels https://github.com/seerge/g-helper/issues/1823 2023-12-31 15:28:22 +01:00
Serge
537123acda Ultimate mode for G834 https://github.com/seerge/g-helper/discussions/1816 2023-12-30 11:18:17 +01:00
Serge
05de5e5e18 Updates 2023-12-29 16:42:05 +01:00
Serge
9e805bfa97 Merge branch 'main' of https://github.com/seerge/g-helper 2023-12-29 12:43:25 +01:00
Serge
19ebb52a5e Dynamic boost https://github.com/seerge/g-helper/issues/1786 https://github.com/seerge/g-helper/issues/1806 2023-12-29 12:43:23 +01:00
Serge
8462042a57 Update README.md 2023-12-28 20:36:31 +01:00
Serge
442bd23e4a Update README.md 2023-12-28 16:50:27 +01:00
Serge
dd51add9f1 Update README.md 2023-12-28 16:49:31 +01:00
Serge
c2a025c808 Update README.md 2023-12-28 16:48:15 +01:00
Serge
86767983a4 Update README.md 2023-12-28 16:45:17 +01:00
Serge
e625a5d1f2 Update README.md 2023-12-28 16:44:34 +01:00
Serge
69aefd2ee7 Update README.md 2023-12-28 16:44:22 +01:00
Serge
c68534cbcb Update README.md 2023-12-28 16:42:44 +01:00
Serge
93b1aa6426 Update README.md 2023-12-28 15:10:50 +01:00
Serge
68ad2b6625 Update README.md 2023-12-28 13:44:07 +01:00
Serge
e484d7a1d6 Update README.md 2023-12-28 13:35:55 +01:00
Serge
ac447e33e2 Update README.md 2023-12-28 13:22:07 +01:00
Serge
60cb46ea4f Update README.md 2023-12-28 13:18:28 +01:00
Serge
6283d84d5d Update README.md 2023-12-28 12:57:51 +01:00
Serge
13b90c7e06 Update README.md 2023-12-28 12:57:41 +01:00
Serge
1c1d9e68e7 Update bug_report.md 2023-12-28 12:46:00 +01:00
Serge
6fbcde2303 Homepage cleanup 2023-12-28 12:39:48 +01:00
Serge
20f2d51d20 Update README.md 2023-12-28 12:37:46 +01:00
Serge
359459477a Update README.md 2023-12-28 12:32:50 +01:00
Serge
23f911767e Update README.md 2023-12-28 12:27:12 +01:00
Serge
cab5084f28 Update README.md 2023-12-28 12:10:35 +01:00
Serge
e4d528b0eb Update README.md 2023-12-28 12:08:00 +01:00
Serge
10643e9899 Update README.md 2023-12-28 12:05:33 +01:00
Serge
35e19fa257 Update README.md 2023-12-28 12:01:07 +01:00
Serge
c0f46c600e Update README.md 2023-12-28 11:52:25 +01:00
Serge
4cf90ac10d Delete docs/power-user.md 2023-12-28 11:46:09 +01:00
Serge
cdb89216e0 Create power-user.md 2023-12-28 11:38:07 +01:00
Serge
c207f03657 Update README.md 2023-12-27 20:16:36 +01:00
Serge
8f5c23fbe5 New translations strings.resx (Turkish) (#1796) 2023-12-26 21:16:17 +01:00
Serge
2bd6791edf Merge branch 'main' of https://github.com/seerge/g-helper 2023-12-26 15:10:38 +01:00
Serge
d7a8d51375 Aura Tweaks 2023-12-26 15:10:36 +01:00
Serge
165f5e4829 Ambient mode fix for GA503 https://github.com/seerge/g-helper/issues/1790 2023-12-26 12:43:23 +01:00
Serge
be79246c21 Update README.md 2023-12-25 12:41:32 +01:00
Serge
3afe0d8e1a Autoupdate tweaks 2023-12-24 16:14:06 +01:00
Serge
4f3ae43c3b AutoUpdate improvements 2023-12-24 15:50:30 +01:00
Serge
2bc4151c7a Merge branch 'main' of https://github.com/seerge/g-helper 2023-12-23 11:45:49 +01:00
Serge
4624fabd33 Configurable ambient refresh rate 2023-12-23 11:45:47 +01:00
Serge
00afbb7810 New translations strings.resx (French) (#1775) 2023-12-23 11:25:23 +01:00
Serge
f94d76aab9 Version bump 2023-12-22 21:51:57 +01:00
Serge
57b896d05a Aura GPU mode simplification 2023-12-22 21:41:53 +01:00
Serge
27b78ba1cf Aura tweaks 2023-12-22 20:53:51 +01:00
Serge
eea453b3c4 Airplane mode hotkey https://github.com/seerge/g-helper/issues/1765 2023-12-21 13:20:26 +01:00
Serge
e5dd7f54af Aura tweaks 2023-12-20 12:00:03 +01:00
Serge
149ed7f81b Aura improvements 2023-12-20 11:48:10 +01:00
Serge
88d4e5d3a8 Aura fixes 2023-12-20 01:48:55 +01:00
Serge
77f8d34d13 Version bump 2023-12-20 00:34:25 +01:00
Serge
02aef7f2f3 Merge branch 'main' of https://github.com/seerge/g-helper 2023-12-20 00:23:40 +01:00
Serge
edc434a890 Imprpved ambient mode 2023-12-20 00:23:38 +01:00
Serge
b337a226da Update README.md 2023-12-19 15:30:20 +01:00
Serge
03e6e69fb4 Update README.md 2023-12-19 15:24:20 +01:00
Serge
f852fbadb6 Update README.md 2023-12-19 15:23:18 +01:00
Serge
b95d676285 Merge branch 'main' of https://github.com/seerge/g-helper 2023-12-19 12:31:25 +01:00
Serge
fafa27b2a0 Enable GPU on shutdown option for FA506 https://github.com/seerge/g-helper/issues/1755#issuecomment-1862465947 2023-12-19 12:31:23 +01:00
IceStormNG
e7ceb2feaf Support for ASUS TuF M3 Gen II (#1762)
* Added support for ROG Chakram Core (P511)

* Add support for the TUF M3 Gen II
2023-12-19 12:29:12 +01:00
Serge
62f280b0b9 Custom aura colors will be saved to config 2023-12-18 17:39:58 +01:00
Serge
d179fe6b86 UI Fix 2023-12-18 17:23:23 +01:00
Serge
291909749a Merge branch 'main' of https://github.com/seerge/g-helper 2023-12-18 16:46:58 +01:00
Serge
883ec1828b Version bump 2023-12-18 16:46:55 +01:00
Serge
55a75f79b0 New Crowdin updates (#1752)
* New translations strings.resx (French)

* New translations strings.resx (French)
2023-12-17 19:34:02 +01:00
Serge
5c6deb902c Added G15 2022 to the list of devies with enabling GPU on shutdown https://github.com/seerge/g-helper/issues/1755 2023-12-17 19:33:46 +01:00
Serge
fac634b460 Hide SPPT for unsupported models https://github.com/seerge/g-helper/issues/1753 2023-12-17 19:30:47 +01:00
Serge
41e74084ac Chart temps tooltip rounding tweak https://github.com/seerge/g-helper/discussions/1744 2023-12-17 11:18:47 +01:00
Serge
bc8084f3e0 Matrix brightness control via hotkeys https://github.com/seerge/g-helper/issues/1733 2023-12-16 11:07:56 +01:00
Serge
e8d0030444 Merge branch 'main' of https://github.com/seerge/g-helper 2023-12-16 10:40:48 +01:00
Serge
4cf4e2eb66 Hide unsupported power sliders https://github.com/seerge/g-helper/discussions/1747 2023-12-16 10:40:46 +01:00
Serge
ece5606c27 Update README.md 2023-12-15 18:45:18 +01:00
Serge
e115e0f82b Ambient mode fix https://github.com/seerge/g-helper/issues/1641#issuecomment-1855661443 2023-12-15 18:44:54 +01:00
Serge
d6fe7f41c1 Remove unsupported RGB colors from GA502IU https://github.com/seerge/g-helper/issues/1740 2023-12-13 23:06:28 +01:00
Serge
4a0e9d2e41 Separated PL1/PL2 and SPL/SPPT https://github.com/seerge/g-helper/issues/1729 2023-12-13 17:16:44 +01:00
Serge
e59142140c Ambient tweaks 2023-12-13 16:46:37 +01:00
Serge
8ca043de7d Ambient mode improvements 2023-12-13 16:42:29 +01:00
Serge
9543cd400e Ultimate mode fix for FA617N 2023-12-13 12:48:22 +01:00
Serge
b808aa7619 Issue https://github.com/seerge/g-helper/issues/1734 2023-12-13 11:20:58 +01:00
Serge
6ca63bb9c5 Removed unsupported backlight options for ARCNM https://github.com/seerge/g-helper/issues/1728 2023-12-12 12:29:26 +01:00
Serge
4ba11f1f9f Version bump 2023-12-11 13:53:12 +01:00
Serge
382080922d White only keyboard detection for GA503R https://github.com/seerge/g-helper/issues/1714 2023-12-09 17:51:12 +01:00
Serge
d439d20c13 Merge branch 'main' of https://github.com/seerge/g-helper 2023-12-09 14:42:16 +01:00
Serge
24199b3036 Matrix Contrast slider https://github.com/seerge/g-helper/issues/1713 2023-12-09 14:42:14 +01:00
Serge
d45ce23d9a Update README.md 2023-12-09 00:58:00 +01:00
Serge
34ae2e536d New Crowdin updates (#1708)
* New translations strings.resx (French)

* New translations strings.resx (Chinese Simplified)
2023-12-08 13:44:42 +01:00
Serge
64e3b3bbd6 Added M16 2023 to the list of devices that support GPU enabling on shutdown https://www.reddit.com/r/ZephyrusM16/comments/18chukc/comment/kcd132i/?context=3 2023-12-07 14:31:05 +01:00
Serge
f3fd590be4 Version Bump 2023-12-07 11:25:08 +01:00
Serge
6a9d47a61d UI Fixes https://github.com/seerge/g-helper/issues/1701 2023-12-07 11:12:57 +01:00
Serge
3848ef9a43 New translations strings.resx (Polish) (#1692) 2023-12-03 21:55:37 +01:00
Serge
84c7fdb3bf Removed ACPI requirement for non-asus models https://github.com/seerge/g-helper/issues/1676 2023-12-03 12:17:07 +01:00
Serge
013c83fd60 Merge branch 'main' of https://github.com/seerge/g-helper 2023-12-03 11:23:17 +01:00
Serge
b31ed8338a G14 2023 white-only / RGB detection https://github.com/seerge/g-helper/issues/1686 2023-12-03 11:23:14 +01:00
Serge
6f9eb1e9c5 New translations strings.resx (Spanish) (#1681) 2023-12-01 22:56:15 +01:00
Hamza Rizwan
f19ea5eaf6 Update AppConfig.cs (#1682)
Added "G713RC" to the list of limited Strix RGB models
2023-12-01 22:56:01 +01:00
Serge
0db3665dd2 New Crowdin updates (#1680)
* New translations strings.resx (Portuguese)

* New translations strings.resx (Romanian)

* New translations strings.resx (French)

* New translations strings.resx (Spanish)

* New translations strings.resx (German)

* New translations strings.resx (Hungarian)

* New translations strings.resx (Italian)

* New translations strings.resx (Korean)

* New translations strings.resx (Lithuanian)

* New translations strings.resx (Polish)

* New translations strings.resx (Turkish)

* New translations strings.resx (Ukrainian)

* New translations strings.resx (Chinese Simplified)

* New translations strings.resx (Chinese Traditional)

* New translations strings.resx (Vietnamese)

* New translations strings.resx (Portuguese, Brazilian)

* New translations strings.resx (Indonesian)
2023-12-01 16:52:24 +01:00
Serge
68c17368f0 Version bump 2023-12-01 16:52:13 +01:00
Serge
12a2a147d4 Hide APU memory setting for non-ally models 2023-12-01 16:50:53 +01:00
Serge
1b10be93ed UI fix https://github.com/seerge/g-helper/issues/1669 2023-12-01 16:44:55 +01:00
Serge Samusya
1e29aeda17 APU Mem value fixes 2023-12-01 16:26:07 +01:00
Serge Samusya
32c4f6168c Rog Ally GPU Memory setting 2023-12-01 14:38:50 +01:00
Serge
5d945d6b7c New translations strings.resx (Portuguese) (#1664) 2023-11-28 17:02:59 +01:00
Serge
1c27eee293 Merge branch 'main' of https://github.com/seerge/g-helper 2023-11-27 20:17:52 +01:00
Serge
1efc722f93 Improved single-color keyboard detection for G14 https://github.com/seerge/g-helper/issues/1646 2023-11-27 20:17:50 +01:00
IceStormNG
4a1e585c69 Added support for ROG Chakram Core (P511) (#1662) 2023-11-27 15:10:54 +01:00
Serge
3bab1a271b Moved action block to prevent unnecessary actions on main window toggle https://github.com/seerge/g-helper/pull/1651 2023-11-25 19:53:54 +01:00
Serge
5b2017299c Hotkeys for Eco/Standard modes https://github.com/seerge/g-helper/issues/1637 2023-11-24 10:12:11 +01:00
Serge
f4cc4b4ac5 Added G513QM to the list of models with limited RGB https://github.com/seerge/g-helper/issues/1641 2023-11-23 18:02:27 +01:00
Serge
36d6d6af48 Stirx Numpad fixes https://github.com/seerge/g-helper/pull/1638 2023-11-23 12:28:52 +01:00
David
93d639fc6f fix: ulterior fixes from #1636 (#1638)
* fix: Ambient Mode for 17 inch keyboards

* fix: removed debugging keys, added "skip" for 15inch, refactor

---------

Co-authored-by: Serge <5920850+seerge@users.noreply.github.com>
2023-11-23 12:16:10 +01:00
Serge
1f6a2a9ac5 Enable dGPU on shutdown for X13 2022 https://github.com/seerge/g-helper/discussions/1042#discussioncomment-7646782 2023-11-23 09:42:19 +01:00
David
8bcac73824 fix: Ambient Mode for 17 inch keyboards (#1636) 2023-11-23 09:34:28 +01:00
DLdota
4e46a20eff Ambient 1 zone improve (#1635)
* ....

* Amvietn: improved color for 1-zone
2023-11-22 20:51:11 +01:00
Serge
1d2f1d3bb2 Removed unsupported RGB modes for G513IE https://github.com/seerge/g-helper/issues/1627 2023-11-22 09:58:28 +01:00
Serge
eeaa906749 Aura num-pad buttons mapping 2023-11-21 22:51:05 +01:00
Serge
22bfc77a7a Icon Helper 2023-11-21 13:13:29 +01:00
Serge
267cf6387f Icons cleanup 2023-11-21 13:07:03 +01:00
Siddiqui Abdul Rahman
45e7e5551e setting different icon for taskbar and title bar (#1614)
* setting different icon for taskbar and title bar

* fixing variables
2023-11-21 12:45:54 +01:00
Serge
bb796b8818 Aura init fix 2023-11-21 12:43:10 +01:00
Serge
d9b615ce2d Z13 fix https://github.com/seerge/g-helper/issues/1622 2023-11-20 16:16:38 +01:00
Serge
035c60da2e Version bump 2023-11-20 10:32:47 +01:00
Serge
e096699909 Update README.md 2023-11-20 09:01:40 +01:00
DLdota
bf1ffddf15 Added map for Strix 4-Zone RGB (#1619)
* ....

* Strix 4 Zone RGB
2023-11-20 09:00:22 +01:00
Serge
fad7396c8f Cleanup 2023-11-19 23:20:24 +01:00
Serge
af4a5e8af7 Fix 2023-11-19 21:51:11 +01:00
Serge
3d2be97cf6 Experimental Per-key Aura 2023-11-19 21:49:25 +01:00
Serge
b6fe7c9ddf OpenRGB pey-key Aura implementation 2023-11-19 19:24:59 +01:00
Serge
f2085b836b Aura HID fixes https://github.com/seerge/g-helper/issues/1616 2023-11-19 15:15:19 +01:00
Serge
ccf2ae9eed Asus HID fixes https://github.com/seerge/g-helper/issues/1616 2023-11-19 13:17:07 +01:00
Serge
e4bcc8f66c Removed F12 binding completely 2023-11-18 09:30:03 +01:00
Serge
0f11ffe8f0 AsusHID tweaks 2023-11-17 20:21:54 +01:00
Serge
96cbcbaf7f Version Bump 2023-11-17 17:57:36 +01:00
Serge
0c1ababcf8 Ambient Aura tweaks 2023-11-17 17:56:40 +01:00
Serge
36eae610e8 Triple-key binding fix https://github.com/seerge/g-helper/issues/1608 2023-11-17 17:41:55 +01:00
Serge
69757ff460 Remove unsupported RGB modes for G513RM https://github.com/seerge/g-helper/issues/1603 2023-11-17 11:03:42 +01:00
Serge
744bce1819 Hide icon 2023-11-17 10:48:15 +01:00
68 changed files with 2431 additions and 1059 deletions

View File

@@ -4,11 +4,8 @@ about: Create a report to help us improve
---
## NOTE
Bug reports without clear information or scenario to reproduce and logs from ``%AppData%\GHelper`` will be closed without answer.
Please respect the time of the developer. Thanks.
Bug reports without clear information or scenario to reproduce and logs from ``%AppData%\GHelper`` will be closed without answer. Please respect the time of the developer. Thanks.
**Describe the bug**
A clear and concise description of what the bug is.

View File

@@ -347,7 +347,10 @@ namespace GHelper.AnimeMatrix
int matrixX = AppConfig.Get("matrix_x", 0);
int matrixY = AppConfig.Get("matrix_y", 0);
int matrixZoom = AppConfig.Get("matrix_zoom", 100);
int matrixContrast = AppConfig.Get("matrix_contrast", 100);
int matrixSpeed = AppConfig.Get("matrix_speed", 50);
MatrixRotation rotation = (MatrixRotation)AppConfig.Get("matrix_rotation", 0);
@@ -368,9 +371,9 @@ namespace GHelper.AnimeMatrix
image.SelectActiveFrame(dimension, i);
if (rotation == MatrixRotation.Planar)
device.GenerateFrame(image, matrixZoom, matrixX, matrixY, matrixQuality);
device.GenerateFrame(image, matrixZoom, matrixX, matrixY, matrixQuality, matrixContrast);
else
device.GenerateFrameDiagonal(image, matrixZoom, matrixX, matrixY, matrixQuality);
device.GenerateFrameDiagonal(image, matrixZoom, matrixX, matrixY, matrixQuality, matrixContrast);
device.AddFrame();
}
@@ -385,9 +388,9 @@ namespace GHelper.AnimeMatrix
else
{
if (rotation == MatrixRotation.Planar)
device.GenerateFrame(image, matrixZoom, matrixX, matrixY, matrixQuality);
device.GenerateFrame(image, matrixZoom, matrixX, matrixY, matrixQuality, matrixContrast);
else
device.GenerateFrameDiagonal(image, matrixZoom, matrixX, matrixY, matrixQuality);
device.GenerateFrameDiagonal(image, matrixZoom, matrixX, matrixY, matrixQuality, matrixContrast);
device.Present();
}

View File

@@ -399,21 +399,21 @@ namespace Starlight.AnimeMatrix
}
private void SetBitmapDiagonal(Bitmap bmp, int deltaX = 0, int deltaY = 0)
private void SetBitmapDiagonal(Bitmap bmp, int deltaX = 0, int deltaY = 0, int contrast = 100)
{
for (int y = 0; y < bmp.Height; y++)
{
for (int x = 0; x < bmp.Width; x++)
{
var pixel = bmp.GetPixel(x, y);
var color = (pixel.R + pixel.G + pixel.B) / 3;
var color = Math.Min((pixel.R + pixel.G + pixel.B) * contrast / 300, 255);
if (color > 20)
SetLedDiagonal(x, y, (byte)color, deltaX + (FullRows / 2) + 1, deltaY - (FullRows / 2) - 1);
}
}
}
private void SetBitmapLinear(Bitmap bmp)
private void SetBitmapLinear(Bitmap bmp, int contrast = 100)
{
for (int y = 0; y < bmp.Height; y++)
{
@@ -421,7 +421,7 @@ namespace Starlight.AnimeMatrix
if (x % 2 == y % 2)
{
var pixel = bmp.GetPixel(x, y);
var color = (pixel.R + pixel.G + pixel.B) / 3;
var color = Math.Min((pixel.R + pixel.G + pixel.B) * contrast / 300, 255);
if (color > 20)
SetLedPlanar(x / 2, y, (byte)color);
}
@@ -468,7 +468,7 @@ namespace Starlight.AnimeMatrix
Present();
}
public void GenerateFrame(Image image, float zoom = 100, int panX = 0, int panY = 0, InterpolationMode quality = InterpolationMode.Default)
public void GenerateFrame(Image image, float zoom = 100, int panX = 0, int panY = 0, InterpolationMode quality = InterpolationMode.Default, int contrast = 100)
{
int width = MaxColumns / 2 * 6;
int height = MaxRows;
@@ -495,11 +495,11 @@ namespace Starlight.AnimeMatrix
}
Clear();
SetBitmapLinear(bmp);
SetBitmapLinear(bmp, contrast);
}
}
public void GenerateFrameDiagonal(Image image, float zoom = 100, int panX = 0, int panY = 0, InterpolationMode quality = InterpolationMode.Default)
public void GenerateFrameDiagonal(Image image, float zoom = 100, int panX = 0, int panY = 0, InterpolationMode quality = InterpolationMode.Default, int contrast = 100)
{
int width = MaxRows - FullRows;
int height = MaxRows - FullRows*2;
@@ -523,7 +523,7 @@ namespace Starlight.AnimeMatrix
}
Clear();
SetBitmapDiagonal(bmp, -panX, height + panY);
SetBitmapDiagonal(bmp, -panX, height + panY, contrast);
}
}

View File

@@ -1,5 +1,4 @@
using GHelper.Mode;
using System.Diagnostics;
using System.Management;
using System.Text.Json;
@@ -13,6 +12,7 @@ public static class AppConfig
private static string? _bios;
private static Dictionary<string, object> config = new Dictionary<string, object>();
private static System.Timers.Timer timer = new System.Timers.Timer(1000);
static AppConfig()
{
@@ -24,7 +24,8 @@ public static class AppConfig
if (File.Exists(startupPath + configName))
{
configFile = startupPath + configName;
} else
}
else
{
configFile = appPath + configName;
}
@@ -51,8 +52,39 @@ public static class AppConfig
Init();
}
timer.Elapsed += Timer_Elapsed;
}
private static void Timer_Elapsed(object? sender, System.Timers.ElapsedEventArgs e)
{
timer.Stop();
string jsonString = JsonSerializer.Serialize(config, new JsonSerializerOptions { WriteIndented = true });
var backup = configFile + ".bak";
try
{
File.WriteAllText(backup, jsonString);
}
catch (Exception ex)
{
Logger.WriteLine(ex.ToString());
return;
}
Thread.Sleep(500);
if (File.ReadAllText(backup).Contains("}"))
{
File.Copy(backup, configFile, true);
}
else
{
Logger.WriteLine("Error writing config");
}
}
public static string GetModel()
{
@@ -156,15 +188,7 @@ public static class AppConfig
private static void Write()
{
string jsonString = JsonSerializer.Serialize(config, new JsonSerializerOptions { WriteIndented = true });
try
{
File.WriteAllText(configFile, jsonString);
}
catch (Exception e)
{
Debug.Write(e.ToString());
}
timer.Start();
}
public static void Set(string name, int value)
@@ -328,7 +352,7 @@ public static class AppConfig
// Devices with bugged bios command to change brightness
public static bool SwappedBrightness()
{
return ContainsModel("FA506IH") || ContainsModel("FA506IC") || ContainsModel("FX506LU") || ContainsModel("FX506IC") || ContainsModel("FX506LH");
return ContainsModel("FA506IH") || ContainsModel("FA506IC") || ContainsModel("FX506LU") || ContainsModel("FX506IC") || ContainsModel("FX506LH") || ContainsModel("FA506IV");
}
@@ -345,7 +369,7 @@ public static class AppConfig
public static bool IsSingleColor()
{
return ContainsModel("GA401") || ContainsModel("FX517Z") || ContainsModel("FX516P") || ContainsModel("X13");
return ContainsModel("GA401") || ContainsModel("FX517Z") || ContainsModel("FX516P") || ContainsModel("X13") || IsARCNM() || ContainsModel("GA502IU");
}
public static bool IsStrix()
@@ -355,7 +379,17 @@ public static class AppConfig
public static bool IsStrixLimitedRGB()
{
return ContainsModel("G614JV") || ContainsModel("G614JZ") || ContainsModel("G512LI") || ContainsModel("G513RS");
return ContainsModel("G614JV") || ContainsModel("G614JZ") || ContainsModel("G512LI") || ContainsModel("G513R") || ContainsModel("G713PV") || ContainsModel("G513IE") || ContainsModel("G713RC") || ContainsModel("G513QM");
}
public static bool IsNoDirectRGB()
{
return ContainsModel("GA503");
}
public static bool IsStrixNumpad()
{
return ContainsModel("G713R");
}
public static bool IsZ13()
@@ -373,6 +407,15 @@ public static class AppConfig
return ContainsModel("X13");
}
public static bool DynamicBoost5()
{
return ContainsModel("GZ301ZE");
}
public static bool DynamicBoost15()
{
return ContainsModel("FX507ZC4");
}
public static bool IsAdvantageEdition()
{
@@ -381,7 +424,7 @@ public static class AppConfig
public static bool NoAutoUltimate()
{
return ContainsModel("G614") || ContainsModel("GU604") || ContainsModel("FX507") || ContainsModel("G513");
return ContainsModel("G614") || ContainsModel("GU604") || ContainsModel("FX507") || ContainsModel("G513") || ContainsModel("FA617") || ContainsModel("G834");
}
@@ -399,13 +442,14 @@ public static class AppConfig
public static bool IsFanScale()
{
if (!ContainsModel("GU604")) return false;
if (!ContainsModel("GU604")) return false;
try
{
var (bios, model) = GetBiosAndModel();
return (Int32.Parse(bios) < 312);
} catch
}
catch
{
return false;
}
@@ -421,11 +465,6 @@ public static class AppConfig
return ContainsModel("FX507") || ContainsModel("FX517") || ContainsModel("FX707");
}
public static bool IsGPUFixNeeded()
{
return ContainsModel("GA402X") || ContainsModel("GV302") || ContainsModel("GZ301") || ContainsModel("FX506") || ContainsModel("GU603V") || ContainsModel("GU603Z");
}
public static bool IsGPUFix()
{
return Is("gpu_fix") || (ContainsModel("GA402X") && IsNotFalse("gpu_fix"));
@@ -446,4 +485,8 @@ public static class AppConfig
return ContainsModel("FA507");
}
public static bool IsASUS()
{
return ContainsModel("ROG") || ContainsModel("TUF") || ContainsModel("Vivobook") || ContainsModel("Zenbook");
}
}

View File

@@ -36,7 +36,8 @@ public class AsusACPI
const uint INIT = 0x54494E49;
public const uint UniversalControl = 0x00100021;
public const int Airplane = 0x88;
public const int KB_Light_Up = 0xc4;
public const int KB_Light_Down = 0xc5;
public const int Brightness_Down = 0x10;
@@ -94,6 +95,8 @@ public class AsusACPI
public const int PPT_APUC1 = 0x001200C1; // fPPT (fast boost limit)
public const int PPT_GPUC2 = 0x001200C2; // NVIDIA GPU Temp Target (75.. 87 C)
public const int APU_MEM = 0x000600C1;
public const int TUF_KB_BRIGHTNESS = 0x00050021;
public const int TUF_KB = 0x00100056;
public const int TUF_KB2 = 0x0010005a;
@@ -133,7 +136,7 @@ public class AsusACPI
public const int DefaultCPU = 80;
public const int MinGPUBoost = 5;
public const int MaxGPUBoost = 25;
public static int MaxGPUBoost = 25;
public const int MinGPUTemp = 75;
public const int MaxGPUTemp = 87;
@@ -183,6 +186,7 @@ public class AsusACPI
private static extern bool WaitForSingleObject(IntPtr hHandle, int dwMilliseconds);
private IntPtr eventHandle;
private bool _connected = false;
// still works only with asus optimization service on , if someone knows how to get ACPI events from asus without that - let me know
public void RunListener()
@@ -209,25 +213,40 @@ public class AsusACPI
}
}
public bool IsConnected()
{
return _connected;
}
public AsusACPI()
{
handle = CreateFile(
FILE_NAME,
GENERIC_READ | GENERIC_WRITE,
FILE_SHARE_READ | FILE_SHARE_WRITE,
IntPtr.Zero,
OPEN_EXISTING,
FILE_ATTRIBUTE_NORMAL,
IntPtr.Zero
);
if (handle == new IntPtr(-1))
try
{
throw new Exception("Can't connect to ACPI");
handle = CreateFile(
FILE_NAME,
GENERIC_READ | GENERIC_WRITE,
FILE_SHARE_READ | FILE_SHARE_WRITE,
IntPtr.Zero,
OPEN_EXISTING,
FILE_ATTRIBUTE_NORMAL,
IntPtr.Zero
);
//handle = new IntPtr(-1);
//throw new Exception("ERROR");
_connected = true;
}
catch (Exception ex)
{
Logger.WriteLine($"Can't connect to ACPI: {ex.Message}");
}
if (AppConfig.IsAdvantageEdition())
{
MaxTotal = 250;
}
if (AppConfig.IsAdvantageEdition()) MaxTotal = 250;
if (AppConfig.IsX13())
{
MaxTotal = 75;
@@ -240,6 +259,15 @@ public class AsusACPI
DefaultTotal = 30;
}
if (AppConfig.DynamicBoost5())
{
MaxGPUBoost = 5;
}
if (AppConfig.DynamicBoost15())
{
MaxGPUBoost = 15;
}
}
public void Control(uint dwIoControlCode, byte[] lpInBuffer, byte[] lpOutBuffer)
@@ -387,7 +415,7 @@ public class AsusACPI
byte min = (byte)(curve[8] * 255 / 100);
byte max = (byte)(curve[15] * 255 / 100);
byte[] range = { min, max};
byte[] range = { min, max };
int result;
switch (device)
@@ -419,7 +447,7 @@ public class AsusACPI
// it seems to be a bug, when some old model's bios can go nuts if fan is set to 100%
for (int i = 8; i < curve.Length; i++) curve[i] = (byte)(Math.Max((byte)0, Math.Min((byte)100, curve[i])) * fanScale / 100);
for (int i = 8; i < curve.Length; i++) curve[i] = (byte)(Math.Max((byte)0, Math.Min((byte)100, curve[i])) * fanScale / 100);
switch (device)
{
@@ -522,9 +550,84 @@ public class AsusACPI
public bool IsAllAmdPPT()
{
//return false;
return DeviceGet(PPT_CPUB0) >= 0 && DeviceGet(PPT_GPUC0) < 0;
}
public bool IsNVidiaGPU()
{
return (!IsAllAmdPPT() && Program.acpi.DeviceGet(GPUEco) >= 0 && !AppConfig.IsAlly());
}
public void SetAPUMem(int memory = 4)
{
if (memory < 0 || memory > 8) return;
int mem = 0;
switch (memory)
{
case 0:
mem = 0;
break;
case 1:
mem = 258;
break;
case 2:
mem = 259;
break;
case 3:
mem = 260;
break;
case 4:
mem = 261;
break;
case 5:
mem = 263;
break;
case 6:
mem = 264;
break;
case 7:
mem = 265;
break;
case 8:
mem = 262;
break;
}
Program.acpi.DeviceSet(APU_MEM, mem, "APU Mem");
}
public int GetAPUMem()
{
int memory = Program.acpi.DeviceGet(APU_MEM);
if (memory < 0) return -1;
switch (memory)
{
case 256:
return 0;
case 258:
return 1;
case 259:
return 2;
case 260:
return 3;
case 261:
return 4;
case 262:
return 8;
case 263:
return 5;
case 264:
return 6;
case 265:
return 7;
default:
return 4;
}
}
public void ScanRange()
{
@@ -554,7 +657,7 @@ public class AsusACPI
{
byte[] setting = new byte[6];
setting[0] = (byte)0xb4;
setting[1] = (byte)mode;
setting[2] = color.R;

View File

@@ -863,7 +863,14 @@ namespace GHelper
private void VisualizeCurrentDPIProfile()
{
if (mouse.DpiProfile > mouse.DpiSettings.Count())
{
Logger.WriteLine($"Wrong mouse DPI: {mouse.DpiProfile}");
return;
}
AsusMouseDPI dpi = mouse.DpiSettings[mouse.DpiProfile - 1];
if (dpi is null)
{
return;

View File

@@ -107,6 +107,7 @@ namespace GHelper.AutoUpdate
string exeLocation = Application.ExecutablePath;
string exeDir = Path.GetDirectoryName(exeLocation);
string exeName = Path.GetFileName(exeLocation);
string zipLocation = exeDir + "\\" + zipName;
using (WebClient client = new WebClient())
@@ -114,15 +115,27 @@ namespace GHelper.AutoUpdate
client.DownloadFile(uri, zipLocation);
Logger.WriteLine(requestUri);
Logger.WriteLine(zipLocation);
Logger.WriteLine(exeLocation);
Logger.WriteLine(exeDir);
Logger.WriteLine(zipName);
Logger.WriteLine(exeName);
var cmd = new Process();
cmd.StartInfo.UseShellExecute = false;
cmd.StartInfo.CreateNoWindow = true;
cmd.StartInfo.FileName = "powershell";
cmd.StartInfo.Arguments = $"Start-Sleep -Seconds 1; Expand-Archive {zipLocation} -DestinationPath {exeDir} -Force; Remove-Item {zipLocation} -Force; {exeLocation}";
cmd.Start();
string command = $"Start-Sleep -Seconds 1; $ErrorActionPreference = \"Stop\"; Expand-Archive \"{zipName}\" -DestinationPath . -Force; Remove-Item \"{zipName}\" -Force; \".\\{exeName}\"; ";
Logger.WriteLine(command);
try
{
var cmd = new Process();
cmd.StartInfo.WorkingDirectory = exeDir;
cmd.StartInfo.UseShellExecute = false;
cmd.StartInfo.CreateNoWindow = true;
cmd.StartInfo.FileName = "powershell";
cmd.StartInfo.Arguments = command;
cmd.Start();
}
catch (Exception ex)
{
Logger.WriteLine(ex.Message);
}
Application.Exit();
}

View File

@@ -57,11 +57,12 @@ namespace GHelper.Display
}
public void ToogleMiniled()
public int ToogleMiniled()
{
int miniled = (Program.acpi.DeviceGet(AsusACPI.ScreenMiniled) == 1) ? 0 : 1;
AppConfig.Set("miniled", miniled);
SetScreen(-1, -1, miniled);
return miniled;
}
public void InitScreen()

118
app/Extra.Designer.cs generated
View File

@@ -106,6 +106,7 @@ namespace GHelper
checkAutoToggleClamshellMode = new CheckBox();
checkTopmost = new CheckBox();
checkNoOverdrive = new CheckBox();
checkBootSound = new CheckBox();
checkUSBC = new CheckBox();
checkVariBright = new CheckBox();
checkGpuApps = new CheckBox();
@@ -115,7 +116,10 @@ namespace GHelper
labelHibernateAfter = new Label();
pictureHibernate = new PictureBox();
toolTip = new ToolTip(components);
checkBootSound = new CheckBox();
panelAPU = new Panel();
comboAPU = new RComboBox();
pictureAPUMem = new PictureBox();
labelAPUMem = new Label();
panelServices.SuspendLayout();
((System.ComponentModel.ISupportInitialize)pictureService).BeginInit();
panelBindingsHeader.SuspendLayout();
@@ -138,17 +142,18 @@ namespace GHelper
panelPower.SuspendLayout();
((System.ComponentModel.ISupportInitialize)numericHibernateAfter).BeginInit();
((System.ComponentModel.ISupportInitialize)pictureHibernate).BeginInit();
panelAPU.SuspendLayout();
((System.ComponentModel.ISupportInitialize)pictureAPUMem).BeginInit();
SuspendLayout();
//
// panelServices
//
panelServices.AccessibleName = "Asus Services";
panelServices.AccessibleRole = AccessibleRole.Grouping;
panelServices.Controls.Add(pictureService);
panelServices.Controls.Add(labelServices);
panelServices.Controls.Add(buttonServices);
panelServices.Dock = DockStyle.Top;
panelServices.Location = new Point(15, 1321);
panelServices.Location = new Point(15, 1378);
panelServices.Name = "panelServices";
panelServices.Size = new Size(983, 75);
panelServices.TabIndex = 5;
@@ -239,7 +244,6 @@ namespace GHelper
//
// panelBindings
//
panelBindings.AccessibleName = "Key Bindings";
panelBindings.AutoSize = true;
panelBindings.AutoSizeMode = AutoSizeMode.GrowAndShrink;
panelBindings.Controls.Add(tableBindings);
@@ -253,7 +257,6 @@ namespace GHelper
//
// tableBindings
//
tableBindings.AccessibleName = "Keyboard Bindings";
tableBindings.AccessibleRole = AccessibleRole.Table;
tableBindings.AutoSize = true;
tableBindings.AutoSizeMode = AutoSizeMode.GrowAndShrink;
@@ -312,7 +315,6 @@ namespace GHelper
//
// comboFNE
//
comboFNE.AccessibleName = "Fn+Numpad Action";
comboFNE.BorderColor = Color.White;
comboFNE.ButtonColor = Color.FromArgb(255, 255, 255);
comboFNE.Dock = DockStyle.Top;
@@ -369,7 +371,6 @@ namespace GHelper
//
// comboM1
//
comboM1.AccessibleName = "M1 Action";
comboM1.BorderColor = Color.White;
comboM1.ButtonColor = Color.FromArgb(255, 255, 255);
comboM1.Dock = DockStyle.Top;
@@ -394,7 +395,6 @@ namespace GHelper
//
// comboM4
//
comboM4.AccessibleName = "M4 Action";
comboM4.BorderColor = Color.White;
comboM4.ButtonColor = Color.FromArgb(255, 255, 255);
comboM4.Dock = DockStyle.Top;
@@ -408,7 +408,6 @@ namespace GHelper
//
// comboM3
//
comboM3.AccessibleName = "M3 Action";
comboM3.BorderColor = Color.White;
comboM3.ButtonColor = Color.FromArgb(255, 255, 255);
comboM3.Dock = DockStyle.Top;
@@ -477,7 +476,6 @@ namespace GHelper
//
// comboM2
//
comboM2.AccessibleName = "M2 Action";
comboM2.BorderColor = Color.White;
comboM2.ButtonColor = Color.FromArgb(255, 255, 255);
comboM2.Dock = DockStyle.Top;
@@ -502,7 +500,6 @@ namespace GHelper
//
// comboFNF4
//
comboFNF4.AccessibleName = "Fn+F4 Action";
comboFNF4.BorderColor = Color.White;
comboFNF4.ButtonColor = Color.FromArgb(255, 255, 255);
comboFNF4.Dock = DockStyle.Top;
@@ -526,7 +523,6 @@ namespace GHelper
//
// comboFNC
//
comboFNC.AccessibleName = "Fn+C Action";
comboFNC.BorderColor = Color.White;
comboFNC.ButtonColor = Color.FromArgb(255, 255, 255);
comboFNC.Dock = DockStyle.Top;
@@ -647,7 +643,6 @@ namespace GHelper
//
// numericBacklightPluggedTime
//
numericBacklightPluggedTime.AccessibleName = "Backlight Timeout when plugged";
numericBacklightPluggedTime.Anchor = AnchorStyles.Top | AnchorStyles.Right;
numericBacklightPluggedTime.Location = new Point(670, 63);
numericBacklightPluggedTime.Margin = new Padding(4, 3, 4, 3);
@@ -658,7 +653,6 @@ namespace GHelper
//
// numericBacklightTime
//
numericBacklightTime.AccessibleName = "Backlight Timeout when on battery";
numericBacklightTime.Anchor = AnchorStyles.Top | AnchorStyles.Right;
numericBacklightTime.Location = new Point(822, 63);
numericBacklightTime.Margin = new Padding(4, 3, 4, 3);
@@ -687,7 +681,6 @@ namespace GHelper
//
// comboKeyboardSpeed
//
comboKeyboardSpeed.AccessibleName = "Keyboard Animation Speed";
comboKeyboardSpeed.Anchor = AnchorStyles.Top | AnchorStyles.Right;
comboKeyboardSpeed.BorderColor = Color.White;
comboKeyboardSpeed.ButtonColor = SystemColors.ControlLight;
@@ -780,7 +773,6 @@ namespace GHelper
//
// checkAwake
//
checkAwake.AccessibleName = "Awake Backlight";
checkAwake.Dock = DockStyle.Fill;
checkAwake.Location = new Point(4, 45);
checkAwake.Margin = new Padding(4, 0, 4, 0);
@@ -793,7 +785,6 @@ namespace GHelper
//
// checkBoot
//
checkBoot.AccessibleName = "Boot Backlight";
checkBoot.Dock = DockStyle.Fill;
checkBoot.Location = new Point(4, 88);
checkBoot.Margin = new Padding(4, 0, 4, 0);
@@ -806,7 +797,6 @@ namespace GHelper
//
// checkSleep
//
checkSleep.AccessibleName = "Sleep Backlight";
checkSleep.Dock = DockStyle.Fill;
checkSleep.Location = new Point(4, 131);
checkSleep.Margin = new Padding(4, 0, 4, 0);
@@ -819,7 +809,6 @@ namespace GHelper
//
// checkShutdown
//
checkShutdown.AccessibleName = "Shutdown Backlight";
checkShutdown.Dock = DockStyle.Fill;
checkShutdown.Location = new Point(4, 174);
checkShutdown.Margin = new Padding(4, 0, 4, 0);
@@ -1059,7 +1048,6 @@ namespace GHelper
//
// panelSettings
//
panelSettings.AccessibleName = "Extra Settings";
panelSettings.AccessibleRole = AccessibleRole.Grouping;
panelSettings.AutoSize = true;
panelSettings.AutoSizeMode = AutoSizeMode.GrowAndShrink;
@@ -1072,7 +1060,7 @@ namespace GHelper
panelSettings.Controls.Add(checkGpuApps);
panelSettings.Controls.Add(checkGPUFix);
panelSettings.Dock = DockStyle.Top;
panelSettings.Location = new Point(15, 921);
panelSettings.Location = new Point(15, 978);
panelSettings.Name = "panelSettings";
panelSettings.Padding = new Padding(20, 5, 11, 5);
panelSettings.Size = new Size(983, 346);
@@ -1116,6 +1104,19 @@ namespace GHelper
checkNoOverdrive.Text = Strings.DisableOverdrive;
checkNoOverdrive.UseVisualStyleBackColor = true;
//
// checkBootSound
//
checkBootSound.AutoSize = true;
checkBootSound.Dock = DockStyle.Top;
checkBootSound.Location = new Point(20, 173);
checkBootSound.Margin = new Padding(4, 3, 4, 3);
checkBootSound.Name = "checkBootSound";
checkBootSound.Padding = new Padding(3);
checkBootSound.Size = new Size(952, 42);
checkBootSound.TabIndex = 10;
checkBootSound.Text = "Boot Sound";
checkBootSound.UseVisualStyleBackColor = true;
//
// checkUSBC
//
checkUSBC.AutoSize = true;
@@ -1174,14 +1175,13 @@ namespace GHelper
panelPower.Controls.Add(labelHibernateAfter);
panelPower.Controls.Add(pictureHibernate);
panelPower.Dock = DockStyle.Top;
panelPower.Location = new Point(15, 1267);
panelPower.Location = new Point(15, 1324);
panelPower.Name = "panelPower";
panelPower.Size = new Size(983, 54);
panelPower.TabIndex = 4;
//
// numericHibernateAfter
//
numericHibernateAfter.AccessibleName = "Minutes till Hibernation in sleep";
numericHibernateAfter.Anchor = AnchorStyles.Top | AnchorStyles.Right;
numericHibernateAfter.Increment = new decimal(new int[] { 10, 0, 0, 0 });
numericHibernateAfter.Location = new Point(810, 7);
@@ -1211,29 +1211,70 @@ namespace GHelper
pictureHibernate.TabIndex = 22;
pictureHibernate.TabStop = false;
//
// checkBootSound
// panelAPU
//
checkBootSound.AutoSize = true;
checkBootSound.Dock = DockStyle.Top;
checkBootSound.Location = new Point(20, 173);
checkBootSound.Margin = new Padding(4, 3, 4, 3);
checkBootSound.Name = "checkBootSound";
checkBootSound.Padding = new Padding(3);
checkBootSound.Size = new Size(952, 42);
checkBootSound.TabIndex = 10;
checkBootSound.Text = "Boot Sound";
checkBootSound.UseVisualStyleBackColor = true;
panelAPU.AutoSize = true;
panelAPU.Controls.Add(comboAPU);
panelAPU.Controls.Add(pictureAPUMem);
panelAPU.Controls.Add(labelAPUMem);
panelAPU.Dock = DockStyle.Top;
panelAPU.Location = new Point(15, 921);
panelAPU.Name = "panelAPU";
panelAPU.Padding = new Padding(11, 5, 11, 0);
panelAPU.Size = new Size(983, 57);
panelAPU.TabIndex = 46;
panelAPU.Visible = false;
panelAPU.Paint += panelAPU_Paint;
//
// comboAPU
//
comboAPU.Anchor = AnchorStyles.Top | AnchorStyles.Right;
comboAPU.BorderColor = Color.White;
comboAPU.ButtonColor = SystemColors.ControlLight;
comboAPU.FlatStyle = FlatStyle.Flat;
comboAPU.Font = new Font("Segoe UI", 9F, FontStyle.Regular, GraphicsUnit.Point);
comboAPU.FormattingEnabled = true;
comboAPU.ItemHeight = 32;
comboAPU.Items.AddRange(new object[] { "Auto", "1G", "2G", "3G", "4G", "5G", "6G", "7G", "8G" });
comboAPU.Location = new Point(663, 8);
comboAPU.Margin = new Padding(4, 12, 4, 9);
comboAPU.Name = "comboAPU";
comboAPU.Size = new Size(293, 40);
comboAPU.TabIndex = 12;
comboAPU.TabStop = false;
//
// pictureAPUMem
//
pictureAPUMem.BackgroundImage = Resources.icons8_video_48;
pictureAPUMem.BackgroundImageLayout = ImageLayout.Zoom;
pictureAPUMem.Location = new Point(20, 11);
pictureAPUMem.Name = "pictureAPUMem";
pictureAPUMem.Size = new Size(32, 32);
pictureAPUMem.TabIndex = 1;
pictureAPUMem.TabStop = false;
//
// labelAPUMem
//
labelAPUMem.AutoSize = true;
labelAPUMem.Font = new Font("Segoe UI", 9F, FontStyle.Bold, GraphicsUnit.Point);
labelAPUMem.Location = new Point(56, 11);
labelAPUMem.Name = "labelAPUMem";
labelAPUMem.Size = new Size(309, 32);
labelAPUMem.TabIndex = 0;
labelAPUMem.Text = "Memory Assigned to GPU";
//
// Extra
//
AutoScaleDimensions = new SizeF(192F, 192F);
AutoScaleMode = AutoScaleMode.Dpi;
AutoScroll = true;
AutoSize = true;
AutoSizeMode = AutoSizeMode.GrowAndShrink;
ClientSize = new Size(1013, 1467);
ClientSize = new Size(1013, 1515);
Controls.Add(panelServices);
Controls.Add(panelPower);
Controls.Add(panelSettings);
Controls.Add(panelAPU);
Controls.Add(panelSettingsHeader);
Controls.Add(panelBacklight);
Controls.Add(panelBacklightHeader);
@@ -1282,6 +1323,9 @@ namespace GHelper
panelPower.PerformLayout();
((System.ComponentModel.ISupportInitialize)numericHibernateAfter).EndInit();
((System.ComponentModel.ISupportInitialize)pictureHibernate).EndInit();
panelAPU.ResumeLayout(false);
panelAPU.PerformLayout();
((System.ComponentModel.ISupportInitialize)pictureAPUMem).EndInit();
ResumeLayout(false);
PerformLayout();
}
@@ -1372,5 +1416,9 @@ namespace GHelper
private CheckBox checkGPUFix;
private ToolTip toolTip;
private CheckBox checkBootSound;
private Panel panelAPU;
private PictureBox pictureAPUMem;
private Label labelAPUMem;
private RComboBox comboAPU;
}
}

View File

@@ -13,6 +13,7 @@ namespace GHelper
{
ScreenControl screenControl = new ScreenControl();
ModeControl modeControl = new ModeControl();
ClamshellModeControl clamshellControl = new ClamshellModeControl();
const string EMPTY = "--------------";
@@ -138,8 +139,38 @@ namespace GHelper
checkGpuApps.Text = Properties.Strings.KillGpuApps;
labelHibernateAfter.Text = Properties.Strings.HibernateAfter;
labelAPUMem.Text = Properties.Strings.APUMemory;
Text = Properties.Strings.ExtraSettings;
// Accessible Labels
panelServices.AccessibleName = Properties.Strings.AsusServicesRunning;
panelBindings.AccessibleName = Properties.Strings.KeyBindings;
tableBindings.AccessibleName = Properties.Strings.KeyBindings;
comboM1.AccessibleName = "M1 Action";
comboM2.AccessibleName = "M2 Action";
comboM3.AccessibleName = "M3 Action";
comboM4.AccessibleName = "M4 Action";
comboFNF4.AccessibleName = "Fn+F4 Action";
comboFNC.AccessibleName = "Fn+C Action";
comboFNE.AccessibleName = "Fn+Numpad Action";
numericBacklightPluggedTime.AccessibleName = Properties.Strings.BacklightTimeoutPlugged;
numericBacklightTime.AccessibleName = Properties.Strings.BacklightTimeoutBattery;
comboKeyboardSpeed.AccessibleName = Properties.Strings.LaptopBacklight + " " +Properties.Strings.AnimationSpeed;
comboAPU.AccessibleName = Properties.Strings.LaptopBacklight + " " + Properties.Strings.AnimationSpeed;
checkBoot.AccessibleName = Properties.Strings.Boot + " " + Properties.Strings.LaptopBacklight;
checkAwake.AccessibleName = Properties.Strings.Awake + " " + Properties.Strings.LaptopBacklight;
checkSleep.AccessibleName = Properties.Strings.Sleep + " " + Properties.Strings.LaptopBacklight;
checkShutdown.AccessibleName = Properties.Strings.Shutdown + " " + Properties.Strings.LaptopBacklight;
panelSettings.AccessibleName = Properties.Strings.ExtraSettings;
numericHibernateAfter.AccessibleName = Properties.Strings.HibernateAfter;
if (AppConfig.IsARCNM())
{
labelM3.Text = "FN+F6";
@@ -147,14 +178,14 @@ namespace GHelper
labelM2.Visible = comboM2.Visible = textM2.Visible = false;
labelM4.Visible = comboM4.Visible = textM4.Visible = false;
labelFNF4.Visible = comboFNF4.Visible = textFNF4.Visible = false;
}
}
if (AppConfig.NoMKeys())
{
labelM1.Text = "FN+F2";
labelM2.Text = "FN+F3";
labelM3.Text = "FN+F4";
labelM4.Visible = comboM4.Visible = textM4.Visible = AppConfig.IsDUO();
labelM4.Visible = comboM4.Visible = textM4.Visible = AppConfig.IsDUO();
labelFNF4.Visible = comboFNF4.Visible = textFNF4.Visible = false;
}
@@ -195,6 +226,17 @@ namespace GHelper
SetKeyCombo(comboM4, textM4, "m4");
SetKeyCombo(comboFNF4, textFNF4, "paddle");
int apuMem = Program.acpi.GetAPUMem();
if (apuMem >= 0)
{
panelAPU.Visible = true;
comboAPU.DropDownStyle = ComboBoxStyle.DropDownList;
comboAPU.SelectedIndex = apuMem;
}
comboAPU.SelectedIndexChanged += ComboAPU_SelectedIndexChanged;
}
else
{
@@ -279,7 +321,7 @@ namespace GHelper
}
if ((!AppConfig.IsStrix() && !AppConfig.IsZ13()) || AppConfig.IsStrixLimitedRGB())
if ((!AppConfig.IsStrix() && !AppConfig.IsZ13()) || AppConfig.IsStrixLimitedRGB() || AppConfig.IsARCNM())
{
labelBacklightLid.Visible = false;
checkAwakeLid.Visible = false;
@@ -337,7 +379,7 @@ namespace GHelper
pictureLog.Click += PictureLog_Click;
checkGPUFix.Visible = AppConfig.IsGPUFixNeeded();
checkGPUFix.Visible = Program.acpi.IsNVidiaGPU();
checkGPUFix.Checked = AppConfig.IsGPUFix();
checkGPUFix.CheckedChanged += CheckGPUFix_CheckedChanged;
@@ -348,6 +390,19 @@ namespace GHelper
InitHibernate();
}
private void ComboAPU_SelectedIndexChanged(object? sender, EventArgs e)
{
int mem = comboAPU.SelectedIndex;
Program.acpi.SetAPUMem(mem);
DialogResult dialogResult = MessageBox.Show(Properties.Strings.AlertAPUMemoryRestart, Properties.Strings.AlertAPUMemoryRestartTitle, MessageBoxButtons.YesNo);
if (dialogResult == DialogResult.Yes)
{
Process.Start("shutdown", "/r /t 1");
}
}
private void CheckBootSound_CheckedChanged(object? sender, EventArgs e)
{
Program.acpi.DeviceSet(AsusACPI.BootSound, (checkBootSound.Checked ? 1 : 0), "BootSound");
@@ -579,7 +634,17 @@ namespace GHelper
{
if (Height > Program.settingsForm.Height)
{
Top = Program.settingsForm.Top + Program.settingsForm.Height - Height;
var top = Program.settingsForm.Top + Program.settingsForm.Height - Height;
if (top < 0)
{
MaximumSize = new Size(Width, Program.settingsForm.Height);
Top = Program.settingsForm.Top;
} else
{
Top = top;
}
}
else
{
@@ -604,5 +669,10 @@ namespace GHelper
}
}
private void panelAPU_Paint(object sender, PaintEventArgs e)
{
}
}
}

127
app/Fans.Designer.cs generated
View File

@@ -31,14 +31,14 @@ namespace GHelper
/// </summary>
private void InitializeComponent()
{
ChartArea chartArea1 = new ChartArea();
Title title1 = new Title();
ChartArea chartArea2 = new ChartArea();
Title title2 = new Title();
ChartArea chartArea3 = new ChartArea();
Title title3 = new Title();
ChartArea chartArea4 = new ChartArea();
Title title4 = new Title();
ChartArea chartArea17 = new ChartArea();
Title title17 = new Title();
ChartArea chartArea18 = new ChartArea();
Title title18 = new Title();
ChartArea chartArea19 = new ChartArea();
Title title19 = new Title();
ChartArea chartArea20 = new ChartArea();
Title title20 = new Title();
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Fans));
panelFans = new Panel();
labelTip = new Label();
@@ -141,6 +141,10 @@ namespace GHelper
buttonAdvanced = new RButton();
buttonGPU = new RButton();
buttonCPU = new RButton();
panelA3 = new Panel();
labelA3 = new Label();
labelLeftA3 = new Label();
trackA3 = new TrackBar();
panelFans.SuspendLayout();
tableFanCharts.SuspendLayout();
((System.ComponentModel.ISupportInitialize)chartGPU).BeginInit();
@@ -195,6 +199,8 @@ namespace GHelper
((System.ComponentModel.ISupportInitialize)pictureGPU).BeginInit();
panelNav.SuspendLayout();
tableNav.SuspendLayout();
panelA3.SuspendLayout();
((System.ComponentModel.ISupportInitialize)trackA3).BeginInit();
SuspendLayout();
//
// panelFans
@@ -251,8 +257,8 @@ namespace GHelper
//
// chartGPU
//
chartArea1.Name = "ChartArea1";
chartGPU.ChartAreas.Add(chartArea1);
chartArea17.Name = "ChartArea1";
chartGPU.ChartAreas.Add(chartArea17);
chartGPU.Dock = DockStyle.Fill;
chartGPU.Location = new Point(12, 493);
chartGPU.Margin = new Padding(2, 10, 2, 10);
@@ -260,13 +266,13 @@ namespace GHelper
chartGPU.Size = new Size(782, 463);
chartGPU.TabIndex = 17;
chartGPU.Text = "chartGPU";
title1.Name = "Title1";
chartGPU.Titles.Add(title1);
title17.Name = "Title1";
chartGPU.Titles.Add(title17);
//
// chartCPU
//
chartArea2.Name = "ChartArea1";
chartCPU.ChartAreas.Add(chartArea2);
chartArea18.Name = "ChartArea1";
chartCPU.ChartAreas.Add(chartArea18);
chartCPU.Dock = DockStyle.Fill;
chartCPU.Location = new Point(12, 10);
chartCPU.Margin = new Padding(2, 10, 2, 10);
@@ -274,13 +280,13 @@ namespace GHelper
chartCPU.Size = new Size(782, 463);
chartCPU.TabIndex = 14;
chartCPU.Text = "chartCPU";
title2.Name = "Title1";
chartCPU.Titles.Add(title2);
title18.Name = "Title1";
chartCPU.Titles.Add(title18);
//
// chartXGM
//
chartArea3.Name = "ChartAreaXGM";
chartXGM.ChartAreas.Add(chartArea3);
chartArea19.Name = "ChartAreaXGM";
chartXGM.ChartAreas.Add(chartArea19);
chartXGM.Dock = DockStyle.Fill;
chartXGM.Location = new Point(12, 1459);
chartXGM.Margin = new Padding(2, 10, 2, 10);
@@ -288,14 +294,14 @@ namespace GHelper
chartXGM.Size = new Size(782, 463);
chartXGM.TabIndex = 14;
chartXGM.Text = "chartXGM";
title3.Name = "Title4";
chartXGM.Titles.Add(title3);
title19.Name = "Title4";
chartXGM.Titles.Add(title19);
chartXGM.Visible = false;
//
// chartMid
//
chartArea4.Name = "ChartArea3";
chartMid.ChartAreas.Add(chartArea4);
chartArea20.Name = "ChartArea3";
chartMid.ChartAreas.Add(chartArea20);
chartMid.Dock = DockStyle.Fill;
chartMid.Location = new Point(12, 976);
chartMid.Margin = new Padding(2, 10, 2, 10);
@@ -303,8 +309,8 @@ namespace GHelper
chartMid.Size = new Size(782, 463);
chartMid.TabIndex = 14;
chartMid.Text = "chartMid";
title4.Name = "Title3";
chartMid.Titles.Add(title4);
title20.Name = "Title3";
chartMid.Titles.Add(title20);
chartMid.Visible = false;
//
// panelTitleFans
@@ -523,7 +529,7 @@ namespace GHelper
panelAdvanced.Controls.Add(panelTemperature);
panelAdvanced.Controls.Add(panelTitleTemp);
panelAdvanced.Dock = DockStyle.Top;
panelAdvanced.Location = new Point(10, 1520);
panelAdvanced.Location = new Point(10, 1644);
panelAdvanced.Name = "panelAdvanced";
panelAdvanced.Size = new Size(520, 888);
panelAdvanced.TabIndex = 14;
@@ -814,6 +820,7 @@ namespace GHelper
panelPower.Controls.Add(panelApplyPower);
panelPower.Controls.Add(panelB0);
panelPower.Controls.Add(panelC1);
panelPower.Controls.Add(panelA3);
panelPower.Controls.Add(panelA0);
panelPower.Controls.Add(panelTitleCPU);
panelPower.Controls.Add(panelBoost);
@@ -824,7 +831,7 @@ namespace GHelper
panelPower.Location = new Point(10, 764);
panelPower.Margin = new Padding(4);
panelPower.Name = "panelPower";
panelPower.Size = new Size(520, 756);
panelPower.Size = new Size(520, 880);
panelPower.TabIndex = 43;
//
// panelApplyPower
@@ -832,7 +839,7 @@ namespace GHelper
panelApplyPower.AutoSize = true;
panelApplyPower.Controls.Add(checkApplyPower);
panelApplyPower.Dock = DockStyle.Top;
panelApplyPower.Location = new Point(0, 680);
panelApplyPower.Location = new Point(0, 804);
panelApplyPower.Name = "panelApplyPower";
panelApplyPower.Padding = new Padding(15);
panelApplyPower.Size = new Size(520, 76);
@@ -859,7 +866,7 @@ namespace GHelper
panelB0.Controls.Add(labelLeftB0);
panelB0.Controls.Add(trackB0);
panelB0.Dock = DockStyle.Top;
panelB0.Location = new Point(0, 556);
panelB0.Location = new Point(0, 680);
panelB0.Margin = new Padding(4);
panelB0.MaximumSize = new Size(0, 124);
panelB0.Name = "panelB0";
@@ -908,7 +915,7 @@ namespace GHelper
panelC1.Controls.Add(labelLeftC1);
panelC1.Controls.Add(trackC1);
panelC1.Dock = DockStyle.Top;
panelC1.Location = new Point(0, 432);
panelC1.Location = new Point(0, 556);
panelC1.Margin = new Padding(4);
panelC1.MaximumSize = new Size(0, 124);
panelC1.Name = "panelC1";
@@ -972,7 +979,7 @@ namespace GHelper
labelA0.Name = "labelA0";
labelA0.Size = new Size(116, 32);
labelA0.TabIndex = 12;
labelA0.Text = "SPPT";
labelA0.Text = "SPL";
labelA0.TextAlign = ContentAlignment.TopRight;
//
// labelLeftA0
@@ -981,9 +988,9 @@ namespace GHelper
labelLeftA0.Location = new Point(10, 10);
labelLeftA0.Margin = new Padding(4, 0, 4, 0);
labelLeftA0.Name = "labelLeftA0";
labelLeftA0.Size = new Size(66, 32);
labelLeftA0.Size = new Size(51, 32);
labelLeftA0.TabIndex = 11;
labelLeftA0.Text = "SPPT";
labelLeftA0.Text = "SPL";
//
// trackA0
//
@@ -1527,6 +1534,55 @@ namespace GHelper
buttonCPU.TextImageRelation = TextImageRelation.ImageBeforeText;
buttonCPU.UseVisualStyleBackColor = false;
//
// panelA3
//
panelA3.AutoSize = true;
panelA3.AutoSizeMode = AutoSizeMode.GrowAndShrink;
panelA3.Controls.Add(labelA3);
panelA3.Controls.Add(labelLeftA3);
panelA3.Controls.Add(trackA3);
panelA3.Dock = DockStyle.Top;
panelA3.Location = new Point(0, 432);
panelA3.Margin = new Padding(4);
panelA3.MaximumSize = new Size(0, 124);
panelA3.Name = "panelA3";
panelA3.Size = new Size(520, 124);
panelA3.TabIndex = 51;
//
// labelA3
//
labelA3.Font = new Font("Segoe UI", 9F, FontStyle.Bold, GraphicsUnit.Point);
labelA3.Location = new Point(396, 10);
labelA3.Margin = new Padding(4, 0, 4, 0);
labelA3.Name = "labelA3";
labelA3.Size = new Size(116, 32);
labelA3.TabIndex = 12;
labelA3.Text = "SPPT";
labelA3.TextAlign = ContentAlignment.TopRight;
//
// labelLeftA3
//
labelLeftA3.AutoSize = true;
labelLeftA3.Location = new Point(10, 10);
labelLeftA3.Margin = new Padding(4, 0, 4, 0);
labelLeftA3.Name = "labelLeftA3";
labelLeftA3.Size = new Size(66, 32);
labelLeftA3.TabIndex = 11;
labelLeftA3.Text = "SPPT";
//
// trackA3
//
trackA3.Location = new Point(6, 48);
trackA3.Margin = new Padding(4, 2, 4, 2);
trackA3.Maximum = 180;
trackA3.Minimum = 10;
trackA3.Name = "trackA3";
trackA3.Size = new Size(508, 90);
trackA3.TabIndex = 10;
trackA3.TickFrequency = 5;
trackA3.TickStyle = TickStyle.TopLeft;
trackA3.Value = 125;
//
// Fans
//
AutoScaleDimensions = new SizeF(192F, 192F);
@@ -1623,6 +1679,9 @@ namespace GHelper
((System.ComponentModel.ISupportInitialize)pictureGPU).EndInit();
panelNav.ResumeLayout(false);
tableNav.ResumeLayout(false);
panelA3.ResumeLayout(false);
panelA3.PerformLayout();
((System.ComponentModel.ISupportInitialize)trackA3).EndInit();
ResumeLayout(false);
PerformLayout();
}
@@ -1730,5 +1789,9 @@ namespace GHelper
private TrackBar trackGPUClockLimit;
private Label labelGPUClockLimitTitle;
private RButton buttonCalibrate;
private Panel panelA3;
private Label labelA3;
private Label labelLeftA3;
private TrackBar trackA3;
}
}

View File

@@ -106,6 +106,9 @@ namespace GHelper
trackA0.Maximum = AsusACPI.MaxTotal;
trackA0.Minimum = AsusACPI.MinTotal;
trackA3.Maximum = AsusACPI.MaxTotal;
trackA3.Minimum = AsusACPI.MinTotal;
trackB0.Maximum = AsusACPI.MaxCPU;
trackB0.Minimum = AsusACPI.MinCPU;
@@ -115,10 +118,12 @@ namespace GHelper
trackC1.Scroll += TrackPower_Scroll;
trackB0.Scroll += TrackPower_Scroll;
trackA0.Scroll += TrackPower_Scroll;
trackA3.Scroll += TrackPower_Scroll;
trackC1.MouseUp += TrackPower_MouseUp;
trackB0.MouseUp += TrackPower_MouseUp;
trackA0.MouseUp += TrackPower_MouseUp;
trackA3.MouseUp += TrackPower_MouseUp;
checkApplyFans.Click += CheckApplyFans_Click;
checkApplyPower.Click += CheckApplyPower_Click;
@@ -594,7 +599,7 @@ namespace GHelper
int Max = FanSensorControl.GetFanMax(device);
if (fanRpm)
return (200 * Math.Round((float)(Min * 100 + (Max - Min) * percentage) / 200)).ToString() + unit;
return (200 * Math.Floor((float)(Min * 100 + (Max - Min) * percentage) / 200)).ToString() + unit;
else
return percentage + "%";
}
@@ -785,6 +790,7 @@ namespace GHelper
{
bool modeA0 = (Program.acpi.DeviceGet(AsusACPI.PPT_TotalA0) >= 0 || RyzenControl.IsAMD());
bool modeA3 = Program.acpi.DeviceGet(AsusACPI.PPT_APUA3) >= 0;
bool modeB0 = Program.acpi.IsAllAmdPPT();
bool modeC1 = Program.acpi.DeviceGet(AsusACPI.PPT_APUC1) >= 0;
@@ -800,19 +806,31 @@ namespace GHelper
labelLeftA0.Text = "Platform (CPU + GPU)";
labelLeftB0.Text = "CPU";
panelC1.Visible = false;
panelA3.Visible = false;
}
else
{
if (RyzenControl.IsAMD())
labelLeftA0.Text = "CPU Slow (SPL + sPPT)";
else
labelLeftA0.Text = "CPU (PL1 + PL2)";
panelA3.Visible = modeA3;
if (RyzenControl.IsAMD())
{
labelLeftA0.Text = "CPU Sustained (SPL)";
labelLeftA3.Text = "CPU Slow (sPPT)";
labelLeftC1.Text = "CPU Fast (fPPT)";
panelC1.Visible = modeC1;
}
else
{
labelLeftA0.Text = "CPU Slow (PL1)";
labelLeftA3.Text = "CPU Fast (PL2)";
panelC1.Visible = false;
}
labelLeftC1.Text = "CPU Fast (fPPT)";
panelC1.Visible = modeC1;
}
int limit_total;
int limit_slow;
int limit_cpu;
int limit_fast;
@@ -821,12 +839,14 @@ namespace GHelper
if (changed)
{
limit_total = trackA0.Value;
limit_slow = trackA3.Value;
limit_cpu = trackB0.Value;
limit_fast = trackC1.Value;
}
else
{
limit_total = AppConfig.GetMode("limit_total");
limit_slow = AppConfig.GetMode("limit_slow");
limit_cpu = AppConfig.GetMode("limit_cpu");
limit_fast = AppConfig.GetMode("limit_fast");
}
@@ -840,21 +860,28 @@ namespace GHelper
if (limit_cpu < AsusACPI.MinCPU) limit_cpu = AsusACPI.MinCPU;
if (limit_cpu > limit_total) limit_cpu = limit_total;
if (limit_slow < 0) limit_slow = limit_total;
if (limit_slow > AsusACPI.MaxTotal) limit_slow = AsusACPI.MaxTotal;
if (limit_slow < AsusACPI.MinTotal) limit_slow = AsusACPI.MinTotal;
if (limit_fast < 0) limit_fast = AsusACPI.DefaultTotal;
if (limit_fast > AsusACPI.MaxTotal) limit_fast = AsusACPI.MaxTotal;
if (limit_fast < AsusACPI.MinTotal) limit_fast = AsusACPI.MinTotal;
trackA0.Value = limit_total;
trackA3.Value = limit_slow;
trackB0.Value = limit_cpu;
trackC1.Value = limit_fast;
checkApplyPower.Checked = apply;
labelA0.Text = trackA0.Value.ToString() + "W";
labelA3.Text = trackA3.Value.ToString() + "W";
labelB0.Text = trackB0.Value.ToString() + "W";
labelC1.Text = trackC1.Value.ToString() + "W";
AppConfig.SetMode("limit_total", limit_total);
AppConfig.SetMode("limit_slow", limit_slow);
AppConfig.SetMode("limit_cpu", limit_cpu);
AppConfig.SetMode("limit_fast", limit_fast);
@@ -1123,7 +1150,7 @@ namespace GHelper
tip = true;
}
labelTip.Text = Math.Round(curPoint.XValue) + "C, " + ChartYLabel((int)curPoint.YValues[0], device, " " + Properties.Strings.RPM);
labelTip.Text = Math.Floor(curPoint.XValue) + "C, " + ChartYLabel((int)curPoint.YValues[0], device, " " + Properties.Strings.RPM);
labelTip.Top = e.Y + ((Control)sender).Top;
labelTip.Left = e.X - 50;

View File

@@ -15,7 +15,7 @@
<PlatformTarget>AnyCPU</PlatformTarget>
<ProduceReferenceAssembly>False</ProduceReferenceAssembly>
<AllowUnsafeBlocks>True</AllowUnsafeBlocks>
<AssemblyVersion>0.132</AssemblyVersion>
<AssemblyVersion>0.145</AssemblyVersion>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">

View File

@@ -181,6 +181,12 @@ namespace GHelper.Gpu
Program.modeControl.SetGPUClocks(false);
}
if (AppConfig.Is("mode_reapply"))
{
await Task.Delay(TimeSpan.FromMilliseconds(3000));
Program.modeControl.AutoPerformance();
}
});

View File

@@ -13,10 +13,10 @@ public class NvidiaGpuControl : IGpuControl
{
public static int MaxCoreOffset => AppConfig.Get("max_gpu_core", 250);
public static int MaxMemoryOffset => AppConfig.Get("max_gpu_memory", 250);
public static int MaxMemoryOffset => AppConfig.Get("max_gpu_memory", 500);
public static int MinCoreOffset = AppConfig.Get("min_gpu_core", -250);
public static int MinMemoryOffset = AppConfig.Get("min_gpu_memory", -250);
public static int MinMemoryOffset = AppConfig.Get("min_gpu_memory", -500);
public const int MinClockLimit = 400;
public const int MaxClockLimit = 3000;

View File

@@ -26,6 +26,38 @@ namespace GHelper.Helpers
(color1.B + color2.B) / 2);
}
public static Color GetDominantColor(Bitmap bmp)
{
//Used for tally
int r = 0;
int g = 0;
int b = 0;
int total = 0;
for (int x = 0; x < bmp.Width; x++)
{
for (int y = 0; y < bmp.Height; y++)
{
Color clr = bmp.GetPixel(x, y);
r += clr.R;
g += clr.G;
b += clr.B;
total++;
}
}
//Calculate average
r /= total;
g /= total;
b /= total;
return Color.FromArgb(r, g, b);
}
public class HSV
{
public double Hue { get; set; }

View File

@@ -116,6 +116,9 @@ namespace GHelper.Input
if (keyApp != Keys.None) hook.RegisterHotKey(ModifierKeys.Shift | ModifierKeys.Control, keyApp);
hook.RegisterHotKey(ModifierKeys.Shift | ModifierKeys.Control | ModifierKeys.Alt, Keys.F14);
hook.RegisterHotKey(ModifierKeys.Shift | ModifierKeys.Control | ModifierKeys.Alt, Keys.F15);
if (!AppConfig.Is("skip_hotkeys"))
{
hook.RegisterHotKey(ModifierKeys.Control, Keys.VolumeDown);
@@ -194,7 +197,7 @@ namespace GHelper.Input
KeyboardHook.KeyKeyPress((Keys)hexKeys[0], (Keys)hexKeys[1]);
break;
case 3:
KeyboardHook.KeyKeyKeyPress((Keys)hexKeys[0], (Keys)hexKeys[1], (Keys)hexKeys[3]);
KeyboardHook.KeyKeyKeyPress((Keys)hexKeys[0], (Keys)hexKeys[1], (Keys)hexKeys[2]);
break;
default:
LaunchProcess(command);
@@ -311,9 +314,6 @@ namespace GHelper.Input
case Keys.F11:
SleepEvent();
break;
case Keys.F12:
KeyboardHook.KeyKeyPress(Keys.LWin, Keys.A);
break;
case Keys.VolumeDown:
KeyProcess("m1");
break;
@@ -348,6 +348,16 @@ namespace GHelper.Input
if (e.Modifier == (ModifierKeys.Control | ModifierKeys.Shift | ModifierKeys.Alt))
{
if (e.Key == keyProfile) modeControl.CyclePerformanceMode(true);
switch (e.Key)
{
case Keys.F14:
Program.settingsForm.gpuControl.SetGPUMode(AsusACPI.GPUModeEco);
break;
case Keys.F15:
Program.settingsForm.gpuControl.SetGPUMode(AsusACPI.GPUModeStandard);
break;
}
}
@@ -419,7 +429,9 @@ namespace GHelper.Input
NativeMethods.TurnOffScreen();
break;
case "miniled":
screenControl.ToogleMiniled();
if (ScreenCCD.GetHDRStatus()) return;
int miniled = screenControl.ToogleMiniled();
Program.toast.RunToast(miniled == 1 ? "Multi-Zone" : "Single-Zone", miniled == 1 ? ToastIcon.BrightnessUp : ToastIcon.BrightnessDown);
break;
case "aura":
Program.settingsForm.BeginInvoke(Program.settingsForm.CycleAuraMode);
@@ -574,6 +586,9 @@ namespace GHelper.Input
case 55: // Arconym
KeyProcess("m6");
return;
case 136: // FN + F12
Program.acpi.DeviceSet(AsusACPI.UniversalControl, AsusACPI.Airplane, "Airplane");
return;
case 181: // FN + Numpad Enter
KeyProcess("fne");
return;
@@ -624,13 +639,19 @@ namespace GHelper.Input
{
case 16: // FN+F7
if (Control.ModifierKeys == Keys.Shift)
SetScreenpad(-10);
{
if (AppConfig.IsDUO()) SetScreenpad(-10);
else Program.settingsForm.BeginInvoke(Program.settingsForm.CycleMatrix, -1);
}
else
Program.acpi.DeviceSet(AsusACPI.UniversalControl, AsusACPI.Brightness_Down, "Brightness");
break;
case 32: // FN+F8
if (Control.ModifierKeys == Keys.Shift)
SetScreenpad(10);
{
if (AppConfig.IsDUO()) SetScreenpad(10);
else Program.settingsForm.BeginInvoke(Program.settingsForm.CycleMatrix, 1);
}
else
Program.acpi.DeviceSet(AsusACPI.UniversalControl, AsusACPI.Brightness_Up, "Brightness");
break;
@@ -643,7 +664,7 @@ namespace GHelper.Input
case 106: // Screenpad button on DUO
if (Control.ModifierKeys == Keys.Shift)
ToggleScreenpad();
else
else
SetScreenpad(100);
break;

67
app/Matrix.Designer.cs generated
View File

@@ -35,6 +35,10 @@
panelMain = new Panel();
panelButtons = new Panel();
buttonReset = new UI.RButton();
panelContrast = new Panel();
labelContrast = new Label();
labelContrastTitle = new Label();
trackContrast = new TrackBar();
panelRotation = new Panel();
comboRotation = new UI.RComboBox();
labelRotation = new Label();
@@ -49,6 +53,8 @@
panelPicture.SuspendLayout();
panelMain.SuspendLayout();
panelButtons.SuspendLayout();
panelContrast.SuspendLayout();
((System.ComponentModel.ISupportInitialize)trackContrast).BeginInit();
panelRotation.SuspendLayout();
panelScaling.SuspendLayout();
panelZoom.SuspendLayout();
@@ -111,6 +117,7 @@
//
panelMain.AutoSize = true;
panelMain.Controls.Add(panelButtons);
panelMain.Controls.Add(panelContrast);
panelMain.Controls.Add(panelRotation);
panelMain.Controls.Add(panelScaling);
panelMain.Controls.Add(panelZoom);
@@ -118,7 +125,7 @@
panelMain.Dock = DockStyle.Top;
panelMain.Location = new Point(20, 20);
panelMain.Name = "panelMain";
panelMain.Size = new Size(834, 814);
panelMain.Size = new Size(834, 959);
panelMain.TabIndex = 5;
//
// panelButtons
@@ -126,7 +133,7 @@
panelButtons.Controls.Add(buttonReset);
panelButtons.Controls.Add(buttonPicture);
panelButtons.Dock = DockStyle.Top;
panelButtons.Location = new Point(0, 720);
panelButtons.Location = new Point(0, 865);
panelButtons.Name = "panelButtons";
panelButtons.Size = new Size(834, 94);
panelButtons.TabIndex = 6;
@@ -150,6 +157,53 @@
buttonReset.TextImageRelation = TextImageRelation.ImageBeforeText;
buttonReset.UseVisualStyleBackColor = false;
//
// panelContrast
//
panelContrast.AutoSize = true;
panelContrast.Controls.Add(labelContrast);
panelContrast.Controls.Add(labelContrastTitle);
panelContrast.Controls.Add(trackContrast);
panelContrast.Dock = DockStyle.Top;
panelContrast.Location = new Point(0, 720);
panelContrast.Name = "panelContrast";
panelContrast.Size = new Size(834, 145);
panelContrast.TabIndex = 6;
//
// labelContrast
//
labelContrast.Anchor = AnchorStyles.Top | AnchorStyles.Right;
labelContrast.AutoSize = true;
labelContrast.Font = new Font("Segoe UI", 9F, FontStyle.Regular, GraphicsUnit.Point);
labelContrast.Location = new Point(705, 17);
labelContrast.Name = "labelContrast";
labelContrast.Size = new Size(103, 32);
labelContrast.TabIndex = 4;
labelContrast.Text = "Contrast";
//
// labelContrastTitle
//
labelContrastTitle.AutoSize = true;
labelContrastTitle.Font = new Font("Segoe UI", 9F, FontStyle.Bold, GraphicsUnit.Point);
labelContrastTitle.Location = new Point(16, 17);
labelContrastTitle.Name = "labelContrastTitle";
labelContrastTitle.Size = new Size(111, 32);
labelContrastTitle.TabIndex = 3;
labelContrastTitle.Text = "Contrast";
//
// trackContrast
//
trackContrast.LargeChange = 50;
trackContrast.Location = new Point(16, 52);
trackContrast.Maximum = 200;
trackContrast.Minimum = 10;
trackContrast.Name = "trackContrast";
trackContrast.Size = new Size(782, 90);
trackContrast.SmallChange = 10;
trackContrast.TabIndex = 2;
trackContrast.TickFrequency = 20;
trackContrast.TickStyle = TickStyle.TopLeft;
trackContrast.Value = 100;
//
// panelRotation
//
panelRotation.Controls.Add(comboRotation);
@@ -256,7 +310,7 @@
AutoScaleDimensions = new SizeF(192F, 192F);
AutoScaleMode = AutoScaleMode.Dpi;
AutoSize = true;
ClientSize = new Size(874, 978);
ClientSize = new Size(874, 1006);
Controls.Add(panelMain);
MaximizeBox = false;
MinimizeBox = false;
@@ -272,6 +326,9 @@
panelMain.ResumeLayout(false);
panelMain.PerformLayout();
panelButtons.ResumeLayout(false);
panelContrast.ResumeLayout(false);
panelContrast.PerformLayout();
((System.ComponentModel.ISupportInitialize)trackContrast).EndInit();
panelRotation.ResumeLayout(false);
panelRotation.PerformLayout();
panelScaling.ResumeLayout(false);
@@ -300,5 +357,9 @@
private Panel panelRotation;
private UI.RComboBox comboRotation;
private Label labelRotation;
private Panel panelContrast;
private Label labelContrast;
private Label labelContrastTitle;
private TrackBar trackContrast;
}
}

View File

@@ -37,9 +37,13 @@ namespace GHelper
trackZoom.MouseUp += TrackZoom_MouseUp;
trackZoom.ValueChanged += TrackZoom_Changed;
trackZoom.Value = Math.Min(trackZoom.Maximum, AppConfig.Get("matrix_zoom", 100));
VisualiseZoom();
trackContrast.MouseUp += TrackContrast_MouseUp; ;
trackContrast.ValueChanged += TrackContrast_ValueChanged; ;
trackContrast.Value = Math.Min(trackContrast.Maximum, AppConfig.Get("matrix_contrast", 100));
VisualiseMatrix();
comboScaling.DropDownStyle = ComboBoxStyle.DropDownList;
comboScaling.SelectedIndex = AppConfig.Get("matrix_quality", 0);
@@ -55,6 +59,17 @@ namespace GHelper
}
private void TrackContrast_ValueChanged(object? sender, EventArgs e)
{
VisualiseMatrix();
}
private void TrackContrast_MouseUp(object? sender, MouseEventArgs e)
{
AppConfig.Set("matrix_contrast", trackContrast.Value);
SetMatrixPicture();
}
private void ComboRotation_SelectedValueChanged(object? sender, EventArgs e)
{
AppConfig.Set("matrix_rotation", comboRotation.SelectedIndex);
@@ -77,18 +92,21 @@ namespace GHelper
GC.Collect(GC.MaxGeneration, GCCollectionMode.Forced);
}
private void VisualiseZoom()
private void VisualiseMatrix()
{
labelZoom.Text = trackZoom.Value + "%";
labelContrast.Text = trackContrast.Value + "%";
}
private void ButtonReset_Click(object? sender, EventArgs e)
{
AppConfig.Set("matrix_contrast", 100);
AppConfig.Set("matrix_zoom", 100);
AppConfig.Set("matrix_x", 0);
AppConfig.Set("matrix_y", 0);
trackZoom.Value = 100;
trackContrast.Value = 100;
SetMatrixPicture();
@@ -102,7 +120,7 @@ namespace GHelper
private void TrackZoom_Changed(object? sender, EventArgs e)
{
VisualiseZoom();
VisualiseMatrix();
}
@@ -195,7 +213,6 @@ namespace GHelper
int matrixY = AppConfig.Get("matrix_y", 0);
int matrixZoom = AppConfig.Get("matrix_zoom", 100);
float scale = Math.Min((float)panelPicture.Width / (float)width, (float)panelPicture.Height / (float)height) * matrixZoom / 100;
pictureMatrix.Width = (int)(width * scale);

View File

@@ -239,10 +239,15 @@ namespace GHelper.Mode
public void SetPower(bool launchAsAdmin = false)
{
bool allAMD = Program.acpi.IsAllAmdPPT();
int limit_total = AppConfig.GetMode("limit_total");
int limit_cpu = AppConfig.GetMode("limit_cpu");
int limit_slow = AppConfig.GetMode("limit_slow");
int limit_fast = AppConfig.GetMode("limit_fast");
if (limit_slow < 0 || allAMD) limit_slow = limit_total;
if (limit_total > AsusACPI.MaxTotal) return;
if (limit_total < AsusACPI.MinTotal) return;
@@ -252,11 +257,14 @@ namespace GHelper.Mode
if (limit_fast > AsusACPI.MaxTotal) return;
if (limit_fast < AsusACPI.MinTotal) return;
// SPL + SPPT togeher in one slider
if (limit_slow > AsusACPI.MaxTotal) return;
if (limit_slow < AsusACPI.MinTotal) return;
// SPL and SPPT
if (Program.acpi.DeviceGet(AsusACPI.PPT_TotalA0) >= 0)
{
Program.acpi.DeviceSet(AsusACPI.PPT_TotalA0, limit_total, "PowerLimit A0");
Program.acpi.DeviceSet(AsusACPI.PPT_APUA3, limit_total, "PowerLimit A3");
Program.acpi.DeviceSet(AsusACPI.PPT_APUA3, limit_slow, "PowerLimit A3");
customPower = limit_total;
}
else if (RyzenControl.IsAMD())
@@ -340,16 +348,20 @@ namespace GHelper.Mode
int gpu_boost = AppConfig.GetMode("gpu_boost");
int gpu_temp = AppConfig.GetMode("gpu_temp");
int boostResult = -1;
if (gpu_boost < AsusACPI.MinGPUBoost || gpu_boost > AsusACPI.MaxGPUBoost) return;
if (gpu_temp < AsusACPI.MinGPUTemp || gpu_temp > AsusACPI.MaxGPUTemp) return;
if (Program.acpi.DeviceGet(AsusACPI.PPT_GPUC0) >= 0)
Program.acpi.DeviceSet(AsusACPI.PPT_GPUC0, gpu_boost, "PowerLimit C0");
boostResult = Program.acpi.DeviceSet(AsusACPI.PPT_GPUC0, gpu_boost, "PowerLimit C0");
if (Program.acpi.DeviceGet(AsusACPI.PPT_GPUC2) >= 0)
Program.acpi.DeviceSet(AsusACPI.PPT_GPUC2, gpu_temp, "PowerLimit C2");
if (boostResult == 0)
Program.acpi.DeviceSet(AsusACPI.PPT_GPUC0, gpu_boost, "PowerLimit C0");
}
public void SetCPUTemp(int? cpuTemp, bool log = true)

View File

@@ -39,9 +39,9 @@
"mode_base",
"mode_name",
"limit_total",
"limit_slow",
"limit_fast",
"limit_cpu",
"limit_total",
"fan_profile_cpu",
"fan_profile_gpu",
"fan_profile_mid",

View File

@@ -0,0 +1,211 @@
namespace GHelper.Peripherals.Mouse.Models
{
//P511
public class ChakramCore : AsusMouse
{
public ChakramCore() : base(0x0B05, 0x1958, "mi_00", false) {
}
public override int DPIProfileCount()
{
return 4;
}
public override string GetDisplayName()
{
return "ROG Chakram Core";
}
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 false;
}
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 };
}
public override bool IsLightingModeSupported(LightingMode lightingMode)
{
return lightingMode == LightingMode.Static
|| lightingMode == LightingMode.Breathing
|| lightingMode == LightingMode.ColorCycle
|| lightingMode == LightingMode.React;
}
//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 bool HasBattery()
{
return false;
}
public override bool HasAngleSnapping()
{
return true;
}
public override bool HasAngleTuning()
{
return false;
}
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;
}
protected override LiftOffDistance ParseLiftOffDistance(byte[] packet)
{
if (packet[1] != 0x12 || packet[2] != 0x06)
{
return LiftOffDistance.Low;
}
return (LiftOffDistance)packet[5];
}
protected override byte[] GetUpdateLiftOffDistancePacket(LiftOffDistance liftOffDistance)
{
return new byte[] { 0x00, 0x51, 0x35, 0x00, 0x00, ((byte)liftOffDistance) };
}
}
}

View File

@@ -0,0 +1,243 @@
namespace GHelper.Peripherals.Mouse.Models
{
//P504
public class GladiusIIOrigin : AsusMouse
{
public GladiusIIOrigin() : base(0x0B05, 0x1877, "mi_02", false)
{
}
public GladiusIIOrigin(ushort productId, string path) : base(0x0B05, productId, path, false)
{
}
public override int DPIProfileCount()
{
return 2;
}
public override string GetDisplayName()
{
return "Gladius II Origin";
}
public override PollingRate[] SupportedPollingrates()
{
return new PollingRate[] {
PollingRate.PR125Hz,
PollingRate.PR250Hz,
PollingRate.PR500Hz,
PollingRate.PR1000Hz
};
}
public override int ProfileCount()
{
return 1;
}
public override int MaxDPI()
{
return 12_000;
}
public override bool HasRGB()
{
return true;
}
public override bool HasAutoPowerOff()
{
return false;
}
public override bool HasAngleSnapping()
{
return true;
}
public override bool HasAngleTuning()
{
return false;
}
public override bool HasDebounceSetting()
{
return true;
}
public override bool HasLiftOffSetting()
{
return true;
}
public override bool HasLowBatteryWarning()
{
return false;
}
public override bool HasBattery()
{
return false;
}
public override bool HasDPIColors()
{
return false;
}
public override bool IsLightingModeSupported(LightingMode lightingMode)
{
return lightingMode == LightingMode.Static
|| lightingMode == LightingMode.Breathing
|| lightingMode == LightingMode.ColorCycle
|| lightingMode == LightingMode.Rainbow
|| lightingMode == LightingMode.React
|| lightingMode == LightingMode.Comet;
}
public override LightingZone[] SupportedLightingZones()
{
return new LightingZone[] { LightingZone.Logo, LightingZone.Scrollwheel, LightingZone.Underglow };
}
public override int DPIIncrements()
{
return 100;
}
public override bool CanChangeDPIProfile()
{
return true;
}
public override int MaxBrightness()
{
return 4;
}
protected override byte[] GetUpdateLightingModePacket(LightingSetting lightingSetting, LightingZone zone)
{
/*
* This mouse uses different speed values for rainbow mode compared to others.
* 51 28 03 00 03 04 FF 00 00 00 00 [8C] 00 00 00 00
* 51 28 03 00 03 04 FF 00 00 00 00 [64] 00 00 00 00
* 51 28 03 00 03 04 FF 00 00 00 00 [3F] 00 00 00 00
*/
if (lightingSetting.LightingMode == LightingMode.Rainbow)
{
byte speed = 0x3F;
switch (lightingSetting.AnimationSpeed)
{
case AnimationSpeed.Slow:
speed = 0x3F;
break;
case AnimationSpeed.Medium:
speed = 0x64;
break;
case AnimationSpeed.Fast:
speed = 0x8C;
break;
}
return new byte[] { reportId, 0x51, 0x28, (byte)zone, 0x00,
IndexForLightingMode(lightingSetting.LightingMode),
(byte)lightingSetting.Brightness,
0xFF, 0x00, 0x00,
(byte)(SupportsAnimationDirection(lightingSetting.LightingMode) ? lightingSetting.AnimationDirection : 0x00),
(byte)((lightingSetting.RandomColor && SupportsRandomColor(lightingSetting.LightingMode)) ? 0x01: 0x00),
(byte)(SupportsAnimationSpeed(lightingSetting.LightingMode) ? speed : 0x00)
};
}
return base.GetUpdateLightingModePacket(lightingSetting, zone);
}
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]);
return setting;
}
public override void ReadLightingSetting()
{
if (!HasRGB())
{
return;
}
//Mouse sends all lighting zones in one response Direction, Random col, Speed
//00 12 03 00 00 [00 04 ff 00 80] [00 04 00 ff ff] [00 04 ff ff ff] 00 [00] [00] [00] 00 00
//00 12 03 00 00 [03 04 00 00 00] [03 04 00 00 00] [03 04 00 00 00] 00 [00] [00] [07] 00 00
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;
}
ls.AnimationDirection = SupportsAnimationDirection(ls.LightingMode)
? (AnimationDirection)response[21]
: AnimationDirection.Clockwise;
ls.RandomColor = SupportsRandomColor(ls.LightingMode) && response[22] == 0x01;
ls.AnimationSpeed = SupportsAnimationSpeed(ls.LightingMode)
? (AnimationSpeed)response[23]
: AnimationSpeed.Medium;
if (ls.AnimationSpeed != AnimationSpeed.Fast
&& ls.AnimationSpeed != AnimationSpeed.Medium
&& ls.AnimationSpeed != AnimationSpeed.Slow)
{
ls.AnimationSpeed = AnimationSpeed.Medium;
}
Logger.WriteLine(GetDisplayName() + ": Read RGB Setting for Zone " + lz[i].ToString() + ": " + ls.ToString());
LightingSetting[i] = ls;
}
}
}
//P502
public class GladiusII : GladiusIIOrigin
{
public GladiusII() : base(0x1845, "mi_02")
{
}
public override string GetDisplayName()
{
return "Gladius II Origin";
}
public override int ProfileCount()
{
return 3;
}
}
}

View File

@@ -7,6 +7,10 @@
{
}
public TUFM3(ushort productId, string path) : base(0x0B05, productId, path, false)
{
}
public override int DPIProfileCount()
{
return 4;
@@ -109,4 +113,16 @@
|| lightingMode == LightingMode.React;
}
}
public class TUFM3GenII : TUFM3
{
public TUFM3GenII() : base(0x1A9B, "mi_02")
{
}
public override string GetDisplayName()
{
return "TUF GAMING M3 (Gen II)";
}
}
}

View File

@@ -187,6 +187,8 @@ namespace GHelper.Peripherals
DetectMouse(new ChakramXWired());
DetectMouse(new GladiusIIIAimpoint());
DetectMouse(new GladiusIIIAimpointWired());
DetectMouse(new GladiusIIOrigin());
DetectMouse(new GladiusII());
DetectMouse(new ROGKerisWireless());
DetectMouse(new ROGKerisWirelessWired());
DetectMouse(new ROGKerisWirelessEvaEdition());
@@ -200,6 +202,7 @@ namespace GHelper.Peripherals
DetectMouse(new HarpeAceAimLabEditionWired());
DetectMouse(new HarpeAceAimLabEditionOmni());
DetectMouse(new TUFM3());
DetectMouse(new TUFM3GenII());
DetectMouse(new TUFM5());
DetectMouse(new KerisWirelssAimpoint());
DetectMouse(new KerisWirelssAimpointWired());
@@ -208,6 +211,7 @@ namespace GHelper.Peripherals
DetectMouse(new StrixImpactII());
DetectMouse(new Chakram());
DetectMouse(new ChakramWired());
DetectMouse(new ChakramCore());
}
public static void DetectMouse(AsusMouse am)

View File

@@ -64,11 +64,12 @@ namespace GHelper
ProcessHelper.CheckAlreadyRunning();
try
{
acpi = new AsusACPI();
}
catch
Logger.WriteLine("------------");
Logger.WriteLine("App launched: " + AppConfig.GetModel() + " :" + Assembly.GetExecutingAssembly().GetName().Version.ToString() + CultureInfo.CurrentUICulture + (ProcessHelper.IsUserAdministrator() ? "." : ""));
acpi = new AsusACPI();
if (!acpi.IsConnected() && AppConfig.IsASUS())
{
DialogResult dialogResult = MessageBox.Show(Properties.Strings.ACPIError, Properties.Strings.StartupError, MessageBoxButtons.YesNo);
if (dialogResult == DialogResult.Yes)
@@ -80,9 +81,6 @@ namespace GHelper
return;
}
Logger.WriteLine("------------");
Logger.WriteLine("App launched: " + AppConfig.GetModel() + " :" + Assembly.GetExecutingAssembly().GetName().Version.ToString() + CultureInfo.CurrentUICulture + (ProcessHelper.IsUserAdministrator() ? "." : ""));
Application.EnableVisualStyles();
HardwareControl.RecreateGpuControl();
@@ -119,13 +117,42 @@ namespace GHelper
if (Environment.CurrentDirectory.Trim('\\') == Application.StartupPath.Trim('\\') || action.Length > 0)
{
SettingsToggle(action, false);
SettingsToggle(false);
}
switch (action)
{
case "cpu":
Startup.ReScheduleAdmin();
settingsForm.FansToggle();
break;
case "gpu":
Startup.ReScheduleAdmin();
settingsForm.FansToggle(1);
break;
case "gpurestart":
gpuControl.RestartGPU(false);
break;
case "services":
settingsForm.extraForm = new Extra();
settingsForm.extraForm.Show();
settingsForm.extraForm.ServiesToggle();
break;
case "uv":
Startup.ReScheduleAdmin();
settingsForm.FansToggle(2);
modeControl.SetRyzen();
break;
default:
Startup.StartupCheck();
break;
}
Application.Run();
}
private static void SystemEvents_SessionEnding(object sender, SessionEndingEventArgs e)
{
gpuControl.StandardModeFix();
@@ -213,7 +240,7 @@ namespace GHelper
SetAutoModes(true);
}
public static void SettingsToggle(string action = "", bool checkForFocus = true, bool trayClick = false)
public static void SettingsToggle(bool checkForFocus = true, bool trayClick = false)
{
if (settingsForm.Visible)
{
@@ -241,34 +268,6 @@ namespace GHelper
settingsForm.Top = Screen.FromControl(settingsForm).WorkingArea.Height - 10 - settingsForm.Height;
settingsForm.VisualiseGPUMode();
switch (action)
{
case "cpu":
Startup.ReScheduleAdmin();
settingsForm.FansToggle();
break;
case "gpu":
Startup.ReScheduleAdmin();
settingsForm.FansToggle(1);
break;
case "gpurestart":
gpuControl.RestartGPU(false);
break;
case "services":
settingsForm.extraForm = new Extra();
settingsForm.extraForm.Show();
settingsForm.extraForm.ServiesToggle();
break;
case "uv":
Startup.ReScheduleAdmin();
settingsForm.FansToggle(2);
modeControl.SetRyzen();
break;
default:
Startup.StartupCheck();
break;
}
}
}

View File

@@ -111,32 +111,32 @@ namespace GHelper.Properties {
}
/// <summary>
/// Looks up a localized resource of type System.Drawing.Icon similar to (Icon).
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>
internal static System.Drawing.Icon dot_eco {
internal static System.Drawing.Bitmap dot_eco {
get {
object obj = ResourceManager.GetObject("dot_eco", resourceCulture);
return ((System.Drawing.Icon)(obj));
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary>
/// Looks up a localized resource of type System.Drawing.Icon similar to (Icon).
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>
internal static System.Drawing.Icon dot_standard {
internal static System.Drawing.Bitmap dot_standard {
get {
object obj = ResourceManager.GetObject("dot_standard", resourceCulture);
return ((System.Drawing.Icon)(obj));
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary>
/// Looks up a localized resource of type System.Drawing.Icon similar to (Icon).
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>
internal static System.Drawing.Icon dot_ultimate {
internal static System.Drawing.Bitmap dot_ultimate {
get {
object obj = ResourceManager.GetObject("dot_ultimate", resourceCulture);
return ((System.Drawing.Icon)(obj));
return ((System.Drawing.Bitmap)(obj));
}
}

View File

@@ -293,12 +293,12 @@
<value>..\Resources\Font.otf;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="dot_eco" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\dot-eco.ico;System.Drawing.Icon, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
<value>..\Resources\dot-eco.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="dot_standard" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\dot-standard.ico;System.Drawing.Icon, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
<value>..\Resources\dot-standard.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="dot_ultimate" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\dot-ultimate.ico;System.Drawing.Icon, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
<value>..\Resources\dot-ultimate.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
</root>

View File

@@ -78,6 +78,24 @@ namespace GHelper.Properties {
}
}
/// <summary>
/// Looks up a localized string similar to Restart your device to apply changes.
/// </summary>
internal static string AlertAPUMemoryRestart {
get {
return ResourceManager.GetString("AlertAPUMemoryRestart", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Restart now?.
/// </summary>
internal static string AlertAPUMemoryRestartTitle {
get {
return ResourceManager.GetString("AlertAPUMemoryRestartTitle", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Looks like GPU is in heavy use, disable it?.
/// </summary>
@@ -195,6 +213,15 @@ namespace GHelper.Properties {
}
}
/// <summary>
/// Looks up a localized string similar to Memory Assigned to GPU.
/// </summary>
internal static string APUMemory {
get {
return ResourceManager.GetString("APUMemory", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Asus Services Running.
/// </summary>
@@ -429,6 +456,24 @@ namespace GHelper.Properties {
}
}
/// <summary>
/// Looks up a localized string similar to Backlight Timeout when on battery.
/// </summary>
internal static string BacklightTimeoutBattery {
get {
return ResourceManager.GetString("BacklightTimeoutBattery", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Backlight Timeout when plugged.
/// </summary>
internal static string BacklightTimeoutPlugged {
get {
return ResourceManager.GetString("BacklightTimeoutPlugged", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Balanced.
/// </summary>

View File

@@ -123,6 +123,12 @@
<data name="ACPIError" xml:space="preserve">
<value>Verbindung zu ASUS ACPI fehlgeschlagen. G-Helper kann nicht ausgeführt werden. Bitte installiere ASUS System Control Interface.</value>
</data>
<data name="AlertAPUMemoryRestart" xml:space="preserve">
<value>Restart your device to apply changes</value>
</data>
<data name="AlertAPUMemoryRestartTitle" xml:space="preserve">
<value>Restart now?</value>
</data>
<data name="AlertDGPU" xml:space="preserve">
<value>Die GPU wird gerade verwendet. Trotzdem deaktivieren?</value>
</data>
@@ -162,6 +168,9 @@
<data name="ApplyWindowsPowerPlan" xml:space="preserve">
<value>Windows Leistungsmodus automatisch anpassen</value>
</data>
<data name="APUMemory" xml:space="preserve">
<value>Memory Assigned to GPU</value>
</data>
<data name="AsusServicesRunning" xml:space="preserve">
<value>ASUS Dienste laufen</value>
</data>
@@ -240,6 +249,12 @@
<data name="BacklightTimeout" xml:space="preserve">
<value>Timeout angeschlossen / bei Akku (0 - AN)</value>
</data>
<data name="BacklightTimeoutBattery" xml:space="preserve">
<value>Backlight Timeout when on battery</value>
</data>
<data name="BacklightTimeoutPlugged" xml:space="preserve">
<value>Backlight Timeout when plugged</value>
</data>
<data name="Balanced" xml:space="preserve">
<value>Ausbalanciert</value>
</data>

View File

@@ -123,6 +123,12 @@
<data name="ACPIError" xml:space="preserve">
<value>No se pudo conectar con ASUS ACPI. La aplicación no puede funcionar sin el recurso. Instale Asus System Control Interface</value>
</data>
<data name="AlertAPUMemoryRestart" xml:space="preserve">
<value>Reinicia el dispositivo para aplicar los cambios</value>
</data>
<data name="AlertAPUMemoryRestartTitle" xml:space="preserve">
<value>¿Reiniciar ahora?</value>
</data>
<data name="AlertDGPU" xml:space="preserve">
<value>Detectado uso intensivo de la GPU, ¿deshabilitarla?</value>
</data>
@@ -162,6 +168,9 @@
<data name="ApplyWindowsPowerPlan" xml:space="preserve">
<value>Autoajustar plan de energía Windows</value>
</data>
<data name="APUMemory" xml:space="preserve">
<value>Memoria asignada a GPU</value>
</data>
<data name="AsusServicesRunning" xml:space="preserve">
<value>Servicios de Asus en ejecución</value>
</data>
@@ -240,6 +249,12 @@
<data name="BacklightTimeout" xml:space="preserve">
<value>Tiempo de espera conectado / con batería (0 - ON)</value>
</data>
<data name="BacklightTimeoutBattery" xml:space="preserve">
<value>Tiempo de retroiluminación con batería</value>
</data>
<data name="BacklightTimeoutPlugged" xml:space="preserve">
<value>Tiempo de retroiluminación conectado</value>
</data>
<data name="Balanced" xml:space="preserve">
<value>Equilibrado</value>
</data>

View File

@@ -123,6 +123,12 @@
<data name="ACPIError" xml:space="preserve">
<value>Connexion impossible avec ASUS ACPI. L'application ne peut fonctionner sans. Veuillez installer Asus System Control Interface</value>
</data>
<data name="AlertAPUMemoryRestart" xml:space="preserve">
<value>Redémarrez votre appareil pour appliquer les modifications</value>
</data>
<data name="AlertAPUMemoryRestartTitle" xml:space="preserve">
<value>Redémarrer maintenant ?</value>
</data>
<data name="AlertDGPU" xml:space="preserve">
<value>Le GPU semble être surchargé, voulez vous le désactiver ?</value>
</data>
@@ -162,6 +168,9 @@
<data name="ApplyWindowsPowerPlan" xml:space="preserve">
<value>Ajustement auto des modes de gestion alim. Windows</value>
</data>
<data name="APUMemory" xml:space="preserve">
<value>Mémoire attribuée au GPU</value>
</data>
<data name="AsusServicesRunning" xml:space="preserve">
<value>Services Asus actifs</value>
</data>
@@ -238,7 +247,13 @@
<value>Allumé</value>
</data>
<data name="BacklightTimeout" xml:space="preserve">
<value>Délai d'activation de la batterie (0 - ON)</value>
<value>Délai branché / sur batterie (0 - ON)</value>
</data>
<data name="BacklightTimeoutBattery" xml:space="preserve">
<value>Backlight Timeout when on battery</value>
</data>
<data name="BacklightTimeoutPlugged" xml:space="preserve">
<value>Backlight Timeout when plugged</value>
</data>
<data name="Balanced" xml:space="preserve">
<value>Équilibré</value>
@@ -313,7 +328,7 @@
<value>Éco</value>
</data>
<data name="EnableOptimusText" xml:space="preserve">
<value>Désactiver la dGPU en passant au mode Eco pendant que le mode d'affichage dans le panneau de configuration NVIDIA n'est pas réglé sur Optimus peut causer des problèmes avec les commandes de luminosité jusqu'au prochain redémarrage.
<value>Désactiver le dGPU en passant au mode Eco pendant que le mode d'affichage dans le panneau de configuration NVIDIA n'est pas réglé sur Optimus peut causer des problèmes avec les commandes de luminosité jusqu'au prochain redémarrage.
Voulez-vous continuer ?</value>
</data>
@@ -345,7 +360,7 @@ Voulez-vous continuer ?</value>
<value>Profil du ventilateur central</value>
</data>
<data name="FanProfiles" xml:space="preserve">
<value>Profil</value>
<value>Profil des ventilateurs</value>
</data>
<data name="FansAndPower" xml:space="preserve">
<value>Ventilateurs + Puissance</value>
@@ -390,7 +405,7 @@ Voulez-vous continuer ?</value>
<value>Température cible</value>
</data>
<data name="HibernateAfter" xml:space="preserve">
<value>Minutes jusqu'à la mise en veille prolongée sur la batterie (0 - OFF)</value>
<value>Minutes avant mise en veille prolongée sur batterie (0 - OFF)</value>
</data>
<data name="High" xml:space="preserve">
<value>Élevé</value>
@@ -405,7 +420,7 @@ Voulez-vous continuer ?</value>
<value>Arrêter toutes les applications utilisant la dGPU lors du passage au mode Eco</value>
</data>
<data name="LaptopBacklight" xml:space="preserve">
<value>Rétroéclairage de l'ordinateur</value>
<value>Rétroéclairage du clavier</value>
</data>
<data name="LaptopKeyboard" xml:space="preserve">
<value>Clavier de l'ordinateur</value>

View File

@@ -123,6 +123,12 @@
<data name="ACPIError" xml:space="preserve">
<value>Nem sikerült csatlakozni az ASUS ACPI-hez, az alkalmazás nem működik enélkül. Próbáld meg telepíteni az ASUS rendszervezérlő interfész-t</value>
</data>
<data name="AlertAPUMemoryRestart" xml:space="preserve">
<value>Restart your device to apply changes</value>
</data>
<data name="AlertAPUMemoryRestartTitle" xml:space="preserve">
<value>Restart now?</value>
</data>
<data name="AlertDGPU" xml:space="preserve">
<value>Úgy tűnik használatban van a GPU. Biztosan letiltod?</value>
</data>
@@ -162,6 +168,9 @@
<data name="ApplyWindowsPowerPlan" xml:space="preserve">
<value>A Windows energiagazdálkodási módok automatikus beállítása</value>
</data>
<data name="APUMemory" xml:space="preserve">
<value>Memory Assigned to GPU</value>
</data>
<data name="AsusServicesRunning" xml:space="preserve">
<value>Asus szolgáltatások futnak</value>
</data>
@@ -240,6 +249,12 @@
<data name="BacklightTimeout" xml:space="preserve">
<value>Késleltetés töltés / akku módban (0 - BE)</value>
</data>
<data name="BacklightTimeoutBattery" xml:space="preserve">
<value>Backlight Timeout when on battery</value>
</data>
<data name="BacklightTimeoutPlugged" xml:space="preserve">
<value>Backlight Timeout when plugged</value>
</data>
<data name="Balanced" xml:space="preserve">
<value>Teljesítmény</value>
</data>

View File

@@ -123,6 +123,12 @@
<data name="ACPIError" xml:space="preserve">
<value>Tidak dapat terhubung ke ASUS ACPI. tanpanya aplikasi tidak dapat berfungsi. Cobalah untuk menginstal Asus System Control Interface</value>
</data>
<data name="AlertAPUMemoryRestart" xml:space="preserve">
<value>Restart your device to apply changes</value>
</data>
<data name="AlertAPUMemoryRestartTitle" xml:space="preserve">
<value>Restart now?</value>
</data>
<data name="AlertDGPU" xml:space="preserve">
<value>Tampaknya GPU sedang digunakan intensif, nonaktifkan?</value>
</data>
@@ -162,6 +168,9 @@
<data name="ApplyWindowsPowerPlan" xml:space="preserve">
<value>Otomatis sesuaikan Mode Daya Windows</value>
</data>
<data name="APUMemory" xml:space="preserve">
<value>Memory Assigned to GPU</value>
</data>
<data name="AsusServicesRunning" xml:space="preserve">
<value>Layanan Asus Berjalan</value>
</data>
@@ -240,6 +249,12 @@
<data name="BacklightTimeout" xml:space="preserve">
<value>Waktu tunggu dicolokan / menggunakan baterai (0 - Hidup)</value>
</data>
<data name="BacklightTimeoutBattery" xml:space="preserve">
<value>Backlight Timeout when on battery</value>
</data>
<data name="BacklightTimeoutPlugged" xml:space="preserve">
<value>Backlight Timeout when plugged</value>
</data>
<data name="Balanced" xml:space="preserve">
<value>Seimbang</value>
</data>

View File

@@ -123,6 +123,12 @@
<data name="ACPIError" xml:space="preserve">
<value>Impossibile connettersi ad ASUS ACPI. Senza di essa l'applicazione non può funzionare. Prova ad installare Asus System Control Interface</value>
</data>
<data name="AlertAPUMemoryRestart" xml:space="preserve">
<value>Restart your device to apply changes</value>
</data>
<data name="AlertAPUMemoryRestartTitle" xml:space="preserve">
<value>Restart now?</value>
</data>
<data name="AlertDGPU" xml:space="preserve">
<value>Uso intensivo della GPU, disabilitare?</value>
</data>
@@ -162,6 +168,9 @@
<data name="ApplyWindowsPowerPlan" xml:space="preserve">
<value>Regola Piano Energetico di Windows in automatico</value>
</data>
<data name="APUMemory" xml:space="preserve">
<value>Memory Assigned to GPU</value>
</data>
<data name="AsusServicesRunning" xml:space="preserve">
<value>Servizi Asus in Esecuzione</value>
</data>
@@ -240,6 +249,12 @@
<data name="BacklightTimeout" xml:space="preserve">
<value>Timeout in carica / a batteria (0 - ACCESO)</value>
</data>
<data name="BacklightTimeoutBattery" xml:space="preserve">
<value>Backlight Timeout when on battery</value>
</data>
<data name="BacklightTimeoutPlugged" xml:space="preserve">
<value>Backlight Timeout when plugged</value>
</data>
<data name="Balanced" xml:space="preserve">
<value>Bilanciato</value>
</data>

View File

@@ -123,6 +123,12 @@
<data name="ACPIError" xml:space="preserve">
<value>ASUS ACPI에 연결할 수 없어 응용 프로그램이 작동하지 않습니다. Asus System Control Interface를 먼저 설치하십시오.</value>
</data>
<data name="AlertAPUMemoryRestart" xml:space="preserve">
<value>Restart your device to apply changes</value>
</data>
<data name="AlertAPUMemoryRestartTitle" xml:space="preserve">
<value>Restart now?</value>
</data>
<data name="AlertDGPU" xml:space="preserve">
<value>GPU 사용량이 높습니다. 비활성화 하시겠습니까?</value>
</data>
@@ -162,6 +168,9 @@
<data name="ApplyWindowsPowerPlan" xml:space="preserve">
<value>윈도우 전원 모드 자동조절</value>
</data>
<data name="APUMemory" xml:space="preserve">
<value>Memory Assigned to GPU</value>
</data>
<data name="AsusServicesRunning" xml:space="preserve">
<value>실행중인 Asus 서비스</value>
</data>
@@ -240,6 +249,12 @@
<data name="BacklightTimeout" xml:space="preserve">
<value>전원 / 배터리 사용 중 자동 꺼짐 시간 (0 - 항상 켜짐)</value>
</data>
<data name="BacklightTimeoutBattery" xml:space="preserve">
<value>Backlight Timeout when on battery</value>
</data>
<data name="BacklightTimeoutPlugged" xml:space="preserve">
<value>Backlight Timeout when plugged</value>
</data>
<data name="Balanced" xml:space="preserve">
<value>균형</value>
</data>

View File

@@ -123,6 +123,12 @@
<data name="ACPIError" xml:space="preserve">
<value>Nepavyko prisijungti prie ASUS ACPI. Programėlė be jo negali veikti. Pabandykite įdiegti Asus System Control Interface</value>
</data>
<data name="AlertAPUMemoryRestart" xml:space="preserve">
<value>Restart your device to apply changes</value>
</data>
<data name="AlertAPUMemoryRestartTitle" xml:space="preserve">
<value>Restart now?</value>
</data>
<data name="AlertDGPU" xml:space="preserve">
<value>Panašu, kad jūsų GPU yra intensyviai naudojamas. Išjungti jį?</value>
</data>
@@ -162,6 +168,9 @@
<data name="ApplyWindowsPowerPlan" xml:space="preserve">
<value>Automatiškai derinti Windows energijos režimus</value>
</data>
<data name="APUMemory" xml:space="preserve">
<value>Memory Assigned to GPU</value>
</data>
<data name="AsusServicesRunning" xml:space="preserve">
<value>Veikiančios Asus tarnybos</value>
</data>
@@ -240,6 +249,12 @@
<data name="BacklightTimeout" xml:space="preserve">
<value>Laiko riba su lizdu / akumuliatoriumi (0 ĮJUNGTA)</value>
</data>
<data name="BacklightTimeoutBattery" xml:space="preserve">
<value>Backlight Timeout when on battery</value>
</data>
<data name="BacklightTimeoutPlugged" xml:space="preserve">
<value>Backlight Timeout when plugged</value>
</data>
<data name="Balanced" xml:space="preserve">
<value>Balansuotas</value>
</data>

View File

@@ -123,6 +123,12 @@
<data name="ACPIError" xml:space="preserve">
<value>Nie można odnaleźć sterownika ASUS ACPI. Aplikacja nie może bez niego funkcjonować. Spróbuj zainstalować Asus System Control Interface</value>
</data>
<data name="AlertAPUMemoryRestart" xml:space="preserve">
<value>Uruchom ponownie, aby zastosować ustawienia</value>
</data>
<data name="AlertAPUMemoryRestartTitle" xml:space="preserve">
<value>Uruchomić ponownie teraz?</value>
</data>
<data name="AlertDGPU" xml:space="preserve">
<value>Wygląda na to, że GPU jest mocno obciążone. Wyłączyć?</value>
</data>
@@ -162,6 +168,9 @@
<data name="ApplyWindowsPowerPlan" xml:space="preserve">
<value>Dostosuj systemowy Tryb Zasilania</value>
</data>
<data name="APUMemory" xml:space="preserve">
<value>Pamięć przypisana do GPU</value>
</data>
<data name="AsusServicesRunning" xml:space="preserve">
<value>Uruchomione usługi Asus</value>
</data>
@@ -240,6 +249,12 @@
<data name="BacklightTimeout" xml:space="preserve">
<value>Limit czasu podłączonego / na baterii (0 - Włączony)</value>
</data>
<data name="BacklightTimeoutBattery" xml:space="preserve">
<value>Czas podświetlenia na baterii</value>
</data>
<data name="BacklightTimeoutPlugged" xml:space="preserve">
<value>Czas podświetlenia po podłączeniu</value>
</data>
<data name="Balanced" xml:space="preserve">
<value>Balans</value>
</data>

View File

@@ -123,6 +123,12 @@
<data name="ACPIError" xml:space="preserve">
<value>Não foi possível conectar ao ASUS ACPI. O aplicativo não pode funcionar sem isso. Tente instalar Asus System Controle Interface</value>
</data>
<data name="AlertAPUMemoryRestart" xml:space="preserve">
<value>Restart your device to apply changes</value>
</data>
<data name="AlertAPUMemoryRestartTitle" xml:space="preserve">
<value>Restart now?</value>
</data>
<data name="AlertDGPU" xml:space="preserve">
<value>Parece que o GPU está em uso pesado.</value>
</data>
@@ -162,6 +168,9 @@
<data name="ApplyWindowsPowerPlan" xml:space="preserve">
<value>Ajuste automático dos modos de energia do Windows</value>
</data>
<data name="APUMemory" xml:space="preserve">
<value>Memory Assigned to GPU</value>
</data>
<data name="AsusServicesRunning" xml:space="preserve">
<value>Serviços da Asus em execução</value>
</data>
@@ -240,6 +249,12 @@
<data name="BacklightTimeout" xml:space="preserve">
<value>Tempo limite plugado / na bateria (0 - ligado)</value>
</data>
<data name="BacklightTimeoutBattery" xml:space="preserve">
<value>Backlight Timeout when on battery</value>
</data>
<data name="BacklightTimeoutPlugged" xml:space="preserve">
<value>Backlight Timeout when plugged</value>
</data>
<data name="Balanced" xml:space="preserve">
<value>Equilibrado</value>
</data>

View File

@@ -123,6 +123,12 @@
<data name="ACPIError" xml:space="preserve">
<value>Não foi possível conectar ao ASUS ACPI. O programa não funciona sem esse serviço. Tente instalar Asus System Control Interface</value>
</data>
<data name="AlertAPUMemoryRestart" xml:space="preserve">
<value>Restart your device to apply changes</value>
</data>
<data name="AlertAPUMemoryRestartTitle" xml:space="preserve">
<value>Restart now?</value>
</data>
<data name="AlertDGPU" xml:space="preserve">
<value>Parece que o GPU está em uso pesado, desativá-lo?</value>
</data>
@@ -162,6 +168,9 @@
<data name="ApplyWindowsPowerPlan" xml:space="preserve">
<value>Ajuste automático dos modos de energia do Windows</value>
</data>
<data name="APUMemory" xml:space="preserve">
<value>Memory Assigned to GPU</value>
</data>
<data name="AsusServicesRunning" xml:space="preserve">
<value>Serviços da Asus em execução</value>
</data>
@@ -240,6 +249,12 @@
<data name="BacklightTimeout" xml:space="preserve">
<value>Tempo limite ligado à corrente / na bateria (0 - ON)</value>
</data>
<data name="BacklightTimeoutBattery" xml:space="preserve">
<value>Backlight Timeout when on battery</value>
</data>
<data name="BacklightTimeoutPlugged" xml:space="preserve">
<value>Backlight Timeout when plugged</value>
</data>
<data name="Balanced" xml:space="preserve">
<value>Equilibrado</value>
</data>
@@ -253,7 +268,7 @@
<value>Estado da bateria</value>
</data>
<data name="BatteryLimitFull" xml:space="preserve">
<value>One time charge to 100%</value>
<value>Carregamento único até 100%</value>
</data>
<data name="BiosAndDriverUpdates" xml:space="preserve">
<value>Atualizações de Drivers e da BIOS</value>
@@ -262,7 +277,7 @@
<value>Ao ligar</value>
</data>
<data name="BootSound" xml:space="preserve">
<value>Boot Sound</value>
<value>Som de ligar</value>
</data>
<data name="Brightness" xml:space="preserve">
<value>Nível do brilho</value>
@@ -274,7 +289,7 @@
<value>Aumentar o brilho</value>
</data>
<data name="Calibrate" xml:space="preserve">
<value>Calibrate</value>
<value>Calibrar</value>
</data>
<data name="Charging" xml:space="preserve">
<value>Carregando</value>

View File

@@ -123,6 +123,12 @@
<data name="ACPIError" xml:space="preserve">
<value>Can't connect to ASUS ACPI. Application can't function without it. Try to install Asus System Control Interface</value>
</data>
<data name="AlertAPUMemoryRestart" xml:space="preserve">
<value>Restart your device to apply changes</value>
</data>
<data name="AlertAPUMemoryRestartTitle" xml:space="preserve">
<value>Restart now?</value>
</data>
<data name="AlertDGPU" xml:space="preserve">
<value>Looks like GPU is in heavy use, disable it?</value>
</data>
@@ -162,6 +168,9 @@
<data name="ApplyWindowsPowerPlan" xml:space="preserve">
<value>Auto adjust Windows Power Modes</value>
</data>
<data name="APUMemory" xml:space="preserve">
<value>Memory Assigned to GPU</value>
</data>
<data name="AsusServicesRunning" xml:space="preserve">
<value>Asus Services Running</value>
</data>
@@ -240,6 +249,12 @@
<data name="BacklightTimeout" xml:space="preserve">
<value>Timeout plugged / on battery (0 - ON)</value>
</data>
<data name="BacklightTimeoutBattery" xml:space="preserve">
<value>Backlight Timeout when on battery</value>
</data>
<data name="BacklightTimeoutPlugged" xml:space="preserve">
<value>Backlight Timeout when plugged</value>
</data>
<data name="Balanced" xml:space="preserve">
<value>Balanced</value>
</data>

View File

@@ -123,6 +123,12 @@
<data name="ACPIError" xml:space="preserve">
<value>Nu se poate conecta la ASUS ACPI. Aplicația nu poate funcționa fără aceasta. Încercați să instalați Asus System Control Interface</value>
</data>
<data name="AlertAPUMemoryRestart" xml:space="preserve">
<value>Restart your device to apply changes</value>
</data>
<data name="AlertAPUMemoryRestartTitle" xml:space="preserve">
<value>Restart now?</value>
</data>
<data name="AlertDGPU" xml:space="preserve">
<value>Se pare că GPU-ul este folosit intens, dezactivați?</value>
</data>
@@ -162,6 +168,9 @@
<data name="ApplyWindowsPowerPlan" xml:space="preserve">
<value>Reglare automată a modului de alimentare Windows</value>
</data>
<data name="APUMemory" xml:space="preserve">
<value>Memory Assigned to GPU</value>
</data>
<data name="AsusServicesRunning" xml:space="preserve">
<value>Servicii Asus în derulare</value>
</data>
@@ -240,6 +249,12 @@
<data name="BacklightTimeout" xml:space="preserve">
<value>Timeout conectat / folosind bateria (0 - ON)</value>
</data>
<data name="BacklightTimeoutBattery" xml:space="preserve">
<value>Backlight Timeout when on battery</value>
</data>
<data name="BacklightTimeoutPlugged" xml:space="preserve">
<value>Backlight Timeout when plugged</value>
</data>
<data name="Balanced" xml:space="preserve">
<value>Echilibrat</value>
</data>

View File

@@ -123,6 +123,12 @@
<data name="ACPIError" xml:space="preserve">
<value>ASUS ACPI'ye bağlanılamıyor. Uygulama o olmadan çalışamaz. Asus Sistem Kontrol Arayüzü'nü yüklemeyi deneyin.</value>
</data>
<data name="AlertAPUMemoryRestart" xml:space="preserve">
<value>Değişiklikleri uygulamak için cihazınızı yeniden başlatın</value>
</data>
<data name="AlertAPUMemoryRestartTitle" xml:space="preserve">
<value>Şimdi yeniden başlatılsın mı?</value>
</data>
<data name="AlertDGPU" xml:space="preserve">
<value>Görünüşe göre GPU yoğun bir şekilde kullanılıyor, devre dışı bırakılsın mı?</value>
</data>
@@ -162,6 +168,9 @@
<data name="ApplyWindowsPowerPlan" xml:space="preserve">
<value>Windows Güç Modunu otomatik ayarla</value>
</data>
<data name="APUMemory" xml:space="preserve">
<value>GPU'ya Atanan Bellek</value>
</data>
<data name="AsusServicesRunning" xml:space="preserve">
<value>Çalışan Asus Hizmetleri</value>
</data>
@@ -240,6 +249,12 @@
<data name="BacklightTimeout" xml:space="preserve">
<value>Pildeyken klavye ışığının kapanma süresi</value>
</data>
<data name="BacklightTimeoutBattery" xml:space="preserve">
<value>Backlight Timeout when on battery</value>
</data>
<data name="BacklightTimeoutPlugged" xml:space="preserve">
<value>Backlight Timeout when plugged</value>
</data>
<data name="Balanced" xml:space="preserve">
<value>Dengeli</value>
</data>
@@ -369,7 +384,7 @@ Yine de devam etmek istiyor musunuz?</value>
<value>Çekirdek Frekans Dengesi</value>
</data>
<data name="GPUMemoryClockOffset" xml:space="preserve">
<value>Hafıza Frekans Dengesi</value>
<value>Bellek Frekans Dengesi</value>
</data>
<data name="GPUMode" xml:space="preserve">
<value>GPU Modu</value>

View File

@@ -123,6 +123,12 @@
<data name="ACPIError" xml:space="preserve">
<value>Не вдається під'єднатися до ASUS ACPI. Програма не може працювати без нього. Спробуйте встановити Asus System Control Interface</value>
</data>
<data name="AlertAPUMemoryRestart" xml:space="preserve">
<value>Перезавантажте ваш пристрій, щоб зміни набули чинності</value>
</data>
<data name="AlertAPUMemoryRestartTitle" xml:space="preserve">
<value>Перезавантажити зараз?</value>
</data>
<data name="AlertDGPU" xml:space="preserve">
<value>Здається, що GPU використовується, вимкнути її?</value>
</data>
@@ -162,6 +168,9 @@
<data name="ApplyWindowsPowerPlan" xml:space="preserve">
<value>Автоматично застосовувати Windows Power Modes</value>
</data>
<data name="APUMemory" xml:space="preserve">
<value>Memory Assigned to GPU</value>
</data>
<data name="AsusServicesRunning" xml:space="preserve">
<value>Кількість запущених сервісів Asus</value>
</data>
@@ -240,6 +249,12 @@
<data name="BacklightTimeout" xml:space="preserve">
<value>Тайм-аут на зарядці / на батареї (0 - УВІМК)</value>
</data>
<data name="BacklightTimeoutBattery" xml:space="preserve">
<value>Backlight Timeout when on battery</value>
</data>
<data name="BacklightTimeoutPlugged" xml:space="preserve">
<value>Backlight Timeout when plugged</value>
</data>
<data name="Balanced" xml:space="preserve">
<value>Баланс</value>
</data>

View File

@@ -123,6 +123,12 @@
<data name="ACPIError" xml:space="preserve">
<value>Không thể kết nối đến ASUS ACPI. Chương trình cần nó để có thể hoạt động. Hãy thử cài lại Asus System Control Interface</value>
</data>
<data name="AlertAPUMemoryRestart" xml:space="preserve">
<value>Restart your device to apply changes</value>
</data>
<data name="AlertAPUMemoryRestartTitle" xml:space="preserve">
<value>Restart now?</value>
</data>
<data name="AlertDGPU" xml:space="preserve">
<value>Có vẻ như GPU rời đang được sử dụng nhiều, tắt nó?</value>
</data>
@@ -162,6 +168,9 @@
<data name="ApplyWindowsPowerPlan" xml:space="preserve">
<value>Tự động điều chỉnh Kế hoạch nguồn của Windows</value>
</data>
<data name="APUMemory" xml:space="preserve">
<value>Memory Assigned to GPU</value>
</data>
<data name="AsusServicesRunning" xml:space="preserve">
<value>Dịch vụ Asus đang chạy</value>
</data>
@@ -240,6 +249,12 @@
<data name="BacklightTimeout" xml:space="preserve">
<value>Số giây để tắt đèn nền bàn phím(khi dùng pin)</value>
</data>
<data name="BacklightTimeoutBattery" xml:space="preserve">
<value>Backlight Timeout when on battery</value>
</data>
<data name="BacklightTimeoutPlugged" xml:space="preserve">
<value>Backlight Timeout when plugged</value>
</data>
<data name="Balanced" xml:space="preserve">
<value>Cân bằng</value>
</data>

View File

@@ -123,6 +123,12 @@
<data name="ACPIError" xml:space="preserve">
<value>无法连接到ASUS ACPI。 没有它应用程序将无法运行。 请尝试安装Asus System Control Interface驱动。</value>
</data>
<data name="AlertAPUMemoryRestart" xml:space="preserve">
<value>重新启动您的设备以应用更改</value>
</data>
<data name="AlertAPUMemoryRestartTitle" xml:space="preserve">
<value>现在重启?</value>
</data>
<data name="AlertDGPU" xml:space="preserve">
<value>看起来 GPU 正在被重度使用,是否禁用?</value>
</data>
@@ -162,6 +168,9 @@
<data name="ApplyWindowsPowerPlan" xml:space="preserve">
<value>自动调整Windows电源模式</value>
</data>
<data name="APUMemory" xml:space="preserve">
<value>分配给 GPU 的内存</value>
</data>
<data name="AsusServicesRunning" xml:space="preserve">
<value>正在运行的 Asus 服务</value>
</data>
@@ -240,6 +249,12 @@
<data name="BacklightTimeout" xml:space="preserve">
<value>插电/电池时熄灭时间0表示长亮</value>
</data>
<data name="BacklightTimeoutBattery" xml:space="preserve">
<value>充电模式下的背光超时</value>
</data>
<data name="BacklightTimeoutPlugged" xml:space="preserve">
<value>电源模式下的背光超时</value>
</data>
<data name="Balanced" xml:space="preserve">
<value>平衡模式</value>
</data>

View File

@@ -123,6 +123,12 @@
<data name="ACPIError" xml:space="preserve">
<value>無法連結到華碩 ACPI。 没有它,應用程式將無法執行。 嘗試安裝Asus System Control Interface</value>
</data>
<data name="AlertAPUMemoryRestart" xml:space="preserve">
<value>重新啟動裝置以套用變更</value>
</data>
<data name="AlertAPUMemoryRestartTitle" xml:space="preserve">
<value>現在重新啟動?</value>
</data>
<data name="AlertDGPU" xml:space="preserve">
<value>看起来 GPU 正在大量使用,是否禁用它?</value>
</data>
@@ -162,6 +168,9 @@
<data name="ApplyWindowsPowerPlan" xml:space="preserve">
<value>自動調整Windows電源模式</value>
</data>
<data name="APUMemory" xml:space="preserve">
<value>分配給GPU的記憶體</value>
</data>
<data name="AsusServicesRunning" xml:space="preserve">
<value>執行中的華碩服務</value>
</data>
@@ -240,6 +249,12 @@
<data name="BacklightTimeout" xml:space="preserve">
<value>閒置幾秒後關閉燈光:插電時 / 使用電池 (0 = 不關閉)</value>
</data>
<data name="BacklightTimeoutBattery" xml:space="preserve">
<value>Backlight Timeout when on battery</value>
</data>
<data name="BacklightTimeoutPlugged" xml:space="preserve">
<value>Backlight Timeout when plugged</value>
</data>
<data name="Balanced" xml:space="preserve">
<value>平衡模式</value>
</data>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 17 KiB

BIN
app/Resources/dot-eco.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 730 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 735 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 551 B

View File

@@ -145,7 +145,6 @@ namespace GHelper
//
// panelMatrix
//
panelMatrix.AccessibleName = "Anime Matrix";
panelMatrix.AccessibleRole = AccessibleRole.Grouping;
panelMatrix.AutoSize = true;
panelMatrix.AutoSizeMode = AutoSizeMode.GrowAndShrink;
@@ -206,10 +205,10 @@ namespace GHelper
comboMatrixRunning.FormattingEnabled = true;
comboMatrixRunning.ItemHeight = 32;
comboMatrixRunning.Items.AddRange(new object[] { Properties.Strings.MatrixBanner, Properties.Strings.MatrixLogo, Properties.Strings.MatrixPicture, Properties.Strings.MatrixClock, Properties.Strings.MatrixAudio });
comboMatrixRunning.Location = new Point(266, 11);
comboMatrixRunning.Margin = new Padding(4, 11, 4, 8);
comboMatrixRunning.Location = new Point(269, 11);
comboMatrixRunning.Margin = new Padding(7, 11, 7, 8);
comboMatrixRunning.Name = "comboMatrixRunning";
comboMatrixRunning.Size = new Size(254, 40);
comboMatrixRunning.Size = new Size(248, 40);
comboMatrixRunning.TabIndex = 17;
//
// buttonMatrix
@@ -312,7 +311,6 @@ namespace GHelper
//
// sliderBattery
//
sliderBattery.AccessibleName = "Battery Charge Limit";
sliderBattery.Anchor = AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right;
sliderBattery.Location = new Point(20, 65);
sliderBattery.Margin = new Padding(4);
@@ -420,7 +418,6 @@ namespace GHelper
//
// buttonQuit
//
buttonQuit.AccessibleName = "Quit Application";
buttonQuit.Activated = false;
buttonQuit.BackColor = SystemColors.ControlLight;
buttonQuit.BorderColor = Color.Transparent;
@@ -441,7 +438,6 @@ namespace GHelper
//
// buttonUpdates
//
buttonUpdates.AccessibleName = "BIOS and Driver Updates";
buttonUpdates.Activated = false;
buttonUpdates.BackColor = SystemColors.ControlLight;
buttonUpdates.BorderColor = Color.Transparent;
@@ -473,7 +469,6 @@ namespace GHelper
//
// panelPerformance
//
panelPerformance.AccessibleName = "Performance";
panelPerformance.AccessibleRole = AccessibleRole.Grouping;
panelPerformance.AutoSize = true;
panelPerformance.AutoSizeMode = AutoSizeMode.GrowAndShrink;
@@ -512,7 +507,6 @@ namespace GHelper
//
// buttonSilent
//
buttonSilent.AccessibleName = "Silent Mode";
buttonSilent.Activated = false;
buttonSilent.BackColor = SystemColors.ControlLightLight;
buttonSilent.BackgroundImageLayout = ImageLayout.None;
@@ -536,7 +530,6 @@ namespace GHelper
//
// buttonBalanced
//
buttonBalanced.AccessibleName = "Balanced Mode";
buttonBalanced.Activated = false;
buttonBalanced.BackColor = SystemColors.ControlLightLight;
buttonBalanced.BorderColor = Color.Transparent;
@@ -559,7 +552,6 @@ namespace GHelper
//
// buttonTurbo
//
buttonTurbo.AccessibleName = "Turbo Mode";
buttonTurbo.Activated = false;
buttonTurbo.BackColor = SystemColors.ControlLightLight;
buttonTurbo.BorderColor = Color.Transparent;
@@ -582,7 +574,6 @@ namespace GHelper
//
// buttonFans
//
buttonFans.AccessibleName = "Fans and Power Settings";
buttonFans.Activated = false;
buttonFans.BackColor = SystemColors.ControlLight;
buttonFans.BorderColor = Color.Transparent;
@@ -654,7 +645,6 @@ namespace GHelper
//
// panelGPU
//
panelGPU.AccessibleName = "GPU";
panelGPU.AccessibleRole = AccessibleRole.Grouping;
panelGPU.AutoSize = true;
panelGPU.AutoSizeMode = AutoSizeMode.GrowAndShrink;
@@ -731,7 +721,6 @@ namespace GHelper
//
// buttonEco
//
buttonEco.AccessibleName = "Eco GPU Mode";
buttonEco.Activated = false;
buttonEco.BackColor = SystemColors.ControlLightLight;
buttonEco.BorderColor = Color.Transparent;
@@ -755,7 +744,6 @@ namespace GHelper
//
// buttonStandard
//
buttonStandard.AccessibleName = "Standard GPU Mode";
buttonStandard.Activated = false;
buttonStandard.BackColor = SystemColors.ControlLightLight;
buttonStandard.BorderColor = Color.Transparent;
@@ -801,7 +789,6 @@ namespace GHelper
//
// buttonOptimized
//
buttonOptimized.AccessibleName = "Optimized GPU Mode";
buttonOptimized.Activated = false;
buttonOptimized.BackColor = SystemColors.ControlLightLight;
buttonOptimized.BorderColor = Color.Transparent;
@@ -824,7 +811,6 @@ namespace GHelper
//
// buttonUltimate
//
buttonUltimate.AccessibleName = "Ultimate GPU Mode";
buttonUltimate.Activated = false;
buttonUltimate.BackColor = SystemColors.ControlLightLight;
buttonUltimate.BorderColor = Color.Transparent;
@@ -892,7 +878,6 @@ namespace GHelper
//
// panelScreen
//
panelScreen.AccessibleName = "Screen";
panelScreen.AccessibleRole = AccessibleRole.Grouping;
panelScreen.AutoSize = true;
panelScreen.AutoSizeMode = AutoSizeMode.GrowAndShrink;
@@ -942,7 +927,6 @@ namespace GHelper
//
// buttonScreenAuto
//
buttonScreenAuto.AccessibleName = "Auto Screen Refresh Rate";
buttonScreenAuto.Activated = false;
buttonScreenAuto.BackColor = SystemColors.ControlLightLight;
buttonScreenAuto.BorderColor = Color.Transparent;
@@ -962,7 +946,6 @@ namespace GHelper
//
// button60Hz
//
button60Hz.AccessibleName = "60Hz Refresh Rate";
button60Hz.Activated = false;
button60Hz.BackColor = SystemColors.ControlLightLight;
button60Hz.BorderColor = Color.Transparent;
@@ -983,7 +966,6 @@ namespace GHelper
//
// button120Hz
//
button120Hz.AccessibleName = "Maximum Refresh Rate";
button120Hz.Activated = false;
button120Hz.BackColor = SystemColors.ControlLightLight;
button120Hz.BorderColor = Color.Transparent;
@@ -1068,7 +1050,6 @@ namespace GHelper
//
// panelKeyboard
//
panelKeyboard.AccessibleName = "Keyboard";
panelKeyboard.AccessibleRole = AccessibleRole.Grouping;
panelKeyboard.AutoSize = true;
panelKeyboard.AutoSizeMode = AutoSizeMode.GrowAndShrink;
@@ -1105,7 +1086,6 @@ namespace GHelper
//
// buttonKeyboard
//
buttonKeyboard.AccessibleName = "Extra Settings";
buttonKeyboard.Activated = false;
buttonKeyboard.BackColor = SystemColors.ControlLight;
buttonKeyboard.BorderColor = Color.Transparent;
@@ -1160,7 +1140,6 @@ namespace GHelper
//
// buttonKeyboardColor
//
buttonKeyboardColor.AccessibleName = "Keyboard Color";
buttonKeyboardColor.Activated = false;
buttonKeyboardColor.BackColor = SystemColors.ButtonHighlight;
buttonKeyboardColor.BorderColor = Color.Transparent;
@@ -1179,7 +1158,6 @@ namespace GHelper
//
// comboKeyboard
//
comboKeyboard.AccessibleName = "Keyboard Backlight Mode";
comboKeyboard.BorderColor = Color.White;
comboKeyboard.ButtonColor = Color.FromArgb(255, 255, 255);
comboKeyboard.Dock = DockStyle.Top;
@@ -1310,7 +1288,6 @@ namespace GHelper
//
// buttonPeripheral3
//
buttonPeripheral3.AccessibleName = "Peripheral 3";
buttonPeripheral3.Activated = false;
buttonPeripheral3.BackColor = SystemColors.ControlLightLight;
buttonPeripheral3.BorderColor = Color.Transparent;
@@ -1335,7 +1312,6 @@ namespace GHelper
//
// buttonPeripheral2
//
buttonPeripheral2.AccessibleName = "Peripheral 2";
buttonPeripheral2.Activated = false;
buttonPeripheral2.BackColor = SystemColors.ControlLightLight;
buttonPeripheral2.BorderColor = Color.Transparent;
@@ -1360,7 +1336,6 @@ namespace GHelper
//
// buttonPeripheral1
//
buttonPeripheral1.AccessibleName = "Peripheral 1";
buttonPeripheral1.Activated = false;
buttonPeripheral1.BackColor = SystemColors.ControlLightLight;
buttonPeripheral1.BorderColor = Color.Transparent;
@@ -1439,7 +1414,6 @@ namespace GHelper
MinimumSize = new Size(822, 71);
Name = "SettingsForm";
Padding = new Padding(11);
ShowIcon = true;
StartPosition = FormStartPosition.CenterScreen;
Text = "G-Helper";
panelMatrix.ResumeLayout(false);
@@ -1574,4 +1548,4 @@ namespace GHelper
private RButton buttonFnLock;
private RButton buttonBatteryFull;
}
}
}

View File

@@ -16,14 +16,12 @@ using System.Timers;
namespace GHelper
{
public partial class SettingsForm : RForm
{
ContextMenuStrip contextMenuStrip = new CustomContextMenu();
ToolStripMenuItem menuSilent, menuBalanced, menuTurbo, menuEco, menuStandard, menuUltimate, menuOptimized;
GPUModeControl gpuControl;
public GPUModeControl gpuControl;
ScreenControl screenControl = new ScreenControl();
AutoUpdateControl updateControl;
@@ -89,6 +87,33 @@ namespace GHelper
buttonQuit.Text = Properties.Strings.Quit;
buttonUpdates.Text = Properties.Strings.Updates;
// Accessible Labels
panelMatrix.AccessibleName = Properties.Strings.AnimeMatrix;
sliderBattery.AccessibleName = Properties.Strings.BatteryChargeLimit;
buttonQuit.AccessibleName = Properties.Strings.Quit;
buttonUpdates.AccessibleName = Properties.Strings.BiosAndDriverUpdates;
panelPerformance.AccessibleName = Properties.Strings.PerformanceMode;
buttonSilent.AccessibleName = Properties.Strings.Silent;
buttonBalanced.AccessibleName = Properties.Strings.Balanced;
buttonTurbo.AccessibleName = Properties.Strings.Turbo;
buttonFans.AccessibleName = Properties.Strings.FansAndPower;
panelGPU.AccessibleName = Properties.Strings.GPUMode;
buttonEco.AccessibleName = Properties.Strings.EcoMode;
buttonStandard.AccessibleName = Properties.Strings.StandardMode;
buttonOptimized.AccessibleName = Properties.Strings.Optimized;
buttonUltimate.AccessibleName = Properties.Strings.UltimateMode;
panelScreen.AccessibleName = Properties.Strings.LaptopScreen;
buttonScreenAuto.AccessibleName = Properties.Strings.AutoMode;
//button60Hz.AccessibleName = "60Hz Refresh Rate";
//button120Hz.AccessibleName = "Maximum Refresh Rate";
panelKeyboard.AccessibleName = Properties.Strings.LaptopKeyboard;
buttonKeyboard.AccessibleName = Properties.Strings.ExtraSettings;
buttonKeyboardColor.AccessibleName = Properties.Strings.LaptopKeyboard + " " + Properties.Strings.Color;
comboKeyboard.AccessibleName = Properties.Strings.LaptopBacklight;
FormClosing += SettingsForm_FormClosing;
Deactivate += SettingsForm_LostFocus;
@@ -446,11 +471,17 @@ namespace GHelper
public void SetVersionLabel(string label, bool update = false)
{
Invoke(delegate
if (InvokeRequired)
Invoke(delegate
{
labelVersion.Text = label;
if (update) labelVersion.ForeColor = colorTurbo;
});
else
{
labelVersion.Text = label;
if (update) labelVersion.ForeColor = colorTurbo;
});
}
}
@@ -606,16 +637,7 @@ namespace GHelper
private void PictureColor2_Click(object? sender, EventArgs e)
{
ColorDialog colorDlg = new ColorDialog();
colorDlg.AllowFullOpen = true;
colorDlg.Color = pictureColor2.BackColor;
if (colorDlg.ShowDialog() == DialogResult.OK)
{
AppConfig.Set("aura_color2", colorDlg.Color.ToArgb());
SetAura();
}
SetColorPicker("aura_color2");
}
private void PictureColor_Click(object? sender, EventArgs e)
@@ -643,18 +665,14 @@ namespace GHelper
public void FansInit()
{
Invoke(delegate
{
if (fansForm != null && fansForm.Text != "") fansForm.InitAll();
});
if (fansForm == null || fansForm.Text == "") return;
Invoke(fansForm.InitAll);
}
public void GPUInit()
{
Invoke(delegate
{
if (fansForm != null && fansForm.Text != "") fansForm.InitGPU();
});
if (fansForm == null || fansForm.Text == "") return;
Invoke(fansForm.InitGPU);
}
public void FansToggle(int index = 0)
@@ -683,20 +701,31 @@ namespace GHelper
FansToggle();
}
private void ButtonKeyboardColor_Click(object? sender, EventArgs e)
private void SetColorPicker(string colorField = "aura_color")
{
ColorDialog colorDlg = new ColorDialog();
colorDlg.AllowFullOpen = true;
colorDlg.Color = pictureColor.BackColor;
try
{
colorDlg.CustomColors = AppConfig.GetString("aura_color_custom", "").Split('-').Select(int.Parse).ToArray();
}
catch (Exception ex) { }
if (colorDlg.ShowDialog() == DialogResult.OK)
{
AppConfig.Set("aura_color", colorDlg.Color.ToArgb());
AppConfig.Set("aura_color_custom", string.Join("-", colorDlg.CustomColors));
AppConfig.Set(colorField, colorDlg.Color.ToArgb());
SetAura();
}
}
private void ButtonKeyboardColor_Click(object? sender, EventArgs e)
{
SetColorPicker("aura_color");
}
public void InitAura()
{
Aura.Mode = (AuraMode)AppConfig.Get("aura_mode");
@@ -737,12 +766,19 @@ namespace GHelper
public void VisualiseAura()
{
Invoke(delegate
if (InvokeRequired)
Invoke(delegate
{
pictureColor.BackColor = Aura.Color1;
pictureColor2.BackColor = Aura.Color2;
pictureColor2.Visible = Aura.HasSecondColor();
});
else
{
pictureColor.BackColor = Aura.Color1;
pictureColor2.BackColor = Aura.Color2;
pictureColor2.Visible = Aura.HasSecondColor();
});
}
}
public void InitMatrix()
@@ -763,6 +799,15 @@ namespace GHelper
}
public void CycleMatrix(int delta)
{
comboMatrix.SelectedIndex = Math.Min(Math.Max(0, comboMatrix.SelectedIndex + delta), comboMatrix.Items.Count - 1);
AppConfig.Set("matrix_brightness", comboMatrix.SelectedIndex);
matrixControl.SetMatrix();
Program.toast.RunToast(comboMatrix.GetItemText(comboMatrix.SelectedItem), delta > 0 ? ToastIcon.BacklightUp : ToastIcon.BacklightDown);
}
public void CycleAuraMode()
{
if (comboKeyboard.SelectedIndex < comboKeyboard.Items.Count - 1)
@@ -965,18 +1010,19 @@ namespace GHelper
if (gpuTemp.Length > 0) trayTip += "\nGPU" + gpuTemp + " " + HardwareControl.gpuFan;
if (battery.Length > 0) trayTip += "\n" + battery;
Program.settingsForm.BeginInvoke(delegate
{
labelCPUFan.Text = "CPU" + cpuTemp + " " + HardwareControl.cpuFan;
labelGPUFan.Text = "GPU" + gpuTemp + " " + HardwareControl.gpuFan;
if (HardwareControl.midFan is not null)
labelMidFan.Text = "Mid " + HardwareControl.midFan;
if (Program.settingsForm.IsHandleCreated)
Program.settingsForm.BeginInvoke(delegate
{
labelCPUFan.Text = "CPU" + cpuTemp + " " + HardwareControl.cpuFan;
labelGPUFan.Text = "GPU" + gpuTemp + " " + HardwareControl.gpuFan;
if (HardwareControl.midFan is not null)
labelMidFan.Text = "Mid " + HardwareControl.midFan;
labelBattery.Text = battery;
if (!batteryMouseOver && !batteryFullMouseOver) labelCharge.Text = charge;
labelBattery.Text = battery;
if (!batteryMouseOver && !batteryFullMouseOver) labelCharge.Text = charge;
//panelPerformance.AccessibleName = labelPerf.Text + " " + trayTip;
});
//panelPerformance.AccessibleName = labelPerf.Text + " " + trayTip;
});
Program.trayIcon.Text = trayTip;
@@ -991,52 +1037,67 @@ namespace GHelper
public void ShowMode(int mode)
{
Invoke(delegate
{
buttonSilent.Activated = false;
buttonBalanced.Activated = false;
buttonTurbo.Activated = false;
buttonFans.Activated = false;
menuSilent.Checked = false;
menuBalanced.Checked = false;
menuTurbo.Checked = false;
switch (mode)
if (InvokeRequired)
Invoke(delegate
{
case AsusACPI.PerformanceSilent:
buttonSilent.Activated = true;
menuSilent.Checked = true;
break;
case AsusACPI.PerformanceTurbo:
buttonTurbo.Activated = true;
menuTurbo.Checked = true;
break;
case AsusACPI.PerformanceBalanced:
buttonBalanced.Activated = true;
menuBalanced.Checked = true;
break;
default:
buttonFans.Activated = true;
buttonFans.BorderColor = Modes.GetBase(mode) switch
{
AsusACPI.PerformanceSilent => colorEco,
AsusACPI.PerformanceTurbo => colorTurbo,
_ => colorStandard,
};
break;
}
});
VisualiseMode(mode);
});
else
VisualiseMode(mode);
}
protected void VisualiseMode(int mode)
{
buttonSilent.Activated = false;
buttonBalanced.Activated = false;
buttonTurbo.Activated = false;
buttonFans.Activated = false;
menuSilent.Checked = false;
menuBalanced.Checked = false;
menuTurbo.Checked = false;
switch (mode)
{
case AsusACPI.PerformanceSilent:
buttonSilent.Activated = true;
menuSilent.Checked = true;
break;
case AsusACPI.PerformanceTurbo:
buttonTurbo.Activated = true;
menuTurbo.Checked = true;
break;
case AsusACPI.PerformanceBalanced:
buttonBalanced.Activated = true;
menuBalanced.Checked = true;
break;
default:
buttonFans.Activated = true;
buttonFans.BorderColor = Modes.GetBase(mode) switch
{
AsusACPI.PerformanceSilent => colorEco,
AsusACPI.PerformanceTurbo => colorTurbo,
_ => colorStandard,
};
break;
}
}
public void SetModeLabel(string modeText)
{
Invoke(delegate
if (InvokeRequired)
{
Invoke(delegate {
labelPerf.Text = modeText;
panelPerformance.AccessibleName = labelPerf.Text;
});
} else
{
labelPerf.Text = modeText;
panelPerformance.AccessibleName = labelPerf.Text; // + ". " + Program.trayIcon.Text;
});
panelPerformance.AccessibleName = labelPerf.Text;
}
}
@@ -1151,7 +1212,6 @@ namespace GHelper
});
}
public void VisualiseGPUMode(int GPUMode = -1)
{
ButtonEnabled(buttonOptimized, true);
@@ -1177,13 +1237,13 @@ namespace GHelper
buttonOptimized.Activated = GPUAuto;
labelGPU.Text = Properties.Strings.GPUMode + ": " + Properties.Strings.GPUModeEco;
Program.trayIcon.Icon = Properties.Resources.eco;
Icon = Properties.Resources.dot_eco;
IconHelper.SetIcon(this, Properties.Resources.dot_eco);
break;
case AsusACPI.GPUModeUltimate:
buttonUltimate.Activated = true;
labelGPU.Text = Properties.Strings.GPUMode + ": " + Properties.Strings.GPUModeUltimate;
Program.trayIcon.Icon = Properties.Resources.ultimate;
Icon = Properties.Resources.dot_ultimate;
IconHelper.SetIcon(this, Properties.Resources.dot_ultimate);
break;
default:
buttonOptimized.BorderColor = colorStandard;
@@ -1191,7 +1251,7 @@ namespace GHelper
buttonOptimized.Activated = GPUAuto;
labelGPU.Text = Properties.Strings.GPUMode + ": " + Properties.Strings.GPUModeStandard;
Program.trayIcon.Icon = Properties.Resources.standard;
Icon = Properties.Resources.dot_standard;
IconHelper.SetIcon(this, Properties.Resources.dot_standard);
break;
}
@@ -1235,6 +1295,10 @@ namespace GHelper
{
labelBatteryTitle.Text = Properties.Strings.BatteryChargeLimit + ": " + limit.ToString() + "%";
sliderBattery.Value = limit;
sliderBattery.AccessibleName = Properties.Strings.BatteryChargeLimit + ": " + limit.ToString() + "%";
sliderBattery.AccessibilityObject.Select(AccessibleSelection.TakeFocus);
VisualiseBatteryFull();
}
@@ -1244,11 +1308,13 @@ namespace GHelper
{
buttonBatteryFull.BackColor = colorStandard;
buttonBatteryFull.ForeColor = SystemColors.ControlLightLight;
buttonBatteryFull.AccessibleName = Properties.Strings.BatteryChargeLimit + "100% on";
}
else
{
buttonBatteryFull.BackColor = buttonSecond;
buttonBatteryFull.ForeColor = SystemColors.ControlDark;
buttonBatteryFull.AccessibleName = Properties.Strings.BatteryChargeLimit + "100% off";
}
}
@@ -1394,11 +1460,13 @@ namespace GHelper
{
buttonFnLock.BackColor = colorStandard;
buttonFnLock.ForeColor = SystemColors.ControlLightLight;
buttonFnLock.AccessibleName = "Fn-Lock on";
}
else
{
buttonFnLock.BackColor = buttonSecond;
buttonFnLock.ForeColor = SystemColors.ControlDark;
buttonFnLock.AccessibleName = "Fn-Lock off";
}
}

View File

@@ -50,6 +50,9 @@ public static class ControlHelper
{
foreach (Control control in controls)
{
AdjustControls(control.Controls);
var button = control as RButton;
if (button != null)
{
@@ -132,7 +135,6 @@ public static class ControlHelper
}
AdjustControls(control.Controls);
}
}

View File

@@ -1,6 +1,4 @@
using Microsoft.Win32;
using System.ComponentModel;
using System.Drawing.Drawing2D;
using System.Runtime.InteropServices;
namespace GHelper.UI
@@ -108,308 +106,4 @@ namespace GHelper.UI
}
}
public class RCheckBox : CheckBox
{
}
public class RComboBox : ComboBox
{
private Color borderColor = Color.Gray;
[DefaultValue(typeof(Color), "Gray")]
public Color BorderColor
{
get { return borderColor; }
set
{
if (borderColor != value)
{
borderColor = value;
Invalidate();
}
}
}
private Color buttonColor = Color.FromArgb(255, 255, 255, 255);
[DefaultValue(typeof(Color), "255, 255, 255")]
public Color ButtonColor
{
get { return buttonColor; }
set
{
if (buttonColor != value)
{
buttonColor = value;
Invalidate();
}
}
}
private Color arrowColor = Color.Black;
[DefaultValue(typeof(Color), "Black")]
public Color ArrowColor
{
get { return arrowColor; }
set
{
if (arrowColor != value)
{
arrowColor = value;
Invalidate();
}
}
}
protected override void WndProc(ref Message m)
{
if (m.Msg == WM_PAINT && DropDownStyle != ComboBoxStyle.Simple)
{
var clientRect = ClientRectangle;
var dropDownButtonWidth = SystemInformation.HorizontalScrollBarArrowWidth;
var outerBorder = new Rectangle(clientRect.Location,
new Size(clientRect.Width - 1, clientRect.Height - 1));
var innerBorder = new Rectangle(outerBorder.X + 1, outerBorder.Y + 1,
outerBorder.Width - dropDownButtonWidth - 2, outerBorder.Height - 2);
var innerInnerBorder = new Rectangle(innerBorder.X + 1, innerBorder.Y + 1,
innerBorder.Width - 2, innerBorder.Height - 2);
var dropDownRect = new Rectangle(innerBorder.Right + 1, innerBorder.Y,
dropDownButtonWidth, innerBorder.Height + 1);
if (RightToLeft == RightToLeft.Yes)
{
innerBorder.X = clientRect.Width - innerBorder.Right;
innerInnerBorder.X = clientRect.Width - innerInnerBorder.Right;
dropDownRect.X = clientRect.Width - dropDownRect.Right;
dropDownRect.Width += 1;
}
var innerBorderColor = Enabled ? BackColor : SystemColors.Control;
var outerBorderColor = Enabled ? BorderColor : SystemColors.ControlDark;
var buttonColor = Enabled ? ButtonColor : SystemColors.Control;
var middle = new Point(dropDownRect.Left + dropDownRect.Width / 2,
dropDownRect.Top + dropDownRect.Height / 2);
var arrow = new Point[]
{
new Point(middle.X - 3, middle.Y - 2),
new Point(middle.X + 4, middle.Y - 2),
new Point(middle.X, middle.Y + 2)
};
var ps = new PAINTSTRUCT();
bool shoulEndPaint = false;
nint dc;
if (m.WParam == nint.Zero)
{
dc = BeginPaint(Handle, ref ps);
m.WParam = dc;
shoulEndPaint = true;
}
else
{
dc = m.WParam;
}
var rgn = CreateRectRgn(innerInnerBorder.Left, innerInnerBorder.Top,
innerInnerBorder.Right, innerInnerBorder.Bottom);
SelectClipRgn(dc, rgn);
DefWndProc(ref m);
DeleteObject(rgn);
rgn = CreateRectRgn(clientRect.Left, clientRect.Top,
clientRect.Right, clientRect.Bottom);
SelectClipRgn(dc, rgn);
using (var g = Graphics.FromHdc(dc))
{
using (var b = new SolidBrush(buttonColor))
{
g.FillRectangle(b, dropDownRect);
}
using (var b = new SolidBrush(arrowColor))
{
g.FillPolygon(b, arrow);
}
using (var p = new Pen(innerBorderColor))
{
g.DrawRectangle(p, innerBorder);
g.DrawRectangle(p, innerInnerBorder);
}
using (var p = new Pen(outerBorderColor))
{
g.DrawRectangle(p, outerBorder);
}
}
if (shoulEndPaint)
EndPaint(Handle, ref ps);
DeleteObject(rgn);
}
else
base.WndProc(ref m);
}
private const int WM_PAINT = 0xF;
[StructLayout(LayoutKind.Sequential)]
public struct RECT
{
public int L, T, R, B;
}
[StructLayout(LayoutKind.Sequential)]
public struct PAINTSTRUCT
{
public nint hdc;
public bool fErase;
public int rcPaint_left;
public int rcPaint_top;
public int rcPaint_right;
public int rcPaint_bottom;
public bool fRestore;
public bool fIncUpdate;
public int reserved1;
public int reserved2;
public int reserved3;
public int reserved4;
public int reserved5;
public int reserved6;
public int reserved7;
public int reserved8;
}
[DllImport("user32.dll")]
private static extern nint BeginPaint(nint hWnd,
[In, Out] ref PAINTSTRUCT lpPaint);
[DllImport("user32.dll")]
private static extern bool EndPaint(nint hWnd, ref PAINTSTRUCT lpPaint);
[DllImport("gdi32.dll")]
public static extern int SelectClipRgn(nint hDC, nint hRgn);
[DllImport("user32.dll")]
public static extern int GetUpdateRgn(nint hwnd, nint hrgn, bool fErase);
public enum RegionFlags
{
ERROR = 0,
NULLREGION = 1,
SIMPLEREGION = 2,
COMPLEXREGION = 3,
}
[DllImport("gdi32.dll")]
internal static extern bool DeleteObject(nint hObject);
[DllImport("gdi32.dll")]
private static extern nint CreateRectRgn(int x1, int y1, int x2, int y2);
}
public class RButton : Button
{
//Fields
private int borderSize = 5;
private int borderRadius = 5;
public int BorderRadius
{
get { return borderRadius; }
set
{
borderRadius = value;
}
}
private Color borderColor = Color.Transparent;
public Color BorderColor
{
get { return borderColor; }
set
{
borderColor = value;
}
}
private bool activated = false;
public bool Activated
{
get { return activated; }
set
{
if (activated != value)
Invalidate();
activated = value;
}
}
private bool secondary = false;
public bool Secondary
{
get { return secondary; }
set
{
secondary = value;
}
}
public RButton()
{
DoubleBuffered = true;
FlatStyle = FlatStyle.Flat;
FlatAppearance.BorderSize = 0;
}
private GraphicsPath GetFigurePath(Rectangle rect, int radius)
{
GraphicsPath path = new GraphicsPath();
float curveSize = radius * 2F;
path.StartFigure();
path.AddArc(rect.X, rect.Y, curveSize, curveSize, 180, 90);
path.AddArc(rect.Right - curveSize, rect.Y, curveSize, curveSize, 270, 90);
path.AddArc(rect.Right - curveSize, rect.Bottom - curveSize, curveSize, curveSize, 0, 90);
path.AddArc(rect.X, rect.Bottom - curveSize, curveSize, curveSize, 90, 90);
path.CloseFigure();
return path;
}
protected override void OnPaint(PaintEventArgs pevent)
{
base.OnPaint(pevent);
float ratio = pevent.Graphics.DpiX / 192.0f;
int border = (int)(ratio * borderSize);
Rectangle rectSurface = ClientRectangle;
Rectangle rectBorder = Rectangle.Inflate(rectSurface, -border, -border);
Color borderDrawColor = activated ? borderColor : Color.Transparent;
using (GraphicsPath pathSurface = GetFigurePath(rectSurface, borderRadius + border))
using (GraphicsPath pathBorder = GetFigurePath(rectBorder, borderRadius))
using (Pen penSurface = new Pen(Parent.BackColor, border))
using (Pen penBorder = new Pen(borderDrawColor, border))
{
penBorder.Alignment = PenAlignment.Outset;
pevent.Graphics.SmoothingMode = SmoothingMode.AntiAlias;
Region = new Region(pathSurface);
pevent.Graphics.DrawPath(penSurface, pathSurface);
pevent.Graphics.DrawPath(penBorder, pathBorder);
}
if (!Enabled && ForeColor != SystemColors.ControlText)
{
var rect = pevent.ClipRectangle;
if (Image is not null)
{
rect.Y += Image.Height;
rect.Height -= Image.Height;
}
TextFormatFlags flags = TextFormatFlags.HorizontalCenter | TextFormatFlags.VerticalCenter | TextFormatFlags.WordBreak;
TextRenderer.DrawText(pevent.Graphics, Text, Font, rect, Color.Gray, flags);
}
}
}
}

31
app/UI/IconHelper.cs Normal file
View File

@@ -0,0 +1,31 @@
using System.Diagnostics;
using System.Runtime.InteropServices;
namespace GHelper.UI
{
public class IconHelper
{
[DllImport("user32.dll", CharSet = CharSet.Auto)]
private static extern IntPtr SendMessage(IntPtr hWnd, uint Msg, IntPtr wParam, IntPtr lParam);
private const uint WM_SETICON = 0x80u;
private const int ICON_SMALL = 0;
private const int ICON_BIG = 1;
public static void SetIcon(Form form, Bitmap icon)
{
try
{
SendMessage(form.Handle, WM_SETICON, ICON_BIG, Icon.ExtractAssociatedIcon(Application.ExecutablePath)!.Handle);
SendMessage(form.Handle, WM_SETICON, ICON_SMALL, icon.GetHicon());
}
catch (Exception ex)
{
Debug.WriteLine($"Error setting icon {ex.Message}");
}
}
}
}

117
app/UI/RButton.cs Normal file
View File

@@ -0,0 +1,117 @@
using System.Drawing.Drawing2D;
namespace GHelper.UI
{
public class RButton : Button
{
//Fields
private int borderSize = 5;
private int borderRadius = 5;
public int BorderRadius
{
get { return borderRadius; }
set
{
borderRadius = value;
}
}
private Color borderColor = Color.Transparent;
public Color BorderColor
{
get { return borderColor; }
set
{
borderColor = value;
}
}
private bool activated = false;
public bool Activated
{
get { return activated; }
set
{
if (activated != value)
Invalidate();
activated = value;
}
}
private bool secondary = false;
public bool Secondary
{
get { return secondary; }
set
{
secondary = value;
}
}
public RButton()
{
DoubleBuffered = true;
FlatStyle = FlatStyle.Flat;
FlatAppearance.BorderSize = 0;
}
private GraphicsPath GetFigurePath(Rectangle rect, int radius)
{
GraphicsPath path = new GraphicsPath();
float curveSize = radius * 2F;
path.StartFigure();
path.AddArc(rect.X, rect.Y, curveSize, curveSize, 180, 90);
path.AddArc(rect.Right - curveSize, rect.Y, curveSize, curveSize, 270, 90);
path.AddArc(rect.Right - curveSize, rect.Bottom - curveSize, curveSize, curveSize, 0, 90);
path.AddArc(rect.X, rect.Bottom - curveSize, curveSize, curveSize, 90, 90);
path.CloseFigure();
return path;
}
protected override void OnPaint(PaintEventArgs pevent)
{
base.OnPaint(pevent);
float ratio = pevent.Graphics.DpiX / 192.0f;
int border = (int)(ratio * borderSize);
Rectangle rectSurface = ClientRectangle;
Rectangle rectBorder = Rectangle.Inflate(rectSurface, -border, -border);
Color borderDrawColor = activated ? borderColor : Color.Transparent;
using (GraphicsPath pathSurface = GetFigurePath(rectSurface, borderRadius + border))
using (GraphicsPath pathBorder = GetFigurePath(rectBorder, borderRadius))
using (Pen penSurface = new Pen(Parent.BackColor, border))
using (Pen penBorder = new Pen(borderDrawColor, border))
{
penBorder.Alignment = PenAlignment.Outset;
pevent.Graphics.SmoothingMode = SmoothingMode.AntiAlias;
Region = new Region(pathSurface);
pevent.Graphics.DrawPath(penSurface, pathSurface);
pevent.Graphics.DrawPath(penBorder, pathBorder);
}
if (!Enabled && ForeColor != SystemColors.ControlText)
{
var rect = pevent.ClipRectangle;
if (Image is not null)
{
rect.Y += Image.Height;
rect.Height -= Image.Height;
}
TextFormatFlags flags = TextFormatFlags.HorizontalCenter | TextFormatFlags.VerticalCenter | TextFormatFlags.WordBreak;
TextRenderer.DrawText(pevent.Graphics, Text, Font, rect, Color.Gray, flags);
}
}
}
}

7
app/UI/RCheckBox.cs Normal file
View File

@@ -0,0 +1,7 @@
namespace GHelper.UI
{
public class RCheckBox : CheckBox
{
}
}

189
app/UI/RComboBox.cs Normal file
View File

@@ -0,0 +1,189 @@
using System.ComponentModel;
using System.Runtime.InteropServices;
namespace GHelper.UI
{
public class RComboBox : ComboBox
{
private Color borderColor = Color.Gray;
[DefaultValue(typeof(Color), "Gray")]
public Color BorderColor
{
get { return borderColor; }
set
{
if (borderColor != value)
{
borderColor = value;
Invalidate();
}
}
}
private Color buttonColor = Color.FromArgb(255, 255, 255, 255);
[DefaultValue(typeof(Color), "255, 255, 255")]
public Color ButtonColor
{
get { return buttonColor; }
set
{
if (buttonColor != value)
{
buttonColor = value;
Invalidate();
}
}
}
private Color arrowColor = Color.Black;
[DefaultValue(typeof(Color), "Black")]
public Color ArrowColor
{
get { return arrowColor; }
set
{
if (arrowColor != value)
{
arrowColor = value;
Invalidate();
}
}
}
protected override void WndProc(ref Message m)
{
if (m.Msg == WM_PAINT && DropDownStyle != ComboBoxStyle.Simple)
{
var clientRect = ClientRectangle;
var dropDownButtonWidth = SystemInformation.HorizontalScrollBarArrowWidth;
var outerBorder = new Rectangle(clientRect.Location,
new Size(clientRect.Width - 1, clientRect.Height - 1));
var innerBorder = new Rectangle(outerBorder.X + 1, outerBorder.Y + 1,
outerBorder.Width - dropDownButtonWidth - 2, outerBorder.Height - 2);
var innerInnerBorder = new Rectangle(innerBorder.X + 1, innerBorder.Y + 1,
innerBorder.Width - 2, innerBorder.Height - 2);
var dropDownRect = new Rectangle(innerBorder.Right + 1, innerBorder.Y,
dropDownButtonWidth, innerBorder.Height + 1);
if (RightToLeft == RightToLeft.Yes)
{
innerBorder.X = clientRect.Width - innerBorder.Right;
innerInnerBorder.X = clientRect.Width - innerInnerBorder.Right;
dropDownRect.X = clientRect.Width - dropDownRect.Right;
dropDownRect.Width += 1;
}
var innerBorderColor = Enabled ? BackColor : SystemColors.Control;
var outerBorderColor = Enabled ? BorderColor : SystemColors.ControlDark;
var buttonColor = Enabled ? ButtonColor : SystemColors.Control;
var middle = new Point(dropDownRect.Left + dropDownRect.Width / 2,
dropDownRect.Top + dropDownRect.Height / 2);
var arrow = new Point[]
{
new Point(middle.X - 3, middle.Y - 2),
new Point(middle.X + 4, middle.Y - 2),
new Point(middle.X, middle.Y + 2)
};
var ps = new PAINTSTRUCT();
bool shoulEndPaint = false;
nint dc;
if (m.WParam == nint.Zero)
{
dc = BeginPaint(Handle, ref ps);
m.WParam = dc;
shoulEndPaint = true;
}
else
{
dc = m.WParam;
}
var rgn = CreateRectRgn(innerInnerBorder.Left, innerInnerBorder.Top,
innerInnerBorder.Right, innerInnerBorder.Bottom);
SelectClipRgn(dc, rgn);
DefWndProc(ref m);
DeleteObject(rgn);
rgn = CreateRectRgn(clientRect.Left, clientRect.Top,
clientRect.Right, clientRect.Bottom);
SelectClipRgn(dc, rgn);
using (var g = Graphics.FromHdc(dc))
{
using (var b = new SolidBrush(buttonColor))
{
g.FillRectangle(b, dropDownRect);
}
using (var b = new SolidBrush(arrowColor))
{
g.FillPolygon(b, arrow);
}
using (var p = new Pen(innerBorderColor))
{
g.DrawRectangle(p, innerBorder);
g.DrawRectangle(p, innerInnerBorder);
}
using (var p = new Pen(outerBorderColor))
{
g.DrawRectangle(p, outerBorder);
}
}
if (shoulEndPaint)
EndPaint(Handle, ref ps);
DeleteObject(rgn);
}
else
base.WndProc(ref m);
}
private const int WM_PAINT = 0xF;
[StructLayout(LayoutKind.Sequential)]
public struct RECT
{
public int L, T, R, B;
}
[StructLayout(LayoutKind.Sequential)]
public struct PAINTSTRUCT
{
public nint hdc;
public bool fErase;
public int rcPaint_left;
public int rcPaint_top;
public int rcPaint_right;
public int rcPaint_bottom;
public bool fRestore;
public bool fIncUpdate;
public int reserved1;
public int reserved2;
public int reserved3;
public int reserved4;
public int reserved5;
public int reserved6;
public int reserved7;
public int reserved8;
}
[DllImport("user32.dll")]
private static extern nint BeginPaint(nint hWnd,
[In, Out] ref PAINTSTRUCT lpPaint);
[DllImport("user32.dll")]
private static extern bool EndPaint(nint hWnd, ref PAINTSTRUCT lpPaint);
[DllImport("gdi32.dll")]
public static extern int SelectClipRgn(nint hDC, nint hRgn);
[DllImport("user32.dll")]
public static extern int GetUpdateRgn(nint hwnd, nint hrgn, bool fErase);
public enum RegionFlags
{
ERROR = 0,
NULLREGION = 1,
SIMPLEREGION = 2,
COMPLEXREGION = 3,
}
[DllImport("gdi32.dll")]
internal static extern bool DeleteObject(nint hObject);
[DllImport("gdi32.dll")]
private static extern nint CreateRectRgn(int x1, int y1, int x2, int y2);
}
}

View File

@@ -36,6 +36,7 @@ namespace GHelper.UI
{
// This reduces flicker
DoubleBuffered = true;
TabStop = true;
}
@@ -89,6 +90,41 @@ namespace GHelper.UI
}
}
protected override bool IsInputKey(Keys keyData)
{
switch (keyData)
{
case Keys.Right:
case Keys.Left:
case Keys.Up:
case Keys.Down:
return true;
}
return base.IsInputKey(keyData);
}
protected override void OnKeyDown(KeyEventArgs e)
{
switch (e.KeyCode)
{
case Keys.Right:
case Keys.Up:
Value = Math.Min(Max, Value + Step);
break;
case Keys.Left:
case Keys.Down:
Value = Math.Max(Min, Value - Step);
break;
}
AccessibilityNotifyClients(AccessibleEvents.Focus, 0);
base.OnKeyDown(e);
}
protected override void OnPaint(PaintEventArgs e)
{
base.OnPaint(e);
@@ -131,6 +167,8 @@ namespace GHelper.UI
{
base.OnMouseDown(e);
Focus();
// Difference between tumb and mouse position.
_delta = new SizeF(e.Location.X - _thumbPos.X, e.Location.Y - _thumbPos.Y);
if (_delta.Width * _delta.Width + _delta.Height * _delta.Height <= _radius * _radius)

View File

@@ -12,67 +12,96 @@ public static class AsusHid
static int[] deviceIds = { 0x1a30, 0x1854, 0x1869, 0x1866, 0x19b6, 0x1822, 0x1837, 0x1854, 0x184a, 0x183d, 0x8502, 0x1807, 0x17e0, 0x18c6, 0x1abe };
static HidStream auraStream;
static HidStream? auraStream;
public static HidStream FindHidStream(byte reportId, int minFeatureLength = 1)
public static IEnumerable<HidDevice>? FindDevices(byte reportId)
{
HidDeviceLoader loader = new HidDeviceLoader();
var deviceList = loader.GetDevices(ASUS_ID).Where(device => deviceIds.Contains(device.ProductID));
IEnumerable<HidDevice> deviceList;
foreach (var device in deviceList) if (device.CanOpen)
try
{
deviceList = loader.GetDevices(ASUS_ID).Where(device => deviceIds.Contains(device.ProductID) && device.CanOpen && device.GetMaxFeatureReportLength() > 0);
}
catch (Exception ex)
{
Logger.WriteLine($"Error enumerating HID devices: {ex.Message}");
yield break;
}
foreach (var device in deviceList)
if (device.GetReportDescriptor().TryGetReport(ReportType.Feature, reportId, out _))
yield return device;
}
public static HidStream? FindHidStream(byte reportId)
{
try
{
var devices = FindDevices(reportId);
if (devices is null) return null;
if (AppConfig.IsZ13())
{
try
{
var config = new OpenConfiguration();
config.SetOption(OpenOption.Interruptible, false);
config.SetOption(OpenOption.Exclusive, false);
config.SetOption(OpenOption.Priority, 10);
HidStream hidStream = device.Open();
if (device.GetMaxFeatureReportLength() >= minFeatureLength)
{
var reportDescriptor = device.GetReportDescriptor();
if (reportDescriptor.TryGetReport(ReportType.Feature, reportId, out _))
{
return hidStream;
}
}
hidStream.Close();
hidStream.Dispose();
}
catch (Exception ex)
{
Debug.WriteLine($"Error accessing HID device: {ex.Message}");
}
var z13 = devices.Where(device => device.ProductID == 0x1a30).FirstOrDefault();
if (z13 is not null) return z13.Open();
}
return devices.FirstOrDefault()?.Open();
}
catch (Exception ex)
{
Logger.WriteLine($"Error accessing HID device: {ex.Message}");
}
return null;
}
static void WriteData(HidStream stream, byte[] data, string log = "USB")
public static void WriteInput(byte[] data, string log = "USB")
{
try
foreach (var device in FindDevices(INPUT_ID))
{
stream.Write(data);
Logger.WriteLine($"{log} " + stream.Device.ProductID + ": " + BitConverter.ToString(data));
}
catch (Exception ex)
{
Debug.WriteLine($"Error writing {log} to HID device: {ex.Message} {BitConverter.ToString(data)}");
try
{
using (var stream = device.Open())
{
var payload = new byte[device.GetMaxFeatureReportLength()];
Array.Copy(data, payload, data.Length);
stream.SetFeature(payload);
Logger.WriteLine($"{log} Feature {device.ProductID.ToString("X")}|{device.GetMaxFeatureReportLength()}: {BitConverter.ToString(data)}");
}
}
catch (Exception ex)
{
Logger.WriteLine($"Error setting feature {device.GetMaxFeatureReportLength()} {device.DevicePath}: {BitConverter.ToString(data)} {ex.Message}");
}
}
}
public static void Write(byte[] data, byte reportId = AURA_ID, string log = "USB")
public static void Write(byte[] data, string log = "USB")
{
using (var stream = FindHidStream(reportId))
WriteData(stream, data, log);
Write(new List<byte[]> { data }, log);
}
public static void Write(List<byte[]> dataList, byte reportId = AURA_ID)
public static void Write(List<byte[]> dataList, string log = "USB")
{
using (var stream = FindHidStream(reportId))
foreach (var data in dataList)
WriteData(stream, data);
var devices = FindDevices(AURA_ID);
if (devices is null) return;
foreach (var device in devices)
using (var stream = device.Open())
foreach (var data in dataList)
try
{
stream.Write(data);
Logger.WriteLine($"{log} {device.ProductID.ToString("X")}: {BitConverter.ToString(data)}");
}
catch (Exception ex)
{
Logger.WriteLine($"Error writing {log} {device.ProductID.ToString("X")}: {ex.Message} {BitConverter.ToString(data)} ");
}
}
public static void WriteAura(byte[] data)
@@ -88,7 +117,7 @@ public static class AsusHid
catch (Exception ex)
{
auraStream.Dispose();
Debug.WriteLine($"Error writing data to HID device: {ex.Message}");
Debug.WriteLine($"Error writing data to HID device: {ex.Message} {BitConverter.ToString(data)}");
}
}

View File

@@ -68,7 +68,7 @@ namespace GHelper.USB
static byte[] MESSAGE_APPLY = { AsusHid.AURA_ID, 0xb4 };
static byte[] MESSAGE_SET = { AsusHid.AURA_ID, 0xb5, 0, 0, 0 };
static readonly int AURA_ZONES = 0x12;
static readonly int AURA_ZONES = 8;
private static AuraMode mode = AuraMode.AuraStatic;
private static AuraSpeed speed = AuraSpeed.Normal;
@@ -79,9 +79,10 @@ namespace GHelper.USB
static bool isACPI = AppConfig.IsTUF() || AppConfig.IsVivobook();
static bool isStrix = AppConfig.IsStrix();
static public bool isSingleColor = false;
static bool isStrix4Zone = AppConfig.IsStrixLimitedRGB();
static bool isStrixNumpad = AppConfig.IsStrixNumpad();
static bool isOldHeatmap = AppConfig.Is("old_heatmap");
static public bool isSingleColor = false;
static System.Timers.Timer timer = new System.Timers.Timer(1000);
@@ -128,12 +129,13 @@ namespace GHelper.USB
isSingleColor = AppConfig.IsSingleColor(); // Mono Color
if (AppConfig.ContainsModel("GA402X") || AppConfig.ContainsModel("GA402N"))
using (var stream = AsusHid.FindHidStream(AsusHid.AURA_ID))
{
if (stream is null) return;
if (stream.Device.ReleaseNumberBcd == 22 || stream.Device.ReleaseNumberBcd == 23) isSingleColor = true;
stream.Close();
}
{
var device = AsusHid.FindDevices(AsusHid.AURA_ID).FirstOrDefault();
if (device is null) return;
Logger.WriteLine($"USB Version: {device.ReleaseNumberBcd} {device.ReleaseNumber}");
if (device.ReleaseNumberBcd >= 22 && device.ReleaseNumberBcd <= 25) isSingleColor = true;
}
}
public static Dictionary<AuraSpeed, string> GetSpeeds()
@@ -244,16 +246,13 @@ namespace GHelper.USB
public static void Init()
{
Task.Run(async () =>
{
AsusHid.Write(new List<byte[]> {
new byte[] { AsusHid.AURA_ID, 0xb9 },
Encoding.ASCII.GetBytes("]ASUS Tech.Inc."),
new byte[] { AsusHid.AURA_ID, 0x05, 0x20, 0x31, 0, 0x1a },
Encoding.ASCII.GetBytes("^ASUS Tech.Inc."),
new byte[] { 0x5e, 0x05, 0x20, 0x31, 0, 0x1a }
});
});
AsusHid.Write(new List<byte[]> {
new byte[] { AsusHid.AURA_ID, 0xb9 },
Encoding.ASCII.GetBytes("]ASUS Tech.Inc."),
new byte[] { AsusHid.AURA_ID, 0x05, 0x20, 0x31, 0, 0x1a },
//Encoding.ASCII.GetBytes("^ASUS Tech.Inc."),
//new byte[] { 0x5e, 0x05, 0x20, 0x31, 0, 0x1a }
}, "Init");
}
@@ -264,9 +263,9 @@ namespace GHelper.USB
if (delay) await Task.Delay(TimeSpan.FromSeconds(1));
if (isACPI) Program.acpi.TUFKeyboardBrightness(brightness);
AsusHid.Write(new byte[] { AsusHid.AURA_ID, 0xba, 0xc5, 0xc4, (byte)brightness }, AsusHid.AURA_ID, log);
AsusHid.Write(new byte[] { AsusHid.AURA_ID, 0xba, 0xc5, 0xc4, (byte)brightness }, log);
if (AppConfig.ContainsModel("GA503"))
AsusHid.Write(new byte[] { AsusHid.INPUT_ID, 0xba, 0xc5, 0xc4, (byte)brightness }, AsusHid.INPUT_ID, log);
AsusHid.WriteInput(new byte[] { AsusHid.INPUT_ID, 0xba, 0xc5, 0xc4, (byte)brightness }, log);
});
@@ -359,72 +358,204 @@ namespace GHelper.USB
}
public static void ApplyColor(Color color, bool init = false)
static byte[] packetMap = new byte[]
{
Color[] color_list = Enumerable.Repeat(color, 0x12).ToArray();
ApplyColor(color_list, init);
/* VDN VUP MICM HPFN ARMC */
2, 3, 4, 5, 6,
/* ESC F1 F2 F3 F4 F5 F6 F7 F8 F9 F10 F11 F12 DEL15 DEL17 PAUS PRT HOME */
21, 23, 24, 25, 26, 28, 29, 30, 31, 33, 34, 35, 36, 37, 38, 39, 40, 41,
/* BKTK 1 2 3 4 5 6 7 8 9 0 - = BSPC BSPC BSPC PLY15 NMLK NMDV NMTM NMMI */
42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62,
/* TAB Q W E R T Y U I O P [ ] \ STP15 NM7 NM8 NM9 NMPL */
63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 79, 80, 81, 82, 83,
/* CPLK A S D F G H J K L ; " # ENTR ENTR ENTR PRV15 NM4 NM5 NM6 NMPL */
84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104,
/* LSFT ISO\ Z X C V B N M , . / RSFT RSFT RSFT ARWU NXT15 NM1 NM2 NM3 NMER */
105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 139, 121, 122, 123, 124, 125,
/* LCTL LFNC LWIN LALT SPC RALT RFNC RCTL ARWL ARWD ARWR PRT15 NM0 NMPD NMER */
126, 127, 128, 129, 131, 135, 136, 137, 159, 160, 161, 142, 144, 145, 146,
/* LB1 LB2 LB3 LB4 LB5 LB6 */
174, 173, 172, 171, 170, 169,
/* KSTN LOGO LIDL LIDR */
0, 167, 176, 177,
};
static byte[] packetZone = new byte[]
{
/* VDN VUP MICM HPFN ARMC */
0, 0, 1, 1, 1,
/* ESC F1 F2 F3 F4 F5 F6 F7 F8 F9 F10 F11 F12 DEL15 DEL17 PAUS PRT HOM */
0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3,
/* BKTK 1 2 3 4 5 6 7 8 9 0 - = BSPC BSPC BSPC PLY15 NMLK NMDV NMTM NMMI */
0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3,
/* TAB Q W E R T Y U I O P [ ] \ STP15 NM7 NM8 NM9 NMPL */
0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3,
/* CPLK A S D F G H J K L ; " # ENTR ENTR ENTR PRV15 NM4 NM5 NM6 NMPL */
0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3,
/* LSFT ISO\ Z X C V B N M , . / RSFT RSFT RSFT ARWU NXT15 NM1 NM2 NM3 NMER */
0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3,
/* LCTL LFNC LWIN LALT SPC RALT RFNC RCTL ARWL ARWD ARWR PRT15 NM0 NMPD NMER */
0, 0, 0, 0, 1, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3,
/* LB1 LB1 LB3 LB4 LB5 LB6 */
5, 5, 4, 6, 7, 7,
/* KSTN LOGO LIDL LIDR */
3, 0, 0, 3,
};
static byte[] packetZoneNumpad = new byte[]
{
/* VDN VUP MICM HPFN ARMC */
0, 0, 0, 1, 1,
/* ESC F1 F2 F3 F4 F5 F6 F7 F8 F9 F10 F11 F12 DEL15 DEL17 PAUS PRT HOM */
0, 0, 0, 0, 1, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 3,
/* BKTK 1 2 3 4 5 6 7 8 9 0 - = BSPC BSPC BSPC PLY15 NMLK NMDV NMTM NMMI */
0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3,
/* TAB Q W E R T Y U I O P [ ] \ STP15 NM7 NM8 NM9 NMPL */
0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 3,
/* CPLK A S D F G H J K L ; " # ENTR ENTR ENTR PRV15 NM4 NM5 NM6 NMPL */
0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3,
/* LSFT ISO\ Z X C V B N M , . / RSFT RSFT RSFT ARWU NXT15 NM1 NM2 NM3 NMER */
0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3,
/* LCTL LFNC LWIN LALT SPC RALT RFNC RCTL ARWL ARWD ARWR PRT15 NM0 NMPD NMER */
0, 0, 0, 0, 1, 1, 2, 2, 2, 2, 2, 3, 3, 3, 3,
/* LB1 LB1 LB3 LB4 LB5 LB6 */
5, 5, 4, 6, 7, 7,
/* KSTN LOGO LIDL LIDR */
3, 0, 0, 3,
};
static byte[] packet4Zone = new byte[]
{
/*01 Z1 Z2 Z3 Z4 NA NA KeyZone */
0, 1, 2, 3, 0, 0,
/*02 RR R RM LM L LL LighBar */
7, 7, 6, 5, 4, 4,
};
public static void ApplyDirect(Color[] color, bool init = false)
{
const byte keySet = 167;
const byte ledCount = 178;
const ushort mapSize = 3 * ledCount;
const byte ledsPerPacket = 16;
byte[] buffer = new byte[64];
byte[] keyBuf = new byte[mapSize];
buffer[0] = AsusHid.AURA_ID;
buffer[1] = 0xbc;
buffer[2] = 0;
buffer[3] = 1;
buffer[4] = 1;
buffer[5] = 1;
buffer[6] = 0;
buffer[7] = 0x10;
if (init)
{
Init();
AsusHid.WriteAura(new byte[] { AsusHid.AURA_ID, 0xbc });
}
Array.Clear(keyBuf, 0, keyBuf.Length);
if (!isStrix4Zone) // per key
{
for (int ledIndex = 0; ledIndex < packetMap.Count(); ledIndex++)
{
ushort offset = (ushort)(3 * packetMap[ledIndex]);
byte zone = isStrixNumpad ? packetZoneNumpad[ledIndex] : packetZone[ledIndex];
keyBuf[offset] = color[zone].R;
keyBuf[offset + 1] = color[zone].G;
keyBuf[offset + 2] = color[zone].B;
}
for (int i = 0; i < keySet; i += ledsPerPacket)
{
byte ledsRemaining = (byte)(keySet - i);
if (ledsRemaining < ledsPerPacket)
{
buffer[7] = ledsRemaining;
}
buffer[6] = (byte)i;
Buffer.BlockCopy(keyBuf, 3 * i, buffer, 9, 3 * buffer[7]);
AsusHid.WriteAura(buffer);
}
}
buffer[4] = 0x04;
buffer[5] = 0x00;
buffer[6] = 0x00;
buffer[7] = 0x00;
if (isStrix4Zone) { // per zone
var leds_4_zone = packet4Zone.Count();
for (int ledIndex = 0; ledIndex < leds_4_zone; ledIndex++)
{
byte zone = packet4Zone[ledIndex];
keyBuf[ledIndex * 3] = color[zone].R;
keyBuf[ledIndex * 3 + 1] = color[zone].G;
keyBuf[ledIndex * 3 + 2] = color[zone].B;
}
Buffer.BlockCopy(keyBuf, 0, buffer, 9, 3 * leds_4_zone);
AsusHid.WriteAura(buffer);
return;
}
Buffer.BlockCopy(keyBuf, 3 * keySet, buffer, 9, 3 * (ledCount - keySet));
AsusHid.WriteAura(buffer);
}
public static void ApplyColor(Color[] color, bool init = false)
public static void ApplyDirect(Color color, bool init = false)
{
if (isACPI)
{
Program.acpi.TUFKeyboardRGB(0, color[0], 0, null);
Program.acpi.TUFKeyboardRGB(0, color, 0, null);
return;
}
if (isStrix && !isOldHeatmap)
if (isStrix)
{
byte[] msg = new byte[0x40];
byte start = 9;
byte maxLeds = 0x93;
msg[0] = AsusHid.AURA_ID;
msg[1] = 0xbc;
msg[2] = 0;
msg[3] = 1;
msg[4] = 1;
msg[5] = 1;
msg[6] = 0;
msg[7] = 0x10;
for (byte i = 0; i < AURA_ZONES; i++)
{
msg[start + i * 3] = color[i].R; // R
msg[start + 1 + i * 3] = color[i].G; // G
msg[start + 2 + i * 3] = color[i].B; // B
}
if (init)
{
Init();
AsusHid.WriteAura(new byte[] { AsusHid.AURA_ID, 0xbc });
}
for (byte b = 0; b < maxLeds; b += 0x10)
{
msg[6] = b;
AsusHid.WriteAura(msg);
}
msg[6] = maxLeds;
AsusHid.WriteAura(msg);
msg[4] = 4;
msg[5] = 0;
msg[6] = 0;
msg[7] = 0;
AsusHid.WriteAura(msg);
ApplyDirect(Enumerable.Repeat(color, AURA_ZONES).ToArray(), init);
return;
}
else
if (AppConfig.IsNoDirectRGB())
{
AsusHid.WriteAura(AuraMessage(0, color[0], color[0], 0));
AsusHid.WriteAura(MESSAGE_SET);
AsusHid.Write(new List<byte[]> { AuraMessage(AuraMode.AuraStatic, color, color, 0xeb, isSingleColor), MESSAGE_SET });
return;
}
if (init)
{
//Init();
AsusHid.WriteAura(new byte[] { AsusHid.AURA_ID, 0xbc, 1 });
}
byte[] buffer = new byte[12];
buffer[0] = AsusHid.AURA_ID;
buffer[1] = 0xbc;
buffer[2] = 1;
buffer[3] = 1;
buffer[9] = color.R;
buffer[10] = color.G;
buffer[11] = color.B;
AsusHid.WriteAura(buffer);
}
public static void ApplyAura()
@@ -437,6 +568,8 @@ namespace GHelper.USB
timer.Enabled = false;
Logger.WriteLine($"AuraMode: {Mode}");
if (Mode == AuraMode.HEATMAP)
{
CustomRGB.ApplyHeatmap(true);
@@ -449,7 +582,7 @@ namespace GHelper.USB
{
CustomRGB.ApplyAmbient(true);
timer.Enabled = true;
timer.Interval = 120;
timer.Interval = AppConfig.Get("aura_refresh", AppConfig.ContainsModel("GU604") ? 400 : 120);
return;
}
@@ -476,18 +609,23 @@ namespace GHelper.USB
{
if ((AuraMode)AppConfig.Get("aura_mode") != AuraMode.GPUMODE) return;
Color color;
switch (GPUModeControl.gpuMode)
{
case AsusACPI.GPUModeUltimate:
ApplyColor(Color.Red, true);
color = Color.Red;
break;
case AsusACPI.GPUModeEco:
ApplyColor(Color.Green, true);
color = Color.Green;
break;
default:
ApplyColor(Color.Yellow, true);
color = Color.Yellow;
break;
}
AsusHid.Write(new List<byte[]> { AuraMessage(AuraMode.AuraStatic, color, color, 0xeb, isSingleColor), MESSAGE_APPLY, MESSAGE_SET });
}
public static void ApplyHeatmap(bool init = false)
@@ -503,7 +641,7 @@ namespace GHelper.USB
else if (cpuTemp < hot) color = ColorUtils.GetWeightedAverage(Color.Yellow, Color.Red, ((float)cpuTemp - warm) / (hot - warm));
else color = Color.Red;
ApplyColor(color, init);
ApplyDirect(color, init);
}
@@ -514,51 +652,50 @@ namespace GHelper.USB
bound.Y += bound.Height / 3;
bound.Height -= (int)Math.Round(bound.Height * (0.33f + 0.022f)); // cut 1/3 of the top screen + windows panel
var screen_low = AmbientData.CamptureScreen(bound, 512, 288);
Bitmap screeb_pxl;
Bitmap screen_low = AmbientData.CamptureScreen(bound, 512, 288); //quality decreases greatly if it is less 512 ;
Bitmap screeb_pxl = AmbientData.ResizeImage(screen_low, 4, 2); // 4x2 zone. top for keyboard and bot for lightbar;
if (isStrix) //laptop with lightbar
int zones = AURA_ZONES;
if (isStrix) // laptop with lightbar
{
screeb_pxl = AmbientData.ResizeImage(screen_low, 4, 2); // 4x2 zone. top for keyboard and bot for lightbar
var mid_left = ColorUtils.GetMidColor(screeb_pxl.GetPixel(0, 1), screeb_pxl.GetPixel(1, 1));
var mid_right = ColorUtils.GetMidColor(screeb_pxl.GetPixel(2, 1), screeb_pxl.GetPixel(3, 1));
AmbientData.Colors[6].RGB = ColorUtils.HSV.UpSaturation(screeb_pxl.GetPixel(3, 1)); // right bck
AmbientData.Colors[11].RGB = ColorUtils.HSV.UpSaturation(screeb_pxl.GetPixel(1, 1)); // left bck
AmbientData.Colors[7].RGB = AmbientData.Colors[6].RGB; // right
AmbientData.Colors[10].RGB = AmbientData.Colors[11].RGB; // left
AmbientData.Colors[8].RGB = ColorUtils.HSV.UpSaturation(mid_right); // center right
AmbientData.Colors[9].RGB = ColorUtils.HSV.UpSaturation(mid_left); // center left
AmbientData.Colors[4].RGB = ColorUtils.HSV.UpSaturation(screeb_pxl.GetPixel(1, 1)); // left bck
AmbientData.Colors[5].RGB = ColorUtils.HSV.UpSaturation(mid_left); // center left
AmbientData.Colors[6].RGB = ColorUtils.HSV.UpSaturation(mid_right); // center right
AmbientData.Colors[7].RGB = ColorUtils.HSV.UpSaturation(screeb_pxl.GetPixel(3, 1)); // right bck
for (int i = 0; i < 4; i++) // keyboard
AmbientData.Colors[i].RGB = ColorUtils.HSV.UpSaturation(screeb_pxl.GetPixel(i, 0));
}
else
{
screeb_pxl = AmbientData.ResizeImage(screen_low, 1, 1);
var average = ColorUtils.HSV.UpSaturation(screeb_pxl.GetPixel(0, 0), (float)0.3);
for (int i = 0; i < 4; i++) //just color transfer from the bottom screen on keyboard
AmbientData.Colors[i].RGB = average;
zones = 1;
AmbientData.Colors[0].RGB = ColorUtils.HSV.UpSaturation(ColorUtils.GetDominantColor(screeb_pxl), (float)0.3);
}
//screen_low.Save("big.jpg", ImageFormat.Jpeg);
//screeb_pxl.Save("small.jpg", ImageFormat.Jpeg);
//screeb_pxl.Save("test.jpg", ImageFormat.Jpeg);
screen_low.Dispose();
screeb_pxl.Dispose();
bool is_fresh = false;
bool is_fresh = init;
for (int i = 0; i < AURA_ZONES; i++)
for (int i = 0; i < zones; i++)
{
if (AmbientData.result[i].ToArgb() != AmbientData.Colors[i].RGB.ToArgb())
is_fresh = true;
if (AmbientData.result[i].ToArgb() != AmbientData.Colors[i].RGB.ToArgb()) is_fresh = true;
AmbientData.result[i] = AmbientData.Colors[i].RGB;
}
if (is_fresh)
ApplyColor(AmbientData.result, init);
{
if (isStrix) ApplyDirect(AmbientData.result, init);
else ApplyDirect(AmbientData.result[0], init);
}
}
static class AmbientData

View File

@@ -55,10 +55,10 @@ namespace GHelper
tableBios.AutoSize = true;
tableBios.AutoSizeMode = AutoSizeMode.GrowAndShrink;
tableBios.ColumnCount = 4;
tableBios.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 20F));
tableBios.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 23F));
tableBios.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 40F));
tableBios.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 15F));
tableBios.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 25F));
tableBios.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 22F));
tableBios.Dock = DockStyle.Top;
tableBios.Location = new Point(20, 20);
tableBios.Margin = new Padding(4);
@@ -99,14 +99,14 @@ namespace GHelper
panelBiosTitle.Location = new Point(0, 0);
panelBiosTitle.Margin = new Padding(4);
panelBiosTitle.Name = "panelBiosTitle";
panelBiosTitle.Size = new Size(1256, 62);
panelBiosTitle.Size = new Size(1294, 62);
panelBiosTitle.TabIndex = 3;
//
// labelUpdates
//
labelUpdates.Anchor = AnchorStyles.Top | AnchorStyles.Right;
labelUpdates.Font = new Font("Segoe UI", 9F, FontStyle.Bold, GraphicsUnit.Point);
labelUpdates.Location = new Point(810, 23);
labelUpdates.Location = new Point(848, 23);
labelUpdates.Name = "labelUpdates";
labelUpdates.Size = new Size(245, 32);
labelUpdates.TabIndex = 4;
@@ -122,7 +122,7 @@ namespace GHelper
buttonRefresh.FlatAppearance.BorderSize = 0;
buttonRefresh.FlatStyle = FlatStyle.Flat;
buttonRefresh.Image = Properties.Resources.icons8_refresh_32;
buttonRefresh.Location = new Point(1183, 14);
buttonRefresh.Location = new Point(1221, 14);
buttonRefresh.Name = "buttonRefresh";
buttonRefresh.Secondary = true;
buttonRefresh.Size = new Size(52, 46);
@@ -138,7 +138,7 @@ namespace GHelper
panelBios.Margin = new Padding(4);
panelBios.Name = "panelBios";
panelBios.Padding = new Padding(20);
panelBios.Size = new Size(1256, 40);
panelBios.Size = new Size(1294, 40);
panelBios.TabIndex = 4;
//
// panelDrivers
@@ -150,7 +150,7 @@ namespace GHelper
panelDrivers.Margin = new Padding(4);
panelDrivers.Name = "panelDrivers";
panelDrivers.Padding = new Padding(20);
panelDrivers.Size = new Size(1256, 40);
panelDrivers.Size = new Size(1294, 40);
panelDrivers.TabIndex = 6;
//
// tableDrivers
@@ -158,10 +158,10 @@ namespace GHelper
tableDrivers.AutoSize = true;
tableDrivers.AutoSizeMode = AutoSizeMode.GrowAndShrink;
tableDrivers.ColumnCount = 4;
tableDrivers.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 20F));
tableDrivers.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 23F));
tableDrivers.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 40F));
tableDrivers.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 15F));
tableDrivers.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 25F));
tableDrivers.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 22F));
tableDrivers.Dock = DockStyle.Top;
tableDrivers.Location = new Point(20, 20);
tableDrivers.Margin = new Padding(4);
@@ -178,7 +178,7 @@ namespace GHelper
panelDriversTitle.Location = new Point(0, 102);
panelDriversTitle.Margin = new Padding(4);
panelDriversTitle.Name = "panelDriversTitle";
panelDriversTitle.Size = new Size(1256, 44);
panelDriversTitle.Size = new Size(1294, 44);
panelDriversTitle.TabIndex = 5;
//
// labelDrivers
@@ -208,7 +208,7 @@ namespace GHelper
AutoScaleDimensions = new SizeF(192F, 192F);
AutoScaleMode = AutoScaleMode.Dpi;
AutoScroll = true;
ClientSize = new Size(1256, 690);
ClientSize = new Size(1294, 690);
Controls.Add(panelDrivers);
Controls.Add(panelDriversTitle);
Controls.Add(panelBios);

View File

@@ -1,20 +1,28 @@
# G-Helper - Lightweight control tool for Asus laptops
[![United24](https://raw.githubusercontent.com/seerge/g-helper/main/docs/ua.png)](https://u24.gov.ua/)
[![GitHub release](https://img.shields.io/github/release/seerge/g-helper.svg?style=flat-square)](https://GitHub.com/seerge/g-helper/releases/)
[![Github all releases](https://img.shields.io/github/downloads/seerge/g-helper/total.svg?style=flat-square)](https://GitHub.com/seerge/g-helper/releases/) [![GitHub stars](https://img.shields.io/github/stars/seerge/g-helper.svg?style=social)](https://GitHub.com/seerge/g-helper/stargazers/) <sup> Language: English | <a href="https://github.com/seerge/g-helper/blob/main/docs/README.zh-CN.md">[中文]</a></sup>
[![Github all releases](https://img.shields.io/github/downloads/seerge/g-helper/total.svg?style=flat-square)](https://GitHub.com/seerge/g-helper/releases/) [![GitHub stars](https://img.shields.io/github/stars/seerge/g-helper.svg?style=social)](https://GitHub.com/seerge/g-helper/stargazers/)
Small and lightweight Armoury Crate alternative for Asus laptops offering almost same functionality without extra bloat and unnecessary services. Works on all popular models, such as ROG Zephyrus G14, G15, G16, M16, Flow X13, Flow X16, Flow Z13, TUF Series, Strix / Scar Series, ProArt, VivoBook and many more!
Small and lightweight Armoury Crate alternative for Asus laptops offering almost same functionality without extra bloat and unnecessary services.
Works with all popular models, such as ROG Zephyrus G14, G15, G16, M16, Flow X13, Flow X16, Flow Z13, TUF Series, Strix / Scar Series, ProArt, VivoBook and many more!
# [:floppy_disk:Download](https://github.com/seerge/g-helper/releases/latest/download/GHelper.zip)
# [:floppy_disk:Download](https://github.com/seerge/g-helper/releases/latest/download/GHelper.zip)
- Don't forget to [**Check Requirements**](#requirements-mandatory) and [**Read FAQ**](#question-faq)
- If you like this app, please give it a star :star: and spread the word about it!
- [FAQ](https://github.com/seerge/g-helper/wiki/FAQ)
- [Setup and Requirements](https://github.com/seerge/g-helper/wiki/Requirements)
- [Troubleshooting](https://github.com/seerge/g-helper/wiki/Troubleshooting)
- [Power User Settings](https://github.com/seerge/g-helper/wiki/Power-user-settings)
#### Support project in [:euro: EUR](https://www.paypal.com/donate/?hosted_button_id=4HMSHS4EBQWTA) | [💵 USD](https://www.paypal.com/donate/?hosted_button_id=SRM6QUX6ACXDY)
### Support project in [:euro: EUR](https://www.paypal.com/donate/?hosted_button_id=4HMSHS4EBQWTA) or [💵 USD](https://www.paypal.com/donate/?hosted_button_id=SRM6QUX6ACXDY)
![Gihhub](https://github.com/seerge/g-helper/assets/5920850/4d98465a-63a5-4498-ae14-afb3e67e7e82)
[![G-Helper Download](https://github.com/seerge/g-helper/assets/5920850/4d98465a-63a5-4498-ae14-afb3e67e7e82)](https://github.com/seerge/g-helper/releases/latest/download/GHelper.zip)
## :gift: Main Advantages
## :loudspeaker: YouTube Reviews and Guides
| [![Youtube review Josh Cravey](https://i.ytimg.com/vi/hqe-PjuE-K8/hqdefault.jpg)](https://www.youtube.com/watch?v=hqe-PjuE-K8) | [![Youtube review cbutters Tech](https://i.ytimg.com/vi/6aVdwJKZSSc/hqdefault.jpg)](https://www.youtube.com/watch?v=6aVdwJKZSSc) |
| ----------------- | ---------------- |
| [Josh Cravey](https://www.youtube.com/watch?v=hqe-PjuE-K8) | [cbutters Tech](https://www.youtube.com/watch?v=6aVdwJKZSSc) |
## :gift: Advantages
1. Seamless and automatic GPU switching
2. All performance modes can be fully customized with power limits and fan curves
@@ -42,7 +50,7 @@ Small and lightweight Armoury Crate alternative for Asus laptops offering almost
14. Asus Mice settings
15. Mini-led multi-zone switch
### :gear: Automatic switching when on battery or plugged in
### :gear: Automation
- Performance Mode switching when on battery or plugged in
- Optimized GPU mode - disables dGPU on battery and enables when plugged in
- Auto Screen refresh rate (60Hz on battery and max Hz when plugged)
@@ -80,278 +88,44 @@ Each BIOS mode is paired with matching Windows Power Mode. You can adjust this s
- ROG Harpe Ace Aim Lab Edition
- ROG Keris Wireless
- ROG Chakram X (P708)
- ROG Chakram Core (P511)
- ROG Strix III Gladius III Aimpoint Wireless (P711)
- ROG Gladius II and Gladius II Origin (P502 and P504)
- ROG Gladius III
- ROG Gladius III Wireless
- ROG Strix Impact II Wireless
- TUF Gaming M4 Wireless (P306)
- TUF Gaming M3
- TUF Gaming M3 Gen II
Huge thanks to [@IceStormNG](https://github.com/IceStormNG) 👑 for contribution and research (!).
## :question: FAQ
### ⌨️ Keybindings
#### How do I stop the Armoury Crate install popup appearing every time I press the M4 / Rog key?
Stop ``ArmouryCrateControlInterface`` service under windows Services app or you can stop all asus services from ``Extra`` -> ``Stop services``
- ``Fn + F5 / Fn + Shift + F5`` - Toggle Performance Modes forwards / backwards
- ``Ctrl + Shift + F5 / Ctrl + Shift + Alt + F5`` - Toggle Performance Modes forwards / backwards
- ``Ctrl + Shift + F12`` - Open G-Helper window
- ``Ctrl + M1 / M2`` - Screen brightness Down / Up
- ``Shift + M1 / M2`` - Backlight brightness Down / Up
- ``Fn + C`` - Fn-Lock
- ``Fn + Shift + F7 / F8`` - Matrix brightness Down / Up
- ``Ctrl + Shift + F20`` - Mute Microphone
- ``Ctrl + Shift + Alt + F14`` - Eco Mode
- ``Ctrl + Shift + Alt + F15`` - Standard Mode
- [Custom keybindings / hotkeys](https://github.com/seerge/g-helper/wiki/Power-user-settings#custom-hotkey-actions)
#### Battery charge limiter is not working
It could be that Asus services are overwriting this limit after. You may want to stop them by clicking "Stop" in the Asus Services section (under Extra).
Please note: For some devices not every charge limit % may be working. Try to set standard **80%** to be sure.
------------------
I don't have a Microsoft certificate to sign the app yet, so if you get a warning from Windows Defender on launch (Windows Protected your PC), click ``More Info`` -> ``Run anyway``.
#### I don't see GPU modes section
Some older models (for example G14 2020) don't support disabling GPU on hardware level, therefore GPU section makes no sense for them and will be hidden
#### Why is Ultimate GPU mode not available on my laptop?
Ultimate mode is supported (by hardware) only on 2022+ models
#### Should I apply custom power limits (PPT) and fan curves?
You don't have to, it's purely optional. From my experience built in (in BIOS) performance modes work well. Limit your power or apply custom fan curves only if you have issues. As soon as you click Apply in the ``Fans + Power`` section BIOS will consider your fan curve as "custom"! (no matter if you modified it or not)
#### How does G-helper control my fan speeds?
**It doesn't.** Your firmware / BIOS controls them in real-time. Armoury also doesn't control fans in real time anyhow.
What G-helper can do - is (optionally) set a custom fan profile to the current performance mode consisting of 8 pairs of temperature + fan speed % via the same endpoint Armoury seems to use. How it will be interpreted - is still up to the firmware.
#### How do I change fan % to fan RPM?
Click on them
#### When I try to apply a custom fan curve I get "BIOS rejected fan curve"
TUF models from 2021 and older don't support custom fan curves at all. Most probably you didn't have them in the Armoury as well?
#### I don't see a GPU temperature in G-helper
Most probably either you are using Eco / Optimized mode and your dGPU is simply off, or your windows has put the dGPU into sleep to preserve power.
#### I don't see app after starting it
Please check the system tray for a ``(G)`` icon. By default Windows is keen to hide all icons, so you may need to click ``^`` to see them all. I would advise to right click on Taskbar select TaskBar Settings -> Other System Tray icons -> Mark G-Helper to be always ON.
#### App crashes or doesn't work properly
Open "Event Viewer" from the start menu, go to Windows Logs -> Application and check for recent Errors mentioning G-Helper. If you see one - please post a [new issue](https://github.com/seerge/g-helper/issues) with all details from this error.
#### Can I use the MyASUS app along with G-Helper?
You can, the only problem is that MyASUS may override the battery charge limit that you set before. My advice in such a situation would be to set the same limit (i.e. 80%) in both MyASUS and G-Helper.
#### How do I set Mute Microphone to M3?
If you have the Asus Optimization Service running, it's controlled by that service (therefore G-helper doesn't interfere and doesn't touch this function). Alternatively you can stop that service - and you can bind M3 to anything you want.
#### How do I set different "Visual styles"?
Personally, I'm not a big fan of them, as they make colors very inaccurate. But if you want so - you can adjust display colors using either Nvidia Control panel or AMD Adrenaline (appropriate display sections). If you really want you can also use [own ASUS utility from MS Store](https://apps.microsoft.com/store/detail/gamevisual/9P4K1LFTXSH8?hl=nl-nl&gl=nl&rtc=1)
#### Can I overclock Nvidia GPU core / memory?
Make sure that your dGPU is enabled (i.e. it's not in Eco mode). Open Fans + Power section and adjust core / memory clock offsets. They work the same as in armoury's manual mode. Please keep in mind that (unfortunately) you need admin permissions for that, and the app will ask you for them. (*)
#### How to Undervolt GPU
Due to the way the Core Clock offset works for the GPU. When you increase clock offset you undervolt it at the same time (see picture)
1. Increase ``Core Clock Offset`` under ``Fans + Power -> GPU`` until your 3dmark / furmark / game runs stable. Start with +100, +150, +200 ... This should make your **scores / fps better within same power** / heat as before.
2. Set ``Core Clock Limit`` to a certain value (it really depends on application / game that you use) **to lower your power** / heat consumption
![Undervolting](https://github.com/seerge/g-helper/assets/5920850/6cadd219-fa92-4260-8bae-cb24c284b8cf)
#### Windows Defender marks app as malware / virus
False positives from Windows Defender (or any other similar system that uses machine learning for detection) is possible as the application is not digitally signed with a certificate. You can always download a version below or compile the app by yourself. All application sources are open and can be monitored from A to Z :)
#### Where can I find app settings or logs ?
You can find them under the ``%AppData%\GHelper`` folder. Please include them when posting a new bug-report or issue.
#### App refuses to run on startup or runs without any icon in tray on startup
Open the app, and uncheck and check again "run on startup". If it still doesn't help (for some reason), you can try to manually edit the "GHelper" task in Windows Task Scheduler, and add a couple of seconds delay to start.
#### How do I uninstall G-helper?
G-helper is a single exe, and it doesn't install anything in the system. To remove it - you can simply delete exe :) If you have applied any custom fan profiles or PPTs - before removing I would recommend selecting your
favorite performance mode (for example balanced) and clicking "Factory defaults" under Fans + Power.
#### Can I undervolt my CPU ?
Currently you can undervolt AMD CPUs. If your model supports that - you will see an undervolting slider under ``Fans+Power -> Advanced``. If you don't see a slider there, it means your CPU doesn't support undervolting. Full list of models that support that [can be found here](https://github.com/seerge/g-helper/discussions/736)
#### I have G14 2023 and my GPU refuses to disable/enable
It seems to be an issue in older BIOS versions. As [users report](https://github.com/seerge/g-helper/issues/680) - latest BIOS 312 (installable via MyASUS or G-Helper -> Updates) resolves all issues :) So please update.
#### I have G15 2022 and my GPU refuses to disable/enable or my fans misbehave
G15 2022 is known to have a notoriously bugged BIOS (last one 313). Multiple users have reported that problems can be solved by rolling back to a [previous BIOS 311 from Asus Support website](https://rog.asus.com/nl/laptops/rog-zephyrus/rog-zephyrus-g15-2022-series/helpdesk_bios/).
#### I have uninstalled Armoury and my GPU performance is lower than it was
Check your NVidia Experience settings and make sure that you have **Whisper Mode** set to ``OFF``. Also you can go to reset all settings ``Nvidia Control panel -> Manage 3D Settings -> Reset to defaults``
#### How do I do a hardware reset on a laptop?
All Asus laptops have an option to do a hardware reset that can be handy sometimes. It doesn't touch your data, but resets all main hardware-related things (enables your dGPU, wakes up wifi/bt adapter if it hangs for some reason, etc.).
Turn OFF laptop. Press and hold the "power" button for 30-40 seconds. Then boot normally (it will take a bit longer to boot)
#### What is G-helper ?
Small and lightweight Armoury Crate alternative for Asus laptops offering almost same functionality without extra bloat and unnecessary services. Works on ROG G14, G15, G16, M16, X13, Z13, X16, TUF, Scar, Vivobook, ProArt and all other popular models.
-----------------------------
## :euro: [Support Project](https://www.paypal.com/donate/?hosted_button_id=4HMSHS4EBQWTA)
------------------
#### If you like the app you can make a Donation
| [Paypal in EUR](https://www.paypal.com/donate/?hosted_button_id=4HMSHS4EBQWTA) | [Paypal in USD](https://www.paypal.com/donate/?hosted_button_id=SRM6QUX6ACXDY) |
| ------------------------------------------ | ----------------------------------------------- |
| [![QR Code](https://user-images.githubusercontent.com/5920850/233658717-0441494d-fede-4a2c-b4f2-4b16a184a69a.png)](https://www.paypal.com/donate/?hosted_button_id=4HMSHS4EBQWTA) | [![QR Code](https://github-production-user-asset-6210df.s3.amazonaws.com/5920850/239492811-b487e89a-3df6-42ea-bdb8-24c455ab2310.png)](https://www.paypal.com/donate/?hosted_button_id=SRM6QUX6ACXDY) |
----------------
### How to run
1. Download [**latest release**](https://github.com/seerge/g-helper/releases/latest/download/GHelper.zip)
2. Unzip to a folder of your choice _(don't run exe from zip directly, as windows will put it into temp folder and delete after)_
3. Run **GHelper.exe**
### Requirements (mandatory)
- [Microsoft .NET7](https://dotnet.microsoft.com/en-us/download). Most probably you already have it. Otherwise [download it](https://dotnet.microsoft.com/en-us/download/dotnet/thank-you/sdk-7.0.202-windows-x64-installer) from the official website.
- [Asus System Control Interface v3+](https://dlcdnets.asus.com/pub/ASUS/nb/Image/CustomComponent/ASUSSystemControlInterfaceV3/ASUSSystemControlInterfaceV3.exe). This "driver" from asus should be installed automatically by windows update or along other asus apps. If it's not the case for some reason - you can download and install it manually.
### Recommendations (optional)
- It's **not recommended** to use the app in combination with Armoury Crate services, because they adjust the same settings. You can [uninstall it using AC own uninstall tool](https://dlcdnets.asus.com/pub/ASUS/mb/14Utilities/Armoury_Crate_Uninstall_Tool.zip?model=armoury%20crate). Just in case, you can always install it back later.
- It's **not recommended** to have "ASUS Smart Display Control" app running, as it will try to change refresh rates and fight with g-helper for the same function. You can safely uninstall it.
- You can stop / disable unnecessary services: Go to **Extra** in the app, and press "Stop" in Asus Services section (former **[debloat.bat](https://raw.githubusercontent.com/seerge/g-helper/main/debloat.bat)**). To start / enable services back - click "Start" instead (former **[bloat.bat](https://raw.githubusercontent.com/seerge/g-helper/main/bloat.bat)**)
- It is **strongly recommended** to run app with windows default "balanced" power plan
![Screenshot 2023-06-09 153453](https://github.com/seerge/g-helper/assets/5920850/d1d05c53-a0bd-4207-b23a-244653f3e7df)
-------------------------------
## Notice for G14 2023 users who complain about not being able to set Eco mode
This is a known issue with the Nvidia Drivers / Windows that occurs if you shutdown or restart a system with dGPU disabled (Eco mode). This situation can happen for **BOTH Armoury Crate and G-Helper** (as it doesn't depend on them in a first place)
Scenario to reproduce (for both AC / GH):
1. Set Eco mode and shutdown / start or reboot your computer
2. After booting in Eco set Standard -> ``brightness controls won't work``
3. Try to set Eco mode -> ``it won't work``
4. G-Helper would offer you to restart GPU in Device Manager, after that you will be able to set Eco, AC won't be able to do anything
To prevent this from happening, G-Helper by default would try to enable dGPU before shutdown / restart.
If you want to turn this feature off uncheck ``Extra`` -> ``Enable GPU on shutdown (prevents issue with Eco mode)``
-------------------------------
I don't have a Microsoft certificate to sign the app yet, so if you get a warning from Windows Defender on launch (Windows Protected your PC), click More Info -> Run anyway.
------------------
## Power user settings
GENERAL NOTE: "Power user" settings require editing config located at ``%AppData%\GHelper\config.json``.
- Quit G-Helper
- Make your changes / additions co ``config.json``
- Start G-Helper again
_Make sure to keep json structure (i.e. not to break it with extra or missing commas, etc.) or the app will fail to read it and will just recreate an empty config instead._
### Manual app language setting
By default the app will use your windows language setting. But you can set language manually (if it supported of course)
```
"language" : "en",
```
(by replacing "en" with language of your choice)
### Custom windows power plans with each mode
You can manually assign a custom power plan GUID to each mode.
Format is following : ``"scheme_<mode>" : "GUID" ``
Where ``mode = 0 (balanced), 1 (turbo), 2 (silent)``
Example (for default windows "balanced" power plan):
```
"scheme_0": "381b4222-f694-41f0-9685-ff5bb260df2e",
"scheme_1": "381b4222-f694-41f0-9685-ff5bb260df2e",
"scheme_2": "381b4222-f694-41f0-9685-ff5bb260df2e",
```
### Alternative Activation for XG Mobile 6850XT
If you experience a situation when your XG Mobile doesn't work on full power when Activated. It's possible it needs an "alternative" command to get activated.
To turn it on, add following line to config :
```
"xgm_special" : 1,
```
### Override UI theme
By default the app would set the UI theme from the "app" theme in Windows setting. You can override it to specific theme, or general windows theme
```
"ui_mode" : "dark",
"ui_mode" : "light",
"ui_mode" : "windows",
```
### Skip keyboard Aura initialisation on startup
By default the app would set the last remembered RGB mode for the keyboard on each launch. To disable it completely
```
"skip_aura" : 1,
````
### Disable OSD
Disable app's OSD (for performance modes, keyboard backlight, etc.)
```
"disable_osd": 1,
```
### Disable "Tablet mode" on X13/X16
To disable automatic touchpad toggling when laptop enters / leaves tablet mode
```
"disable_tablet": 1,
```
### Extra Keybindings
- ``Ctrl + Shift + F5`` - Toggle Performance Modes
- ``Ctrl + Shift + F12`` - Open G-Helper window
- ``Ctrl + M1 / M2`` - Screen brightness Down / Up
- ``Shift + M1 / M2`` - Backlight brightness Down / Up
If you don't want this bindings to work you can add
```
"skip_hotkeys":1,
```
### Toggle Performance Mode or Toggle App Window key binding
To change binding for Toggle Performance Modes forward / backward to ``Ctrl + Shift + KEY`` / ``Ctrl + Shift + Alt + KEY``
```
"keybind_profile": 116,
```
To change binding for Toggle App Window to ``Ctrl + Shift + KEY``
```
"keybind_app": 123,
```
Where 116 is [numerical code for desired key](https://www.oreilly.com/library/view/javascript-dhtml/9780596514082/apb.html). Put 0 to completely disable this binding.
### Higher Maximum GPU Clock / Memory Offsets
By default under the GPU section you can set up to +250/+250 for Core and Memory Clock Offset. To increase this value:
```
"max_gpu_core": 300,
"max_gpu_memory": 1500,
```
### Custom hotkey actions
Select ``Custom`` next to appropriate hotkey under ``Extra`` settings and do one of the following:
1. To run any custom application - put a full path to exe into "action" text field, for example:
``C:\Program Files\EA Games\Battlefield 2042\BF2042.exe``
2. To simulate any windows key or key-combination - put appropriate keycode(s) into the "action" field separated by space.
For example ``0x2C`` for ``Print Screen`` or ``0x11 0xA0 0x31`` for ``Ctrl+Shift+1``
Full list of keycodes https://learn.microsoft.com/en-us/windows/win32/inputdev/virtual-key-codes
![Screenshot 2023-07-17 192155](https://github.com/seerge/g-helper/assets/5920850/e450e124-1589-4787-bce8-7c37ffe72fbd)
------------
**Libraries and projects used**
- [Linux Kernel](https://github.com/torvalds/linux/blob/master/drivers/platform/x86/asus-wmi.c) for some basic endpoints in ASUS ACPI/WMI interface
- [NvAPIWrapper](https://github.com/falahati/NvAPIWrapper) for accessing Nvidia API