Compare commits

...

109 Commits

Author SHA1 Message Date
Serge
1038d4479c Merge pull request #939 from seerge/l10n_main
New Crowdin updates
2023-07-30 16:49:07 +02:00
Serge
78d663c62c New translations Strings.resx (German) 2023-07-30 16:48:49 +02:00
Serge
2f96adb204 Merge pull request #938 from IceStormNG/asus-mouse-support
Added Rog Keris Wireless
2023-07-30 16:40:07 +02:00
IceStormNG
e6f9be1bfd Merge branch 'seerge:main' into asus-mouse-support 2023-07-30 16:30:54 +02:00
IceStormNG
297cec6e77 Added Rog Keris Wireless mouse support 2023-07-30 16:30:34 +02:00
Serge
5aca01b21e Z13 rear-window 2023-07-30 16:20:53 +02:00
Serge
3df2193afb Merge branch 'main' of https://github.com/seerge/g-helper 2023-07-30 16:20:19 +02:00
Serge
ed513e4469 Merge pull request #937 from seerge/l10n_main
New Crowdin updates
2023-07-30 15:30:01 +02:00
Serge
c398537a1f Rear window backlight for Z13 2023-07-30 15:28:53 +02:00
Serge
42641f5627 New translations Strings.resx (Vietnamese) 2023-07-30 15:28:28 +02:00
Serge
7b10532650 New translations Strings.resx (Chinese Traditional) 2023-07-30 15:28:27 +02:00
Serge
eb4d4c3d70 New translations Strings.resx (Turkish) 2023-07-30 15:28:26 +02:00
Serge
43c93d6a70 New translations Strings.resx (Portuguese) 2023-07-30 15:28:25 +02:00
Serge
bd26dfb774 New translations Strings.resx (Lithuanian) 2023-07-30 15:28:24 +02:00
Serge
c4aa38c82b New translations Strings.resx (Korean) 2023-07-30 15:28:23 +02:00
Serge
c0597e01b6 New translations Strings.resx (Italian) 2023-07-30 15:28:22 +02:00
Serge
8a6c4e1cee New translations Strings.resx (Hungarian) 2023-07-30 15:28:22 +02:00
Serge
0a77176bcc New translations Strings.resx (German) 2023-07-30 15:28:21 +02:00
Serge
35fc78d757 New translations Strings.resx (Spanish) 2023-07-30 15:28:20 +02:00
Serge
407206309a New translations Strings.resx (French) 2023-07-30 15:28:19 +02:00
Serge
51bc8143dd New translations Strings.resx (Romanian) 2023-07-30 15:28:18 +02:00
Serge
98bac7171a New translations Strings.resx (Chinese Simplified) 2023-07-30 15:28:17 +02:00
Serge
839ef140ff New translations Strings.resx (Ukrainian) 2023-07-30 15:28:16 +02:00
Serge
c3e97caf49 New translations Strings.resx (Polish) 2023-07-30 15:28:15 +02:00
Serge
96319f4dbb Merge pull request #935 from IceStormNG/asus-mouse-support
Auto refresh mice when hovering the button
2023-07-30 14:00:18 +02:00
IceStormNG
cbccd5b641 Merge branch 'seerge:main' into asus-mouse-support 2023-07-30 13:49:27 +02:00
IceStormNG
4742c33466 Auto refresh mice when hovering over their buttons and the mouse is marked as "Not ready". 2023-07-30 13:48:53 +02:00
Serge
81681eb7c4 Merge pull request #934 from IceStormNG/asus-mouse-support
Added Lighting zones for supported mice.
2023-07-30 13:47:41 +02:00
IceStormNG
7c80a32fc2 Added Lighting zones for supported mice. 2023-07-30 13:42:35 +02:00
Serge
9cb2904632 FX707 fix, AuraPower refactoring 2023-07-30 13:32:01 +02:00
Serge
40859a06d0 Merge pull request #933 from IceStormNG/asus-mouse-support
Added support for ASUS TUF Gaming M4 Wireless (P306_Wireless) Mouse
2023-07-30 12:20:37 +02:00
IceStormNG
b00ac96e99 Merge branch 'main' into asus-mouse-support
# Conflicts:
#	app/Peripherals/PeripheralsProvider.cs
2023-07-30 11:56:07 +02:00
IceStormNG
c7c14a9211 byte 3 is only 2 for mice with XY DPIs. 2023-07-30 11:23:38 +02:00
IceStormNG
78cbfc8813 Added TUF M4 Wireless mouse. 2023-07-30 11:18:15 +02:00
IceStormNG
569519aeea Mice with only one DPI per setting read through a different packet 2023-07-30 11:17:21 +02:00
IceStormNG
3cfd7e01ca Renamed Gladius III to Gladius III Aimpoint as there is also a regular Gladius III 2023-07-30 11:16:53 +02:00
IceStormNG
93b6c360d6 Handling of error responses from the mouse and some mice spam packets through the interface. Read again, until you get the matching USB packet or a timeout happens (aka: No data left in the buffer). 2023-07-30 11:10:31 +02:00
IceStormNG
15ba1b8c38 Allow override of "SetDPIProfil" function if needed 2023-07-30 11:09:27 +02:00
IceStormNG
2f35889a61 Measure mouse I/O for diagnostics purpose. 2023-07-30 10:56:01 +02:00
IceStormNG
e0e86962d1 Re-ordered sync 2023-07-30 10:54:33 +02:00
IceStormNG
cdde8afc7e Somem ice have separate X/Y DPI settings (not supported yet, but needs to be read differently from the mouse). 2023-07-30 10:54:09 +02:00
IceStormNG
0af87ecdac Variable DPI Increment as some mice do not use 50 per step but 100. 2023-07-30 10:50:09 +02:00
IceStormNG
4b3d18347c Variable max brightness as some mice do not use 0-100 but 0-4 as brightness values. 2023-07-30 10:49:26 +02:00
IceStormNG
8c2ee50c93 Fixed DPI button colors for mice with no custom DPI colors. 2023-07-30 10:48:31 +02:00
IceStormNG
6d66831770 Simplified exception naming 2023-07-30 10:48:02 +02:00
IceStormNG
e0795dd16b Adjust timeout to lower values. The typical mouse response time is between 1 and 40ms. 300 should be more than enough to fail earlier when the device does not respond. 2023-07-30 10:47:35 +02:00
IceStormNG
b0733d9254 Refresh the mouse only every 20s in background. When GHelper becomes visible, force refresh all devices. 2023-07-30 10:46:10 +02:00
Serge
0d757ef06d Merge branch 'main' of https://github.com/seerge/g-helper 2023-07-29 18:52:57 +02:00
Serge
d19aaf804a Heatmap fix 2023-07-29 18:52:53 +02:00
Serge
41adef4786 Merge pull request #919 from seerge/l10n_main
New Crowdin updates
2023-07-29 00:00:48 +02:00
Serge
9ee3ae7359 New translations Strings.resx (Chinese Simplified) 2023-07-28 17:20:38 +02:00
Serge
bd0f97c5d9 New translations Strings.resx (Chinese Simplified) 2023-07-28 13:59:51 +02:00
Serge
f85644bd2b Merge pull request #913 from seerge/l10n_main
New Crowdin updates
2023-07-28 13:49:38 +02:00
Serge
62f1263951 New translations Strings.resx (Chinese Simplified) 2023-07-28 12:21:04 +02:00
Serge
1fcd0f2b97 New translations Strings.resx (Chinese Simplified) 2023-07-28 10:17:37 +02:00
Serge
73baf548a4 New translations Strings.resx (Chinese Simplified) 2023-07-28 07:51:13 +02:00
Serge
6357a22e38 New translations Strings.resx (Ukrainian) 2023-07-28 02:54:21 +02:00
Serge
3a08ee8d7c New translations Strings.resx (Polish) 2023-07-28 02:54:20 +02:00
Serge
af67684e91 New translations Strings.resx (Polish) 2023-07-28 01:47:09 +02:00
Serge
a877904b46 New translations Strings.resx (Ukrainian) 2023-07-28 00:49:53 +02:00
Serge
f090b4a44e New translations Strings.resx (Polish) 2023-07-28 00:49:52 +02:00
Serge
b3f5a2dfa2 Skip Updates param 2023-07-28 00:06:57 +02:00
Serge
6029660860 Added timer to prevent checking for Mice multiple times in a row 2023-07-28 00:06:01 +02:00
Serge
b304ce22b9 MaxRPM calibration tweaks 2023-07-27 23:50:31 +02:00
Serge
b7910d9f79 Close updates on main window close 2023-07-27 19:46:05 +02:00
Serge
505b3a9e4a Merge pull request #907 from IceStormNG/asus-mouse-support
ASUS Mouse: Resolved deadlocks
2023-07-27 11:21:56 +02:00
IceStormNG
42a346b19e Wait for mouse data before opening the window so the user does not see the form populating data. 2023-07-27 10:41:23 +02:00
IceStormNG
7c42f87751 Check for dispose before trying to Invoke. 2023-07-27 10:40:41 +02:00
IceStormNG
a323bd85ab Mouse refreshes battery again during "ReadSensors". But it does that nonblocking and event driven. 2023-07-27 10:19:17 +02:00
IceStormNG
6e4b5226f5 Do not refresh battery on main thread. 2023-07-27 10:14:06 +02:00
IceStormNG
acaa8bc523 Added missing import for synchronized annotation 2023-07-27 10:13:46 +02:00
IceStormNG
ef31935b24 Improved handling of critical sections to solve deadlocks. 2023-07-27 10:13:24 +02:00
Serge
a9c104d388 Duo keys 2023-07-27 01:41:25 +02:00
Serge
bc9d6be0d6 Deadlock 2023-07-27 00:25:30 +02:00
Serge
d37e06d399 Merge branch 'main' of https://github.com/seerge/g-helper 2023-07-27 00:06:30 +02:00
Serge
d49832ae0f Restoring Aura Call 2023-07-27 00:06:28 +02:00
Serge
f318d09b9b Merge pull request #902 from seerge/l10n_main
New Crowdin updates
2023-07-26 23:58:50 +02:00
Serge
5cd77bb5cc Merge pull request #905 from IceStormNG/clamshell-power-user-settings
Clamshell power user settings
2023-07-26 23:58:27 +02:00
Serge
6b4d18c9c5 Merge branch 'main' of https://github.com/seerge/g-helper 2023-07-26 23:57:22 +02:00
Serge
5830220a3d Performance tweaks 2023-07-26 23:57:20 +02:00
IceStormNG
dfe4bebe58 Only write the setting if it does not exist yet. 2023-07-26 23:19:36 +02:00
IceStormNG
cff2c9af0b Save lid action to config file during startup if user has set it to hibernate or shutdown. 2023-07-26 23:15:28 +02:00
IceStormNG
e16a50f1f2 Safeguard to prevent users from choosing invalid options. 2023-07-26 21:16:30 +02:00
IceStormNG
254e6a8633 Users can set a config option clamshell_default_lid_action to set their desired option when clamshell is not engaged. 2023-07-26 21:14:03 +02:00
IceStormNG
ccb413b2e6 Clamshell mode is now properly off by default 2023-07-26 21:13:24 +02:00
Serge
e2ea79b758 Merge pull request #904 from IceStormNG/asus-mouse-support
Asus mouse fixes
2023-07-26 21:09:30 +02:00
IceStormNG
c1043efc53 Merge branch 'seerge:main' into asus-mouse-support 2023-07-26 21:02:30 +02:00
IceStormNG
6c6c93b378 Better handling of wireless devies that get turned off. The dongle still responds but it sends empty packets. 2023-07-26 21:01:39 +02:00
IceStormNG
f9a8665290 Properly save the new dpi profile so it stays selected also when the mouse is powered off and on again. 2023-07-26 20:46:53 +02:00
IceStormNG
54d7dfe4f8 Safeguards to prevent crash when closing the window in the exact moment the battery is updated. 2023-07-26 20:32:09 +02:00
Serge
eeb53cb483 New translations Strings.resx (Lithuanian) 2023-07-26 20:23:50 +02:00
Serge
b9625f2748 Aura color 2023-07-26 19:26:23 +02:00
Serge
8d41c228e0 Merge branch 'main' of https://github.com/seerge/g-helper 2023-07-26 19:13:12 +02:00
Serge
0146a40244 Heatmap fix 2023-07-26 19:13:10 +02:00
Serge
98534c9b43 Merge pull request #899 from seerge/l10n_main
New Crowdin updates
2023-07-26 18:11:16 +02:00
Serge
67aa2b5af8 New translations Strings.resx (Lithuanian) 2023-07-26 17:47:40 +02:00
IceStormNG
a451125475 Additional logging for dispose and disconnet events. 2023-07-26 15:08:27 +02:00
IceStormNG
fb3ffba343 Log energy settings only as they're supported. 2023-07-26 15:08:03 +02:00
IceStormNG
86ded739d6 Allow enabling packet logger through variable for test builds. 2023-07-26 15:07:39 +02:00
IceStormNG
80e8d54b57 UI fixes for mouse. Only register for events once the view is shown to prevent crashes. Add some additional logging for troubleshooting. Run Mouse sync asynchronously 2023-07-26 15:06:06 +02:00
Serge
f0f05fa1fd New translations Strings.resx (Chinese Traditional) 2023-07-26 09:40:55 +02:00
Serge
b7a4027b41 New translations Strings.resx (Chinese Traditional) 2023-07-26 08:27:58 +02:00
Serge
5f3958ce2b Merge branch 'main' of https://github.com/seerge/g-helper 2023-07-26 00:48:38 +02:00
Serge
dcf4fa5a48 TUF Heatmap fix 2023-07-26 00:48:37 +02:00
Serge
6ace1fdd63 Merge pull request #897 from seerge/l10n_main
New Crowdin updates
2023-07-25 23:55:36 +02:00
Serge
243e307f0a New translations Strings.resx (Spanish) 2023-07-25 23:04:52 +02:00
Serge
8e53a94a13 Merge pull request #896 from seerge/l10n_main
New Crowdin updates
2023-07-25 22:09:53 +02:00
Serge
4f337a7100 New translations Strings.resx (Spanish) 2023-07-25 22:03:23 +02:00
Serge
b1a9bfe68d G14 2020 Extra fix 2023-07-25 22:01:03 +02:00
38 changed files with 1906 additions and 454 deletions

View File

@@ -96,8 +96,15 @@ public static class AppConfig
public static int Get(string name, int empty = -1) public static int Get(string name, int empty = -1)
{ {
if (config.ContainsKey(name)) if (config.ContainsKey(name))
{
//Debug.WriteLine(name);
return int.Parse(config[name].ToString()); return int.Parse(config[name].ToString());
else return empty; }
else
{
//Debug.WriteLine(name + "E");
return empty;
}
} }
public static bool Is(string name) public static bool Is(string name)

View File

@@ -60,6 +60,12 @@
labelPerformance = new Label(); labelPerformance = new Label();
panelLighting = new Panel(); panelLighting = new Panel();
panelLightingContent = new Panel(); panelLightingContent = new Panel();
tableLayoutPanel3 = new TableLayoutPanel();
buttonLightingZoneScroll = new UI.RButton();
buttonLightingZoneLogo = new UI.RButton();
buttonLightingZoneAll = new UI.RButton();
buttonLightingZoneUnderglow = new UI.RButton();
buttonLightingZoneDock = new UI.RButton();
comboBoxAnimationDirection = new UI.RComboBox(); comboBoxAnimationDirection = new UI.RComboBox();
labelAnimationDirection = new Label(); labelAnimationDirection = new Label();
checkBoxRandomColor = new CheckBox(); checkBoxRandomColor = new CheckBox();
@@ -89,6 +95,9 @@
pictureBoxBatteryState = new PictureBox(); pictureBoxBatteryState = new PictureBox();
buttonSync = new UI.RButton(); buttonSync = new UI.RButton();
panelBottomButtons = new Panel(); panelBottomButtons = new Panel();
tableLayoutPanel2 = new TableLayoutPanel();
rButton1 = new UI.RButton();
rButton2 = new UI.RButton();
panelProfiles.SuspendLayout(); panelProfiles.SuspendLayout();
panelPerformance.SuspendLayout(); panelPerformance.SuspendLayout();
panelPerformanceOther.SuspendLayout(); panelPerformanceOther.SuspendLayout();
@@ -102,6 +111,7 @@
((System.ComponentModel.ISupportInitialize)pictureKeyboard).BeginInit(); ((System.ComponentModel.ISupportInitialize)pictureKeyboard).BeginInit();
panelLighting.SuspendLayout(); panelLighting.SuspendLayout();
panelLightingContent.SuspendLayout(); panelLightingContent.SuspendLayout();
tableLayoutPanel3.SuspendLayout();
((System.ComponentModel.ISupportInitialize)pictureBoxLightingColor).BeginInit(); ((System.ComponentModel.ISupportInitialize)pictureBoxLightingColor).BeginInit();
panelLightingHeader.SuspendLayout(); panelLightingHeader.SuspendLayout();
((System.ComponentModel.ISupportInitialize)pictureBoxLighting).BeginInit(); ((System.ComponentModel.ISupportInitialize)pictureBoxLighting).BeginInit();
@@ -112,6 +122,7 @@
panelBatteryState.SuspendLayout(); panelBatteryState.SuspendLayout();
((System.ComponentModel.ISupportInitialize)pictureBoxBatteryState).BeginInit(); ((System.ComponentModel.ISupportInitialize)pictureBoxBatteryState).BeginInit();
panelBottomButtons.SuspendLayout(); panelBottomButtons.SuspendLayout();
tableLayoutPanel2.SuspendLayout();
SuspendLayout(); SuspendLayout();
// //
// panelProfiles // panelProfiles
@@ -553,12 +564,13 @@
panelLighting.Location = new Point(11, 476); panelLighting.Location = new Point(11, 476);
panelLighting.Name = "panelLighting"; panelLighting.Name = "panelLighting";
panelLighting.Padding = new Padding(0, 0, 0, 25); panelLighting.Padding = new Padding(0, 0, 0, 25);
panelLighting.Size = new Size(654, 271); panelLighting.Size = new Size(654, 329);
panelLighting.TabIndex = 42; panelLighting.TabIndex = 42;
// //
// panelLightingContent // panelLightingContent
// //
panelLightingContent.AutoSize = true; panelLightingContent.AutoSize = true;
panelLightingContent.Controls.Add(tableLayoutPanel3);
panelLightingContent.Controls.Add(comboBoxAnimationDirection); panelLightingContent.Controls.Add(comboBoxAnimationDirection);
panelLightingContent.Controls.Add(labelAnimationDirection); panelLightingContent.Controls.Add(labelAnimationDirection);
panelLightingContent.Controls.Add(checkBoxRandomColor); panelLightingContent.Controls.Add(checkBoxRandomColor);
@@ -572,9 +584,148 @@
panelLightingContent.Location = new Point(0, 30); panelLightingContent.Location = new Point(0, 30);
panelLightingContent.Name = "panelLightingContent"; panelLightingContent.Name = "panelLightingContent";
panelLightingContent.Padding = new Padding(0, 0, 0, 11); panelLightingContent.Padding = new Padding(0, 0, 0, 11);
panelLightingContent.Size = new Size(654, 216); panelLightingContent.Size = new Size(654, 274);
panelLightingContent.TabIndex = 42; panelLightingContent.TabIndex = 42;
// //
// tableLayoutPanel3
//
tableLayoutPanel3.AutoSize = true;
tableLayoutPanel3.AutoSizeMode = AutoSizeMode.GrowAndShrink;
tableLayoutPanel3.ColumnCount = 5;
tableLayoutPanel3.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 20F));
tableLayoutPanel3.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 20F));
tableLayoutPanel3.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 20F));
tableLayoutPanel3.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 20F));
tableLayoutPanel3.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 20F));
tableLayoutPanel3.Controls.Add(buttonLightingZoneScroll, 0, 0);
tableLayoutPanel3.Controls.Add(buttonLightingZoneLogo, 0, 0);
tableLayoutPanel3.Controls.Add(buttonLightingZoneAll, 0, 0);
tableLayoutPanel3.Controls.Add(buttonLightingZoneUnderglow, 1, 0);
tableLayoutPanel3.Controls.Add(buttonLightingZoneDock, 2, 0);
tableLayoutPanel3.Dock = DockStyle.Top;
tableLayoutPanel3.Location = new Point(0, 0);
tableLayoutPanel3.Margin = new Padding(6, 3, 6, 3);
tableLayoutPanel3.Name = "tableLayoutPanel3";
tableLayoutPanel3.RowCount = 1;
tableLayoutPanel3.RowStyles.Add(new RowStyle(SizeType.Absolute, 60F));
tableLayoutPanel3.Size = new Size(654, 60);
tableLayoutPanel3.TabIndex = 56;
//
// buttonLightingZoneScroll
//
buttonLightingZoneScroll.AccessibleName = "DPI Setting 4";
buttonLightingZoneScroll.Activated = false;
buttonLightingZoneScroll.AutoSize = true;
buttonLightingZoneScroll.AutoSizeMode = AutoSizeMode.GrowAndShrink;
buttonLightingZoneScroll.BackColor = SystemColors.ControlLightLight;
buttonLightingZoneScroll.BorderColor = Color.LightGreen;
buttonLightingZoneScroll.BorderRadius = 5;
buttonLightingZoneScroll.Dock = DockStyle.Fill;
buttonLightingZoneScroll.FlatAppearance.BorderSize = 0;
buttonLightingZoneScroll.FlatStyle = FlatStyle.Flat;
buttonLightingZoneScroll.ForeColor = SystemColors.ControlText;
buttonLightingZoneScroll.ImageAlign = ContentAlignment.BottomCenter;
buttonLightingZoneScroll.Location = new Point(263, 3);
buttonLightingZoneScroll.Name = "buttonLightingZoneScroll";
buttonLightingZoneScroll.Secondary = false;
buttonLightingZoneScroll.Size = new Size(124, 54);
buttonLightingZoneScroll.TabIndex = 7;
buttonLightingZoneScroll.Text = "Scrollwheel";
buttonLightingZoneScroll.TextImageRelation = TextImageRelation.ImageAboveText;
buttonLightingZoneScroll.UseVisualStyleBackColor = false;
//
// buttonLightingZoneLogo
//
buttonLightingZoneLogo.AccessibleName = "DPI Setting 2";
buttonLightingZoneLogo.Activated = false;
buttonLightingZoneLogo.AutoSize = true;
buttonLightingZoneLogo.AutoSizeMode = AutoSizeMode.GrowAndShrink;
buttonLightingZoneLogo.BackColor = SystemColors.ControlLightLight;
buttonLightingZoneLogo.BorderColor = Color.LightGreen;
buttonLightingZoneLogo.BorderRadius = 5;
buttonLightingZoneLogo.Dock = DockStyle.Fill;
buttonLightingZoneLogo.FlatAppearance.BorderSize = 0;
buttonLightingZoneLogo.FlatStyle = FlatStyle.Flat;
buttonLightingZoneLogo.ForeColor = SystemColors.ControlText;
buttonLightingZoneLogo.ImageAlign = ContentAlignment.BottomCenter;
buttonLightingZoneLogo.Location = new Point(133, 3);
buttonLightingZoneLogo.Name = "buttonLightingZoneLogo";
buttonLightingZoneLogo.Secondary = false;
buttonLightingZoneLogo.Size = new Size(124, 54);
buttonLightingZoneLogo.TabIndex = 4;
buttonLightingZoneLogo.Text = "Logo";
buttonLightingZoneLogo.TextImageRelation = TextImageRelation.ImageAboveText;
buttonLightingZoneLogo.UseVisualStyleBackColor = false;
//
// buttonLightingZoneAll
//
buttonLightingZoneAll.AccessibleName = "DPI Setting 1";
buttonLightingZoneAll.Activated = false;
buttonLightingZoneAll.AutoSize = true;
buttonLightingZoneAll.AutoSizeMode = AutoSizeMode.GrowAndShrink;
buttonLightingZoneAll.BackColor = SystemColors.ControlLightLight;
buttonLightingZoneAll.BorderColor = Color.LightGreen;
buttonLightingZoneAll.BorderRadius = 5;
buttonLightingZoneAll.CausesValidation = false;
buttonLightingZoneAll.Dock = DockStyle.Fill;
buttonLightingZoneAll.FlatAppearance.BorderSize = 0;
buttonLightingZoneAll.FlatStyle = FlatStyle.Flat;
buttonLightingZoneAll.ForeColor = SystemColors.ControlText;
buttonLightingZoneAll.Location = new Point(3, 3);
buttonLightingZoneAll.Name = "buttonLightingZoneAll";
buttonLightingZoneAll.Secondary = false;
buttonLightingZoneAll.Size = new Size(124, 54);
buttonLightingZoneAll.TabIndex = 4;
buttonLightingZoneAll.Text = "All";
buttonLightingZoneAll.TextImageRelation = TextImageRelation.ImageAboveText;
buttonLightingZoneAll.UseVisualStyleBackColor = false;
//
// buttonLightingZoneUnderglow
//
buttonLightingZoneUnderglow.AccessibleName = "DPI Setting 3";
buttonLightingZoneUnderglow.Activated = false;
buttonLightingZoneUnderglow.AutoSize = true;
buttonLightingZoneUnderglow.AutoSizeMode = AutoSizeMode.GrowAndShrink;
buttonLightingZoneUnderglow.BackColor = SystemColors.ControlLightLight;
buttonLightingZoneUnderglow.BorderColor = Color.LightGreen;
buttonLightingZoneUnderglow.BorderRadius = 5;
buttonLightingZoneUnderglow.Dock = DockStyle.Fill;
buttonLightingZoneUnderglow.FlatAppearance.BorderSize = 0;
buttonLightingZoneUnderglow.FlatStyle = FlatStyle.Flat;
buttonLightingZoneUnderglow.ForeColor = SystemColors.ControlText;
buttonLightingZoneUnderglow.ImageAlign = ContentAlignment.BottomCenter;
buttonLightingZoneUnderglow.Location = new Point(393, 3);
buttonLightingZoneUnderglow.Name = "buttonLightingZoneUnderglow";
buttonLightingZoneUnderglow.Secondary = false;
buttonLightingZoneUnderglow.Size = new Size(124, 54);
buttonLightingZoneUnderglow.TabIndex = 5;
buttonLightingZoneUnderglow.Text = "Underglow";
buttonLightingZoneUnderglow.TextImageRelation = TextImageRelation.ImageAboveText;
buttonLightingZoneUnderglow.UseVisualStyleBackColor = false;
//
// buttonLightingZoneDock
//
buttonLightingZoneDock.AccessibleName = "DPI Setting 4";
buttonLightingZoneDock.Activated = false;
buttonLightingZoneDock.AutoSize = true;
buttonLightingZoneDock.AutoSizeMode = AutoSizeMode.GrowAndShrink;
buttonLightingZoneDock.BackColor = SystemColors.ControlLightLight;
buttonLightingZoneDock.BorderColor = Color.LightGreen;
buttonLightingZoneDock.BorderRadius = 5;
buttonLightingZoneDock.Dock = DockStyle.Fill;
buttonLightingZoneDock.FlatAppearance.BorderSize = 0;
buttonLightingZoneDock.FlatStyle = FlatStyle.Flat;
buttonLightingZoneDock.ForeColor = SystemColors.ControlText;
buttonLightingZoneDock.ImageAlign = ContentAlignment.BottomCenter;
buttonLightingZoneDock.Location = new Point(523, 3);
buttonLightingZoneDock.Name = "buttonLightingZoneDock";
buttonLightingZoneDock.Secondary = false;
buttonLightingZoneDock.Size = new Size(128, 54);
buttonLightingZoneDock.TabIndex = 6;
buttonLightingZoneDock.Text = "Dock";
buttonLightingZoneDock.TextImageRelation = TextImageRelation.ImageAboveText;
buttonLightingZoneDock.UseVisualStyleBackColor = false;
//
// comboBoxAnimationDirection // comboBoxAnimationDirection
// //
comboBoxAnimationDirection.BorderColor = Color.White; comboBoxAnimationDirection.BorderColor = Color.White;
@@ -582,7 +733,7 @@
comboBoxAnimationDirection.DropDownStyle = ComboBoxStyle.DropDownList; comboBoxAnimationDirection.DropDownStyle = ComboBoxStyle.DropDownList;
comboBoxAnimationDirection.FlatStyle = FlatStyle.Flat; comboBoxAnimationDirection.FlatStyle = FlatStyle.Flat;
comboBoxAnimationDirection.FormattingEnabled = true; comboBoxAnimationDirection.FormattingEnabled = true;
comboBoxAnimationDirection.Location = new Point(366, 172); comboBoxAnimationDirection.Location = new Point(366, 230);
comboBoxAnimationDirection.Margin = new Padding(16, 0, 16, 0); comboBoxAnimationDirection.Margin = new Padding(16, 0, 16, 0);
comboBoxAnimationDirection.Name = "comboBoxAnimationDirection"; comboBoxAnimationDirection.Name = "comboBoxAnimationDirection";
comboBoxAnimationDirection.Size = new Size(284, 33); comboBoxAnimationDirection.Size = new Size(284, 33);
@@ -590,7 +741,7 @@
// //
// labelAnimationDirection // labelAnimationDirection
// //
labelAnimationDirection.Location = new Point(6, 172); labelAnimationDirection.Location = new Point(6, 230);
labelAnimationDirection.Margin = new Padding(6, 0, 6, 0); labelAnimationDirection.Margin = new Padding(6, 0, 6, 0);
labelAnimationDirection.Name = "labelAnimationDirection"; labelAnimationDirection.Name = "labelAnimationDirection";
labelAnimationDirection.Size = new Size(316, 33); labelAnimationDirection.Size = new Size(316, 33);
@@ -599,7 +750,7 @@
// //
// checkBoxRandomColor // checkBoxRandomColor
// //
checkBoxRandomColor.Location = new Point(520, 53); checkBoxRandomColor.Location = new Point(520, 111);
checkBoxRandomColor.Margin = new Padding(6, 0, 6, 0); checkBoxRandomColor.Margin = new Padding(6, 0, 6, 0);
checkBoxRandomColor.Name = "checkBoxRandomColor"; checkBoxRandomColor.Name = "checkBoxRandomColor";
checkBoxRandomColor.Size = new Size(128, 37); checkBoxRandomColor.Size = new Size(128, 37);
@@ -614,7 +765,7 @@
comboBoxAnimationSpeed.DropDownStyle = ComboBoxStyle.DropDownList; comboBoxAnimationSpeed.DropDownStyle = ComboBoxStyle.DropDownList;
comboBoxAnimationSpeed.FlatStyle = FlatStyle.Flat; comboBoxAnimationSpeed.FlatStyle = FlatStyle.Flat;
comboBoxAnimationSpeed.FormattingEnabled = true; comboBoxAnimationSpeed.FormattingEnabled = true;
comboBoxAnimationSpeed.Location = new Point(366, 130); comboBoxAnimationSpeed.Location = new Point(366, 188);
comboBoxAnimationSpeed.Margin = new Padding(16, 0, 16, 0); comboBoxAnimationSpeed.Margin = new Padding(16, 0, 16, 0);
comboBoxAnimationSpeed.Name = "comboBoxAnimationSpeed"; comboBoxAnimationSpeed.Name = "comboBoxAnimationSpeed";
comboBoxAnimationSpeed.Size = new Size(284, 33); comboBoxAnimationSpeed.Size = new Size(284, 33);
@@ -622,7 +773,7 @@
// //
// labelAnimationSpeed // labelAnimationSpeed
// //
labelAnimationSpeed.Location = new Point(6, 130); labelAnimationSpeed.Location = new Point(6, 188);
labelAnimationSpeed.Margin = new Padding(6, 0, 6, 0); labelAnimationSpeed.Margin = new Padding(6, 0, 6, 0);
labelAnimationSpeed.Name = "labelAnimationSpeed"; labelAnimationSpeed.Name = "labelAnimationSpeed";
labelAnimationSpeed.Size = new Size(316, 33); labelAnimationSpeed.Size = new Size(316, 33);
@@ -632,7 +783,7 @@
// pictureBoxLightingColor // pictureBoxLightingColor
// //
pictureBoxLightingColor.Anchor = AnchorStyles.Top | AnchorStyles.Right; pictureBoxLightingColor.Anchor = AnchorStyles.Top | AnchorStyles.Right;
pictureBoxLightingColor.Location = new Point(480, 62); pictureBoxLightingColor.Location = new Point(480, 120);
pictureBoxLightingColor.Margin = new Padding(6); pictureBoxLightingColor.Margin = new Padding(6);
pictureBoxLightingColor.Name = "pictureBoxLightingColor"; pictureBoxLightingColor.Name = "pictureBoxLightingColor";
pictureBoxLightingColor.Size = new Size(20, 20); pictureBoxLightingColor.Size = new Size(20, 20);
@@ -649,7 +800,7 @@
buttonLightingColor.BorderRadius = 2; buttonLightingColor.BorderRadius = 2;
buttonLightingColor.FlatStyle = FlatStyle.Flat; buttonLightingColor.FlatStyle = FlatStyle.Flat;
buttonLightingColor.ForeColor = SystemColors.ControlText; buttonLightingColor.ForeColor = SystemColors.ControlText;
buttonLightingColor.Location = new Point(373, 53); buttonLightingColor.Location = new Point(373, 111);
buttonLightingColor.Margin = new Padding(3, 6, 3, 6); buttonLightingColor.Margin = new Padding(3, 6, 3, 6);
buttonLightingColor.Name = "buttonLightingColor"; buttonLightingColor.Name = "buttonLightingColor";
buttonLightingColor.Secondary = false; buttonLightingColor.Secondary = false;
@@ -666,7 +817,7 @@
comboBoxLightingMode.DropDownStyle = ComboBoxStyle.DropDownList; comboBoxLightingMode.DropDownStyle = ComboBoxStyle.DropDownList;
comboBoxLightingMode.FlatStyle = FlatStyle.Flat; comboBoxLightingMode.FlatStyle = FlatStyle.Flat;
comboBoxLightingMode.FormattingEnabled = true; comboBoxLightingMode.FormattingEnabled = true;
comboBoxLightingMode.Location = new Point(367, 14); comboBoxLightingMode.Location = new Point(367, 72);
comboBoxLightingMode.Margin = new Padding(16, 0, 16, 0); comboBoxLightingMode.Margin = new Padding(16, 0, 16, 0);
comboBoxLightingMode.Name = "comboBoxLightingMode"; comboBoxLightingMode.Name = "comboBoxLightingMode";
comboBoxLightingMode.Size = new Size(284, 33); comboBoxLightingMode.Size = new Size(284, 33);
@@ -674,7 +825,7 @@
// //
// labelLightingMode // labelLightingMode
// //
labelLightingMode.Location = new Point(7, 14); labelLightingMode.Location = new Point(7, 72);
labelLightingMode.Margin = new Padding(6, 0, 6, 0); labelLightingMode.Margin = new Padding(6, 0, 6, 0);
labelLightingMode.Name = "labelLightingMode"; labelLightingMode.Name = "labelLightingMode";
labelLightingMode.Size = new Size(316, 33); labelLightingMode.Size = new Size(316, 33);
@@ -739,7 +890,7 @@
panelEnergy.Controls.Add(labelAutoPowerOff); panelEnergy.Controls.Add(labelAutoPowerOff);
panelEnergy.Controls.Add(panelEnergyHeader); panelEnergy.Controls.Add(panelEnergyHeader);
panelEnergy.Dock = DockStyle.Top; panelEnergy.Dock = DockStyle.Top;
panelEnergy.Location = new Point(11, 747); panelEnergy.Location = new Point(11, 805);
panelEnergy.Name = "panelEnergy"; panelEnergy.Name = "panelEnergy";
panelEnergy.Padding = new Padding(0, 0, 0, 25); panelEnergy.Padding = new Padding(0, 0, 0, 25);
panelEnergy.Size = new Size(654, 143); panelEnergy.Size = new Size(654, 143);
@@ -920,11 +1071,72 @@
panelBottomButtons.AutoSizeMode = AutoSizeMode.GrowAndShrink; panelBottomButtons.AutoSizeMode = AutoSizeMode.GrowAndShrink;
panelBottomButtons.Controls.Add(buttonSync); panelBottomButtons.Controls.Add(buttonSync);
panelBottomButtons.Dock = DockStyle.Top; panelBottomButtons.Dock = DockStyle.Top;
panelBottomButtons.Location = new Point(11, 890); panelBottomButtons.Location = new Point(11, 948);
panelBottomButtons.Name = "panelBottomButtons"; panelBottomButtons.Name = "panelBottomButtons";
panelBottomButtons.Size = new Size(654, 67); panelBottomButtons.Size = new Size(654, 67);
panelBottomButtons.TabIndex = 47; panelBottomButtons.TabIndex = 47;
// //
// tableLayoutPanel2
//
tableLayoutPanel2.AutoSize = true;
tableLayoutPanel2.AutoSizeMode = AutoSizeMode.GrowAndShrink;
tableLayoutPanel2.ColumnCount = 4;
tableLayoutPanel2.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 25F));
tableLayoutPanel2.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 25F));
tableLayoutPanel2.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 25F));
tableLayoutPanel2.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 25F));
tableLayoutPanel2.Controls.Add(rButton1, 0, 0);
tableLayoutPanel2.Location = new Point(0, 0);
tableLayoutPanel2.Name = "tableLayoutPanel2";
tableLayoutPanel2.RowCount = 1;
tableLayoutPanel2.RowStyles.Add(new RowStyle(SizeType.Absolute, 20F));
tableLayoutPanel2.Size = new Size(200, 100);
tableLayoutPanel2.TabIndex = 0;
//
// rButton1
//
rButton1.AccessibleName = "DPI Setting 2";
rButton1.Activated = false;
rButton1.BackColor = SystemColors.ControlLightLight;
rButton1.BorderColor = Color.Transparent;
rButton1.BorderRadius = 5;
rButton1.Dock = DockStyle.Top;
rButton1.FlatAppearance.BorderSize = 0;
rButton1.FlatStyle = FlatStyle.Flat;
rButton1.ForeColor = SystemColors.ControlText;
rButton1.Image = Properties.Resources.lighting_dot_32;
rButton1.ImageAlign = ContentAlignment.BottomCenter;
rButton1.Location = new Point(3, 3);
rButton1.Name = "rButton1";
rButton1.Secondary = false;
rButton1.Size = new Size(44, 90);
rButton1.TabIndex = 4;
rButton1.Text = "DPI 2\r\n1000";
rButton1.TextImageRelation = TextImageRelation.ImageAboveText;
rButton1.UseVisualStyleBackColor = false;
//
// rButton2
//
rButton2.AccessibleName = "DPI Setting 1";
rButton2.Activated = false;
rButton2.BackColor = SystemColors.ControlLightLight;
rButton2.BorderColor = Color.Transparent;
rButton2.BorderRadius = 5;
rButton2.CausesValidation = false;
rButton2.Dock = DockStyle.Top;
rButton2.FlatAppearance.BorderSize = 0;
rButton2.FlatStyle = FlatStyle.Flat;
rButton2.ForeColor = SystemColors.ControlText;
rButton2.Image = Properties.Resources.lighting_dot_32;
rButton2.Location = new Point(3, 3);
rButton2.Name = "rButton2";
rButton2.Secondary = false;
rButton2.Size = new Size(44, 90);
rButton2.TabIndex = 4;
rButton2.Text = "DPI 1\r\n800";
rButton2.TextImageRelation = TextImageRelation.ImageAboveText;
rButton2.UseVisualStyleBackColor = false;
//
// AsusMouseSettings // AsusMouseSettings
// //
AutoScaleDimensions = new SizeF(144F, 144F); AutoScaleDimensions = new SizeF(144F, 144F);
@@ -932,7 +1144,7 @@
AutoScroll = true; AutoScroll = true;
AutoSize = true; AutoSize = true;
AutoSizeMode = AutoSizeMode.GrowAndShrink; AutoSizeMode = AutoSizeMode.GrowAndShrink;
ClientSize = new Size(676, 1030); ClientSize = new Size(676, 1072);
Controls.Add(panelBottomButtons); Controls.Add(panelBottomButtons);
Controls.Add(panelEnergy); Controls.Add(panelEnergy);
Controls.Add(panelLighting); Controls.Add(panelLighting);
@@ -966,6 +1178,9 @@
panelLighting.ResumeLayout(false); panelLighting.ResumeLayout(false);
panelLighting.PerformLayout(); panelLighting.PerformLayout();
panelLightingContent.ResumeLayout(false); panelLightingContent.ResumeLayout(false);
panelLightingContent.PerformLayout();
tableLayoutPanel3.ResumeLayout(false);
tableLayoutPanel3.PerformLayout();
((System.ComponentModel.ISupportInitialize)pictureBoxLightingColor).EndInit(); ((System.ComponentModel.ISupportInitialize)pictureBoxLightingColor).EndInit();
panelLightingHeader.ResumeLayout(false); panelLightingHeader.ResumeLayout(false);
panelLightingHeader.PerformLayout(); panelLightingHeader.PerformLayout();
@@ -979,6 +1194,7 @@
panelBatteryState.PerformLayout(); panelBatteryState.PerformLayout();
((System.ComponentModel.ISupportInitialize)pictureBoxBatteryState).EndInit(); ((System.ComponentModel.ISupportInitialize)pictureBoxBatteryState).EndInit();
panelBottomButtons.ResumeLayout(false); panelBottomButtons.ResumeLayout(false);
tableLayoutPanel2.ResumeLayout(false);
ResumeLayout(false); ResumeLayout(false);
PerformLayout(); PerformLayout();
} }
@@ -1047,5 +1263,14 @@
private UI.RButton buttonSync; private UI.RButton buttonSync;
private Panel panelBottomButtons; private Panel panelBottomButtons;
private NumericUpDown numericUpDownCurrentDPI; private NumericUpDown numericUpDownCurrentDPI;
private TableLayoutPanel tableLayoutPanel3;
private UI.RButton buttonLightingZoneScroll;
private UI.RButton buttonLightingZoneLogo;
private UI.RButton buttonLightingZoneAll;
private UI.RButton buttonLightingZoneUnderglow;
private UI.RButton buttonLightingZoneDock;
private TableLayoutPanel tableLayoutPanel2;
private UI.RButton rButton1;
private UI.RButton rButton2;
} }
} }

View File

@@ -20,6 +20,7 @@ namespace GHelper
private readonly AsusMouse mouse; private readonly AsusMouse mouse;
private readonly RButton[] dpiButtons; private readonly RButton[] dpiButtons;
private LightingZone visibleZone = LightingZone.All;
private bool updateMouseDPI = true; private bool updateMouseDPI = true;
@@ -33,6 +34,7 @@ namespace GHelper
labelPollingRate.Text = Properties.Strings.PollingRate; labelPollingRate.Text = Properties.Strings.PollingRate;
labelLighting.Text = Properties.Strings.Lighting; labelLighting.Text = Properties.Strings.Lighting;
labelLightingMode.Text = Properties.Strings.AuraLightingMode;
labelEnergy.Text = Properties.Strings.EnergySettings; labelEnergy.Text = Properties.Strings.EnergySettings;
labelPerformance.Text = Properties.Strings.MousePerformance; labelPerformance.Text = Properties.Strings.MousePerformance;
checkBoxRandomColor.Text = Properties.Strings.AuraRandomColor; checkBoxRandomColor.Text = Properties.Strings.AuraRandomColor;
@@ -44,6 +46,12 @@ namespace GHelper
labelChargingState.Text = "(" + Properties.Strings.Charging + ")"; labelChargingState.Text = "(" + Properties.Strings.Charging + ")";
labelProfile.Text = Properties.Strings.Profile; labelProfile.Text = Properties.Strings.Profile;
buttonLightingZoneLogo.Text = Properties.Strings.AuraZoneLogo;
buttonLightingZoneScroll.Text = Properties.Strings.AuraZoneScroll;
buttonLightingZoneUnderglow.Text = Properties.Strings.AuraZoneUnderglow;
buttonLightingZoneAll.Text = Properties.Strings.AuraZoneAll;
buttonLightingZoneDock.Text = Properties.Strings.AuraZoneDock;
InitTheme(); InitTheme();
this.Text = mouse.GetDisplayName(); this.Text = mouse.GetDisplayName();
@@ -51,8 +59,6 @@ namespace GHelper
Shown += AsusMouseSettings_Shown; Shown += AsusMouseSettings_Shown;
FormClosing += AsusMouseSettings_FormClosing; FormClosing += AsusMouseSettings_FormClosing;
mouse.Disconnect += Mouse_Disconnect;
mouse.BatteryUpdated += Mouse_BatteryUpdated;
comboProfile.DropDownClosed += ComboProfile_DropDownClosed; comboProfile.DropDownClosed += ComboProfile_DropDownClosed;
sliderDPI.ValueChanged += SliderDPI_ValueChanged; sliderDPI.ValueChanged += SliderDPI_ValueChanged;
@@ -82,18 +88,82 @@ namespace GHelper
sliderLowBatteryWarning.MouseUp += SliderLowBatteryWarning_MouseUp; sliderLowBatteryWarning.MouseUp += SliderLowBatteryWarning_MouseUp;
comboBoxAutoPowerOff.DropDownClosed += ComboBoxAutoPowerOff_DropDownClosed; comboBoxAutoPowerOff.DropDownClosed += ComboBoxAutoPowerOff_DropDownClosed;
buttonLightingZoneAll.Click += ButtonLightingZoneAll_Click;
buttonLightingZoneDock.Click += ButtonLightingZoneDock_Click;
buttonLightingZoneLogo.Click += ButtonLightingZoneLogo_Click;
buttonLightingZoneUnderglow.Click += ButtonLightingZoneUnderglow_Click;
buttonLightingZoneScroll.Click += ButtonLightingZoneScroll_Click;
InitMouseCapabilities(); InitMouseCapabilities();
Logger.WriteLine(mouse.GetDisplayName() + " (GUI): Initialized capabilities. Synchronizing mouse data");
RefreshMouseData(); RefreshMouseData();
} }
private void SwitchLightingZone(LightingZone zone)
{
if (!mouse.HasRGB())
{
return;
}
visibleZone = zone;
InitLightingModes();
VisusalizeLightingSettings();
}
private void ButtonLightingZoneScroll_Click(object? sender, EventArgs e)
{
SwitchLightingZone(LightingZone.Scrollwheel);
}
private void ButtonLightingZoneUnderglow_Click(object? sender, EventArgs e)
{
SwitchLightingZone(LightingZone.Underglow);
}
private void ButtonLightingZoneLogo_Click(object? sender, EventArgs e)
{
SwitchLightingZone(LightingZone.Logo);
}
private void ButtonLightingZoneDock_Click(object? sender, EventArgs e)
{
SwitchLightingZone(LightingZone.Dock);
}
private void ButtonLightingZoneAll_Click(object? sender, EventArgs e)
{
SwitchLightingZone(LightingZone.All);
}
private void AsusMouseSettings_FormClosing(object? sender, FormClosingEventArgs e) private void AsusMouseSettings_FormClosing(object? sender, FormClosingEventArgs e)
{ {
mouse.BatteryUpdated -= Mouse_BatteryUpdated; mouse.BatteryUpdated -= Mouse_BatteryUpdated;
mouse.Disconnect -= Mouse_Disconnect; mouse.Disconnect -= Mouse_Disconnect;
mouse.MouseReadyChanged -= Mouse_MouseReadyChanged;
}
private void Mouse_MouseReadyChanged(object? sender, EventArgs e)
{
if (Disposing || IsDisposed)
{
return;
}
if (!mouse.IsDeviceReady)
{
this.Invoke(delegate
{
Close();
});
}
} }
private void Mouse_BatteryUpdated(object? sender, EventArgs e) private void Mouse_BatteryUpdated(object? sender, EventArgs e)
{ {
if (Disposing || IsDisposed)
{
return;
}
this.Invoke(delegate this.Invoke(delegate
{ {
VisualizeBatteryState(); VisualizeBatteryState();
@@ -104,7 +174,7 @@ namespace GHelper
private void ComboProfile_DropDownClosed(object? sender, EventArgs e) private void ComboProfile_DropDownClosed(object? sender, EventArgs e)
{ {
mouse.SetProfile(comboProfile.SelectedIndex); mouse.SetProfile(comboProfile.SelectedIndex);
RefreshMouseData(); Task task = Task.Run((Action)RefreshMouseData);
} }
private void ComboBoxPollingRate_DropDownClosed(object? sender, EventArgs e) private void ComboBoxPollingRate_DropDownClosed(object? sender, EventArgs e)
@@ -156,51 +226,63 @@ namespace GHelper
VisualizeCurrentDPIProfile(); VisualizeCurrentDPIProfile();
} }
private void UpdateLightingSettings(LightingSetting settings, LightingZone zone)
{
mouse.SetLightingSetting(settings, visibleZone);
VisusalizeLightingSettings();
}
private void CheckBoxRandomColor_CheckedChanged(object? sender, EventArgs e) private void CheckBoxRandomColor_CheckedChanged(object? sender, EventArgs e)
{ {
LightingSetting? ls = mouse.LightingSetting; LightingSetting? ls = mouse.LightingSettingForZone(visibleZone);
ls.RandomColor = checkBoxRandomColor.Checked; ls.RandomColor = checkBoxRandomColor.Checked;
mouse.SetLightingSetting(ls); UpdateLightingSettings(ls, visibleZone);
VisusalizeLightingSettings();
} }
private void ComboBoxAnimationDirection_DropDownClosed(object? sender, EventArgs e) private void ComboBoxAnimationDirection_DropDownClosed(object? sender, EventArgs e)
{ {
LightingSetting? ls = mouse.LightingSetting; LightingSetting? ls = mouse.LightingSettingForZone(visibleZone);
ls.AnimationDirection = (AnimationDirection)comboBoxAnimationDirection.SelectedIndex; ls.AnimationDirection = (AnimationDirection)comboBoxAnimationDirection.SelectedIndex;
mouse.SetLightingSetting(ls); UpdateLightingSettings(ls, visibleZone);
VisusalizeLightingSettings();
} }
private void ComboBoxAnimationSpeed_DropDownClosed(object? sender, EventArgs e) private void ComboBoxAnimationSpeed_DropDownClosed(object? sender, EventArgs e)
{ {
LightingSetting? ls = mouse.LightingSetting; LightingSetting? ls = mouse.LightingSettingForZone(visibleZone);
ls.AnimationSpeed = (AnimationSpeed)comboBoxAnimationSpeed.SelectedIndex; ls.AnimationSpeed = (AnimationSpeed)comboBoxAnimationSpeed.SelectedIndex;
mouse.SetLightingSetting(ls); UpdateLightingSettings(ls, visibleZone);
VisusalizeLightingSettings();
} }
private void SliderBrightness_MouseUp(object? sender, MouseEventArgs e) private void SliderBrightness_MouseUp(object? sender, MouseEventArgs e)
{ {
LightingSetting? ls = mouse.LightingSetting; LightingSetting? ls = mouse.LightingSettingForZone(visibleZone);
ls.Brightness = sliderBrightness.Value; ls.Brightness = sliderBrightness.Value;
mouse.SetLightingSetting(ls); UpdateLightingSettings(ls, visibleZone);
} }
private void ComboBoxLightingMode_DropDownClosed(object? sender, EventArgs e) private void ComboBoxLightingMode_DropDownClosed(object? sender, EventArgs e)
{ {
if (!mouse.HasRGB())
{
return;
}
LightingMode lm = supportedLightingModes[comboBoxLightingMode.SelectedIndex]; LightingMode lm = supportedLightingModes[comboBoxLightingMode.SelectedIndex];
LightingSetting? ls = mouse.LightingSetting; LightingSetting? ls = mouse.LightingSettingForZone(visibleZone);
if (ls.LightingMode == lm)
{
//Nothing to do here.
return;
}
ls.LightingMode = lm; ls.LightingMode = lm;
mouse.SetLightingSetting(ls); UpdateLightingSettings(ls, visibleZone);
VisusalizeLightingSettings();
} }
private void ButtonLightingColor_Click(object? sender, EventArgs e) private void ButtonLightingColor_Click(object? sender, EventArgs e)
@@ -213,11 +295,10 @@ namespace GHelper
if (colorDlg.ShowDialog() == DialogResult.OK) if (colorDlg.ShowDialog() == DialogResult.OK)
{ {
LightingSetting? ls = mouse.LightingSetting; LightingSetting? ls = mouse.LightingSettingForZone(visibleZone);
ls.RGBColor = colorDlg.Color; ls.RGBColor = colorDlg.Color;
mouse.SetLightingSetting(ls); UpdateLightingSettings(ls, visibleZone);
VisusalizeLightingSettings();
} }
} }
@@ -308,6 +389,10 @@ namespace GHelper
//Mouse disconnected. Bye bye. //Mouse disconnected. Bye bye.
this.Invoke(delegate this.Invoke(delegate
{ {
if (Disposing || IsDisposed)
{
return;
}
this.Close(); this.Close();
}); });
@@ -316,8 +401,11 @@ namespace GHelper
private void RefreshMouseData() private void RefreshMouseData()
{ {
mouse.SynchronizeDevice(); mouse.SynchronizeDevice();
Logger.WriteLine(mouse.GetDisplayName() + " (GUI): Mouse data synchronized");
if (!mouse.IsDeviceReady) if (!mouse.IsDeviceReady)
{ {
Logger.WriteLine(mouse.GetDisplayName() + " (GUI): Mouse is not ready. Closing view.");
this.Invoke(delegate this.Invoke(delegate
{ {
this.Close(); this.Close();
@@ -325,9 +413,11 @@ namespace GHelper
return; return;
} }
this.Invoke(delegate
VisualizeMouseSettings(); {
VisualizeBatteryState(); VisualizeMouseSettings();
VisualizeBatteryState();
});
} }
private void InitMouseCapabilities() private void InitMouseCapabilities()
@@ -343,9 +433,11 @@ namespace GHelper
sliderDPI.Max = mouse.MaxDPI(); sliderDPI.Max = mouse.MaxDPI();
sliderDPI.Min = mouse.MinDPI(); sliderDPI.Min = mouse.MinDPI();
sliderDPI.Step = mouse.DPIIncrements();
numericUpDownCurrentDPI.Minimum = mouse.MinDPI(); numericUpDownCurrentDPI.Minimum = mouse.MinDPI();
numericUpDownCurrentDPI.Maximum = mouse.MaxDPI(); numericUpDownCurrentDPI.Maximum = mouse.MaxDPI();
numericUpDownCurrentDPI.Increment = mouse.DPIIncrements();
if (!mouse.HasDPIColors()) if (!mouse.HasDPIColors())
@@ -358,9 +450,9 @@ namespace GHelper
buttonDPI4.Image = ControlHelper.TintImage(Properties.Resources.lighting_dot_24, Color.Green); buttonDPI4.Image = ControlHelper.TintImage(Properties.Resources.lighting_dot_24, Color.Green);
buttonDPI1.BorderColor = Color.Red; buttonDPI1.BorderColor = Color.Red;
buttonDPI1.BorderColor = Color.Purple; buttonDPI2.BorderColor = Color.Purple;
buttonDPI1.BorderColor = Color.Blue; buttonDPI3.BorderColor = Color.Blue;
buttonDPI1.BorderColor = Color.Green; buttonDPI4.BorderColor = Color.Green;
} }
if (mouse.CanSetPollingRate()) if (mouse.CanSetPollingRate())
@@ -440,14 +532,14 @@ namespace GHelper
if (mouse.HasRGB()) if (mouse.HasRGB())
{ {
foreach (LightingMode lm in Enum.GetValues(typeof(LightingMode))) buttonLightingZoneLogo.Visible = mouse.SupportedLightingZones().Contains(LightingZone.Logo);
{ buttonLightingZoneScroll.Visible = mouse.SupportedLightingZones().Contains(LightingZone.Scrollwheel);
if (mouse.IsLightingModeSupported(lm)) buttonLightingZoneUnderglow.Visible = mouse.SupportedLightingZones().Contains(LightingZone.Underglow);
{ buttonLightingZoneDock.Visible = mouse.SupportedLightingZones().Contains(LightingZone.Dock);
comboBoxLightingMode.Items.Add(lightingModeNames.GetValueOrDefault(lm));
supportedLightingModes.Add(lm); sliderBrightness.Max = mouse.MaxBrightness();
}
} InitLightingModes();
comboBoxAnimationDirection.Items.AddRange(new string[] { comboBoxAnimationDirection.Items.AddRange(new string[] {
Properties.Strings.AuraClockwise, Properties.Strings.AuraClockwise,
@@ -466,11 +558,37 @@ namespace GHelper
} }
} }
private void InitLightingModes()
{
comboBoxLightingMode.Items.Clear();
supportedLightingModes.Clear();
foreach (LightingMode lm in Enum.GetValues(typeof(LightingMode)))
{
if (mouse.IsLightingModeSupported(lm) && mouse.IsLightingModeSupportedForZone(lm, visibleZone))
{
comboBoxLightingMode.Items.Add(lightingModeNames.GetValueOrDefault(lm));
supportedLightingModes.Add(lm);
}
}
}
private void VisualizeMouseSettings() private void VisualizeMouseSettings()
{ {
comboProfile.SelectedIndex = mouse.Profile; comboProfile.SelectedIndex = mouse.Profile;
if (mouse.HasRGB())
{
//If current lighting mode is zoned, pre-select the first zone and not "All".
bool zoned = mouse.IsLightingZoned();
if (zoned)
{
visibleZone = mouse.SupportedLightingZones()[0];
InitLightingModes();
}
}
VisualizeDPIButtons(); VisualizeDPIButtons();
VisualizeCurrentDPIProfile(); VisualizeCurrentDPIProfile();
VisusalizeLightingSettings(); VisusalizeLightingSettings();
@@ -538,6 +656,29 @@ namespace GHelper
} }
} }
public void VisusalizeLightingZones()
{
bool zoned = mouse.IsLightingZoned();
buttonLightingZoneAll.Activated = visibleZone == LightingZone.All;
buttonLightingZoneLogo.Activated = visibleZone == LightingZone.Logo;
buttonLightingZoneScroll.Activated = visibleZone == LightingZone.Scrollwheel;
buttonLightingZoneUnderglow.Activated = visibleZone == LightingZone.Underglow;
buttonLightingZoneDock.Activated = visibleZone == LightingZone.Dock;
buttonLightingZoneAll.Secondary = zoned;
buttonLightingZoneLogo.Secondary = !zoned;
buttonLightingZoneScroll.Secondary = !zoned;
buttonLightingZoneUnderglow.Secondary = !zoned;
buttonLightingZoneDock.Secondary = !zoned;
buttonLightingZoneAll.BackColor = buttonLightingZoneAll.Secondary ? RForm.buttonSecond : RForm.buttonMain;
buttonLightingZoneLogo.BackColor = buttonLightingZoneLogo.Secondary ? RForm.buttonSecond : RForm.buttonMain;
buttonLightingZoneScroll.BackColor = buttonLightingZoneScroll.Secondary ? RForm.buttonSecond : RForm.buttonMain;
buttonLightingZoneUnderglow.BackColor = buttonLightingZoneUnderglow.Secondary ? RForm.buttonSecond : RForm.buttonMain;
buttonLightingZoneDock.BackColor = buttonLightingZoneDock.Secondary ? RForm.buttonSecond : RForm.buttonMain;
}
private void VisusalizeLightingSettings() private void VisusalizeLightingSettings()
{ {
if (!mouse.HasRGB()) if (!mouse.HasRGB())
@@ -545,7 +686,9 @@ namespace GHelper
return; return;
} }
LightingSetting? ls = mouse.LightingSetting; VisusalizeLightingZones();
LightingSetting? ls = mouse.LightingSettingForZone(visibleZone);
if (ls is null) if (ls is null)
{ {
@@ -586,20 +729,24 @@ namespace GHelper
private void VisualizeDPIButtons() private void VisualizeDPIButtons()
{ {
if (mouse.HasDPIColors()) for (int i = 0; i < mouse.DPIProfileCount() && i < 4; ++i)
{ {
for (int i = 0; i < mouse.DPIProfileCount() && i < 4; ++i) AsusMouseDPI dpi = mouse.DpiSettings[i];
if (dpi is null)
{ {
AsusMouseDPI dpi = mouse.DpiSettings[i]; continue;
dpiButtons[i].Image = ControlHelper.TintImage(Properties.Resources.lighting_dot_24, dpi.Color);
dpiButtons[i].Activated = (mouse.DpiProfile - 1) == i;
dpiButtons[i].BorderColor = dpi.Color;
dpiButtons[i].Text = "DPI " + (i + 1) + "\n" + dpi.DPI;
} }
if (mouse.HasDPIColors())
{
dpiButtons[i].Image = ControlHelper.TintImage(Properties.Resources.lighting_dot_24, dpi.Color);
dpiButtons[i].BorderColor = dpi.Color;
}
dpiButtons[i].Activated = (mouse.DpiProfile - 1) == i;
dpiButtons[i].Text = "DPI " + (i + 1) + "\n" + dpi.DPI;
} }
} }
private void VisualizeCurrentDPIProfile() private void VisualizeCurrentDPIProfile()
{ {
AsusMouseDPI dpi = mouse.DpiSettings[mouse.DpiProfile - 1]; AsusMouseDPI dpi = mouse.DpiSettings[mouse.DpiProfile - 1];
@@ -620,11 +767,16 @@ namespace GHelper
} }
Left = Program.settingsForm.Left - Width - 5; Left = Program.settingsForm.Left - Width - 5;
mouse.Disconnect += Mouse_Disconnect;
mouse.BatteryUpdated += Mouse_BatteryUpdated;
mouse.MouseReadyChanged += Mouse_MouseReadyChanged;
} }
private void ButtonSync_Click(object sender, EventArgs e) private void ButtonSync_Click(object sender, EventArgs e)
{ {
RefreshMouseData(); Task task = Task.Run((Action)RefreshMouseData);
} }
} }
} }

View File

@@ -5,47 +5,32 @@ using System.Text;
namespace GHelper namespace GHelper
{ {
[Flags]
public enum AuraDev19b6 : uint public class AuraPower
{ {
BootLogo = 1, public bool BootLogo;
BootKeyb = 1 << 1, public bool BootKeyb;
AwakeLogo = 1 << 2, public bool AwakeLogo;
AwakeKeyb = 1 << 3, public bool AwakeKeyb;
SleepLogo = 1 << 4, public bool SleepLogo;
SleepKeyb = 1 << 5, public bool SleepKeyb;
ShutdownLogo = 1 << 6, public bool ShutdownLogo;
ShutdownKeyb = 1 << 7, public bool ShutdownKeyb;
BootBar = 1 << (7 + 2), public bool BootBar;
AwakeBar = 1 << (7 + 3), public bool AwakeBar;
SleepBar = 1 << (7 + 4), public bool SleepBar;
ShutdownBar = 1 << (7 + 5), public bool ShutdownBar;
BootLid = 1 << (15 + 1), public bool BootLid;
AwakeLid = 1 << (15 + 2), public bool AwakeLid;
SleepLid = 1 << (15 + 3), public bool SleepLid;
ShutdownLid = 1 << (15 + 4), public bool ShutdownLid;
BootRear = 1 << (23 + 1),
AwakeRear = 1 << (23 + 2),
SleepRear = 1 << (23 + 3),
ShutdownRear = 1 << (23 + 4),
}
public static class AuraDev19b6Extensions
{
public static byte[] ToBytes(this AuraDev19b6[] controls)
{
uint a = 0;
foreach (var n in controls)
{
a |= (uint)n;
}
return new byte[] { 0x5d, 0xbd, 0x01, (byte)(a & 0xff), (byte)((a & 0xff00) >> 8), (byte)((a & 0xff0000) >> 16), (byte)((a & 0xff000000) >> 24) };
}
public bool BootRear;
public bool AwakeRear;
public bool SleepRear;
public bool ShutdownRear;
} }
@@ -64,8 +49,8 @@ namespace GHelper
public static readonly byte[] LED_INIT4 = Encoding.ASCII.GetBytes("^ASUS Tech.Inc."); public static readonly byte[] LED_INIT4 = Encoding.ASCII.GetBytes("^ASUS Tech.Inc.");
public static readonly byte[] LED_INIT5 = new byte[] { 0x5e, 0x05, 0x20, 0x31, 0, 0x08 }; public static readonly byte[] LED_INIT5 = new byte[] { 0x5e, 0x05, 0x20, 0x31, 0, 0x08 };
static byte[] MESSAGE_SET = { AURA_HID_ID, 0xb5, 0, 0, 0 };
static byte[] MESSAGE_APPLY = { AURA_HID_ID, 0xb4 }; static byte[] MESSAGE_APPLY = { AURA_HID_ID, 0xb4 };
static byte[] MESSAGE_SET = { AURA_HID_ID, 0xb5, 0, 0, 0 };
static int[] deviceIds = { 0x1a30, 0x1854, 0x1869, 0x1866, 0x19b6, 0x1822, 0x1837, 0x1854, 0x184a, 0x183d, 0x8502, 0x1807, 0x17e0, 0x18c6, 0x1abe }; static int[] deviceIds = { 0x1a30, 0x1854, 0x1869, 0x1866, 0x19b6, 0x1822, 0x1837, 0x1854, 0x184a, 0x183d, 0x8502, 0x1807, 0x17e0, 0x18c6, 0x1abe };
@@ -74,16 +59,65 @@ namespace GHelper
public static Color Color1 = Color.White; public static Color Color1 = Color.White;
public static Color Color2 = Color.Black; public static Color Color2 = Color.Black;
static bool isTuf = AppConfig.ContainsModel("Tuf");
static bool isStrix = AppConfig.ContainsModel("Strix");
static System.Timers.Timer timer = new System.Timers.Timer(1000);
static System.Timers.Timer timer = new System.Timers.Timer(2000);
static HidDevice? auraDevice = null; static HidDevice? auraDevice = null;
static byte[] AuraPowerMessage(AuraPower flags)
{
byte keyb = 0, bar = 0, lid = 0, rear = 0;
if (flags.BootLogo) keyb |= 1 << 0;
if (flags.BootKeyb) keyb |= 1 << 1;
if (flags.AwakeLogo) keyb |= 1 << 2;
if (flags.AwakeKeyb) keyb |= 1 << 3;
if (flags.SleepLogo) keyb |= 1 << 4;
if (flags.SleepKeyb) keyb |= 1 << 5;
if (flags.ShutdownLogo) keyb |= 1 << 6;
if (flags.ShutdownKeyb) keyb |= 1 << 7;
if (flags.BootBar) bar |= 1 << 1;
if (flags.AwakeBar) bar |= 1 << 2;
if (flags.SleepBar) bar |= 1 << 3;
if (flags.ShutdownBar) bar |= 1 << 4;
if (flags.BootLid) lid |= 1 << 0;
if (flags.AwakeLid) lid |= 1 << 1;
if (flags.SleepLid) lid |= 1 << 2;
if (flags.ShutdownLid) lid |= 1 << 3;
if (flags.BootLid) lid |= 1 << 4;
if (flags.AwakeLid) lid |= 1 << 5;
if (flags.SleepLid) lid |= 1 << 6;
if (flags.ShutdownLid) lid |= 1 << 7;
if (flags.BootRear) rear |= 1 << 0;
if (flags.AwakeRear) rear |= 1 << 1;
if (flags.SleepRear) rear |= 1 << 2;
if (flags.ShutdownRear) rear |= 1 << 3;
if (flags.BootRear) rear |= 1 << 4;
if (flags.AwakeRear) rear |= 1 << 5;
if (flags.SleepRear) rear |= 1 << 6;
if (flags.ShutdownRear) rear |= 1 << 7;
return new byte[] { 0x5d, 0xbd, 0x01, keyb, bar, lid, rear, 0xFF };
}
static AsusUSB() static AsusUSB()
{ {
timer.Elapsed += Timer_Elapsed; timer.Elapsed += Timer_Elapsed;
} }
private static void Timer_Elapsed(object? sender, System.Timers.ElapsedEventArgs e) private static void Timer_Elapsed(object? sender, System.Timers.ElapsedEventArgs e)
{
SetHeatmap();
}
static void SetHeatmap(bool init = false)
{ {
float cpuTemp = (float)HardwareControl.GetCPUTemp(); float cpuTemp = (float)HardwareControl.GetCPUTemp();
int freeze = 20, cold = 40, warm = 65, hot = 90; int freeze = 20, cold = 40, warm = 65, hot = 90;
@@ -96,7 +130,7 @@ namespace GHelper
else if (cpuTemp < hot) color = ColorUtilities.GetWeightedAverage(Color.Yellow, Color.Red, ((float)cpuTemp - warm) / (hot - warm)); else if (cpuTemp < hot) color = ColorUtilities.GetWeightedAverage(Color.Yellow, Color.Red, ((float)cpuTemp - warm) / (hot - warm));
else color = Color.Red; else color = Color.Red;
ApplyColor(color); ApplyColor(color, init);
} }
public static Dictionary<int, string> GetSpeeds() public static Dictionary<int, string> GetSpeeds()
@@ -140,7 +174,7 @@ namespace GHelper
public static Dictionary<int, string> GetModes() public static Dictionary<int, string> GetModes()
{ {
if (AppConfig.ContainsModel("TUF")) if (isTuf)
{ {
_modes.Remove(3); _modes.Remove(3);
} }
@@ -184,7 +218,7 @@ namespace GHelper
public static bool HasSecondColor() public static bool HasSecondColor()
{ {
return (mode == 1 && !AppConfig.ContainsModel("TUF")); return (mode == 1 && !isTuf);
} }
public static int Speed public static int Speed
@@ -288,8 +322,7 @@ namespace GHelper
Task.Run(async () => Task.Run(async () =>
{ {
if (AppConfig.ContainsModel("TUF")) if (isTuf) Program.acpi.TUFKeyboardBrightness(brightness);
Program.acpi.TUFKeyboardBrightness(brightness);
byte[] msg = { AURA_HID_ID, 0xba, 0xc5, 0xc4, (byte)brightness }; byte[] msg = { AURA_HID_ID, 0xba, 0xc5, 0xc4, (byte)brightness };
byte[] msgBackup = { INPUT_HID_ID, 0xba, 0xc5, 0xc4, (byte)brightness }; byte[] msgBackup = { INPUT_HID_ID, 0xba, 0xc5, 0xc4, (byte)brightness };
@@ -342,41 +375,40 @@ namespace GHelper
Task.Run(async () => Task.Run(async () =>
{ {
List<AuraDev19b6> flags = new(); AuraPower flags = new();
// Keyboard // Keyboard
if (AppConfig.IsNotFalse("keyboard_awake")) flags.Add(AuraDev19b6.AwakeKeyb); flags.AwakeKeyb = AppConfig.IsNotFalse("keyboard_awake");
if (AppConfig.IsNotFalse("keyboard_boot")) flags.Add(AuraDev19b6.BootKeyb); flags.BootKeyb = AppConfig.IsNotFalse("keyboard_boot");
if (AppConfig.IsNotFalse("keyboard_sleep")) flags.Add(AuraDev19b6.SleepKeyb); flags.SleepKeyb = AppConfig.IsNotFalse("keyboard_sleep");
if (AppConfig.IsNotFalse("keyboard_shutdown")) flags.Add(AuraDev19b6.ShutdownKeyb); flags.ShutdownKeyb = AppConfig.IsNotFalse("keyboard_shutdown");
// Logo // Logo
if (AppConfig.IsNotFalse("keyboard_awake_logo")) flags.Add(AuraDev19b6.AwakeLogo); flags.AwakeLogo = AppConfig.IsNotFalse("keyboard_awake_logo");
if (AppConfig.IsNotFalse("keyboard_boot_logo")) flags.Add(AuraDev19b6.BootLogo); flags.BootLogo = AppConfig.IsNotFalse("keyboard_boot_logo");
if (AppConfig.IsNotFalse("keyboard_sleep_logo")) flags.Add(AuraDev19b6.SleepLogo); flags.SleepLogo = AppConfig.IsNotFalse("keyboard_sleep_logo");
if (AppConfig.IsNotFalse("keyboard_shutdown_logo")) flags.Add(AuraDev19b6.ShutdownLogo); flags.ShutdownLogo = AppConfig.IsNotFalse("keyboard_shutdown_logo");
// Lightbar // Lightbar
if (AppConfig.IsNotFalse("keyboard_awake_bar")) flags.Add(AuraDev19b6.AwakeBar); flags.AwakeBar = AppConfig.IsNotFalse("keyboard_awake_bar");
if (AppConfig.IsNotFalse("keyboard_boot_bar")) flags.Add(AuraDev19b6.BootBar); flags.BootBar = AppConfig.IsNotFalse("keyboard_boot_bar");
if (AppConfig.IsNotFalse("keyboard_sleep_bar")) flags.Add(AuraDev19b6.SleepBar); flags.SleepBar = AppConfig.IsNotFalse("keyboard_sleep_bar");
if (AppConfig.IsNotFalse("keyboard_shutdown_bar")) flags.Add(AuraDev19b6.ShutdownBar); flags.ShutdownBar = AppConfig.IsNotFalse("keyboard_shutdown_bar");
// Lid // Lid
if (AppConfig.IsNotFalse("keyboard_awake_lid")) flags.Add(AuraDev19b6.AwakeLid); flags.AwakeLid = AppConfig.IsNotFalse("keyboard_awake_lid");
if (AppConfig.IsNotFalse("keyboard_boot_lid")) flags.Add(AuraDev19b6.BootLid); flags.BootLid = AppConfig.IsNotFalse("keyboard_boot_lid");
if (AppConfig.IsNotFalse("keyboard_sleep_lid")) flags.Add(AuraDev19b6.SleepLid); flags.SleepLid = AppConfig.IsNotFalse("keyboard_sleep_lid");
if (AppConfig.IsNotFalse("keyboard_shutdown_lid")) flags.Add(AuraDev19b6.ShutdownLid); flags.ShutdownLid = AppConfig.IsNotFalse("keyboard_shutdown_lid");
if (AppConfig.IsNotFalse("keyboard_awake_lid")) flags.Add(AuraDev19b6.AwakeRear);
if (AppConfig.IsNotFalse("keyboard_boot_lid")) flags.Add(AuraDev19b6.BootRear);
if (AppConfig.IsNotFalse("keyboard_sleep_lid")) flags.Add(AuraDev19b6.SleepRear);
if (AppConfig.IsNotFalse("keyboard_shutdown_lid")) flags.Add(AuraDev19b6.ShutdownRear);
byte[] msg = AuraDev19b6Extensions.ToBytes(flags.ToArray());
// Rear Bar
flags.AwakeRear = AppConfig.IsNotFalse("keyboard_awake_lid");
flags.BootRear = AppConfig.IsNotFalse("keyboard_boot_lid");
flags.SleepRear = AppConfig.IsNotFalse("keyboard_sleep_lid");
flags.ShutdownRear = AppConfig.IsNotFalse("keyboard_shutdown_lid");
var devices = GetHidDevices(deviceIds); var devices = GetHidDevices(deviceIds);
byte[] msg = AuraPowerMessage(flags);
foreach (HidDevice device in devices) foreach (HidDevice device in devices)
{ {
@@ -389,12 +421,12 @@ namespace GHelper
device.CloseDevice(); device.CloseDevice();
} }
if (AppConfig.ContainsModel("TUF")) if (isTuf)
Program.acpi.TUFKeyboardPower( Program.acpi.TUFKeyboardPower(
flags.Contains(AuraDev19b6.AwakeKeyb), flags.AwakeKeyb,
flags.Contains(AuraDev19b6.BootKeyb), flags.BootKeyb,
flags.Contains(AuraDev19b6.SleepKeyb), flags.SleepKeyb,
flags.Contains(AuraDev19b6.ShutdownKeyb)); flags.ShutdownKeyb);
}); });
@@ -409,6 +441,7 @@ namespace GHelper
device.OpenDevice(); device.OpenDevice();
if (device.ReadFeatureData(out byte[] data, AURA_HID_ID)) if (device.ReadFeatureData(out byte[] data, AURA_HID_ID))
{ {
Logger.WriteLine("Aura Device:" + device.DevicePath);
auraDevice = device; auraDevice = device;
return; return;
} }
@@ -419,16 +452,43 @@ namespace GHelper
} }
} }
public static void ApplyColor(Color color) public static void ApplyColor(Color color, bool init = false)
{ {
Task.Run(async () =>
if (isTuf)
{ {
if (auraDevice is null || !auraDevice.IsConnected) GetAuraDevice(); Program.acpi.TUFKeyboardRGB(0, color, 0);
if (auraDevice is null || !auraDevice.IsConnected) return; return;
auraDevice.WriteFeatureData(AuraMessage(0, color, color, 0)); }
if (auraDevice is null || !auraDevice.IsConnected) GetAuraDevice();
if (auraDevice is null || !auraDevice.IsConnected) return;
byte[] msg = new byte[40];
int start = 9;
msg[0] = AURA_HID_ID;
msg[1] = 0xbc;
msg[2] = 1;
msg[3] = 1;
msg[4] = 4;
for (int i = 0; i < 10; i++)
{
msg[start + i * 3] = color.R; // R
msg[start + 1 + i * 3] = color.G; // G
msg[start + 2 + i * 3] = color.B; // B
}
//Logger.WriteLine(BitConverter.ToString(msg));
if (init)
{
auraDevice.Write(AuraMessage(0, color, color, 0xe1));
auraDevice.WriteFeatureData(MESSAGE_APPLY);
auraDevice.WriteFeatureData(MESSAGE_SET); auraDevice.WriteFeatureData(MESSAGE_SET);
//auraDevice.WriteFeatureData(MESSAGE_APPLY); auraDevice.Write(new byte[] { AURA_HID_ID, 0xbc });
}); }
auraDevice.Write(msg);
} }
@@ -442,6 +502,7 @@ namespace GHelper
if (Mode == HEATMAP) if (Mode == HEATMAP)
{ {
SetHeatmap(true);
timer.Enabled = true; timer.Enabled = true;
return; return;
} }
@@ -478,8 +539,8 @@ namespace GHelper
if (device.ReadFeatureData(out byte[] data, AURA_HID_ID)) if (device.ReadFeatureData(out byte[] data, AURA_HID_ID))
{ {
device.WriteFeatureData(msg); device.WriteFeatureData(msg);
device.WriteFeatureData(MESSAGE_SET);
device.WriteFeatureData(MESSAGE_APPLY); device.WriteFeatureData(MESSAGE_APPLY);
device.WriteFeatureData(MESSAGE_SET);
Logger.WriteLine("USB-KB " + device.Capabilities.FeatureReportByteLength + "|" + device.Capabilities.InputReportByteLength + device.Description + device.DevicePath + ":" + BitConverter.ToString(msg)); Logger.WriteLine("USB-KB " + device.Capabilities.FeatureReportByteLength + "|" + device.Capabilities.InputReportByteLength + device.Description + device.DevicePath + ":" + BitConverter.ToString(msg));
} }
device.CloseDevice(); device.CloseDevice();
@@ -513,6 +574,15 @@ namespace GHelper
return 0; return 0;
} }
public static void InitXGM()
{
SetXGM(LED_INIT1);
SetXGM(LED_INIT2);
SetXGM(LED_INIT3);
SetXGM(LED_INIT4);
SetXGM(LED_INIT5);
}
public static void ApplyXGMLight(bool status) public static void ApplyXGMLight(bool status)
{ {
SetXGM(new byte[] { 0x5e, 0xc5, status ? (byte)0x50 : (byte)0 }); SetXGM(new byte[] { 0x5e, 0xc5, status ? (byte)0x50 : (byte)0 });
@@ -529,6 +599,8 @@ namespace GHelper
if (AsusACPI.IsInvalidCurve(curve)) return -1; if (AsusACPI.IsInvalidCurve(curve)) return -1;
//InitXGM();
byte[] msg = new byte[19]; byte[] msg = new byte[19];
Array.Copy(new byte[] { 0x5e, 0xd1, 0x01 }, msg, 3); Array.Copy(new byte[] { 0x5e, 0xd1, 0x01 }, msg, 3);
Array.Copy(curve, 0, msg, 3, curve.Length); Array.Copy(curve, 0, msg, 3, curve.Length);

View File

@@ -41,6 +41,8 @@ namespace GHelper.AutoUpdate
async void CheckForUpdatesAsync() async void CheckForUpdatesAsync()
{ {
if (AppConfig.Is("skip_updates")) return;
try try
{ {

View File

@@ -59,7 +59,7 @@ namespace GHelper
InitTheme(true); InitTheme(true);
MinRPM = 18; MinRPM = 18;
MaxRPM = HardwareControl.GetFanMax(); MaxRPM = HardwareControl.fanMax;
labelTip.Visible = false; labelTip.Visible = false;
labelTip.BackColor = Color.Transparent; labelTip.BackColor = Color.Transparent;

View File

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

View File

@@ -304,6 +304,9 @@ namespace GHelper.Gpu
if (AppConfig.IsMode("auto_apply")) if (AppConfig.IsMode("auto_apply"))
AsusUSB.SetXGMFan(AppConfig.GetFanConfig(AsusFan.XGM)); AsusUSB.SetXGMFan(AppConfig.GetFanConfig(AsusFan.XGM));
HardwareControl.RecreateGpuControl();
} }
settings.Invoke(delegate settings.Invoke(delegate

View File

@@ -9,6 +9,10 @@ using System.Management;
public static class HardwareControl public static class HardwareControl
{ {
const int DEFAULT_FAN_MAX = 58;
const int INADEQUATE_MAX = 80;
public static IGpuControl? GpuControl; public static IGpuControl? GpuControl;
public static float? cpuTemp = -1; public static float? cpuTemp = -1;
@@ -26,21 +30,48 @@ public static class HardwareControl
static long lastUpdate; static long lastUpdate;
public static int GetFanMax() static int _fanMax = DEFAULT_FAN_MAX;
{ static bool _fanRpm = false;
int max = 58;
int configMax = AppConfig.Get("fan_max");
if (configMax > 80) configMax = 0; // skipping inadvequate settings
if (AppConfig.ContainsModel("401")) max = 72; public static int fanMax
else if (AppConfig.ContainsModel("503")) max = 68; {
return Math.Max(max, configMax); get
{
return _fanMax;
}
set
{
AppConfig.Set("fan_max", value);
_fanMax = value;
}
} }
public static void SetFanMax(int fan) public static bool fanRpm
{ {
AppConfig.Set("fan_max", fan); get
{
return _fanRpm;
}
set
{
AppConfig.Set("fan_rpm", value ? 1 : 0);
_fanRpm = value;
}
} }
static HardwareControl()
{
_fanMax = AppConfig.Get("fan_max");
if (_fanMax > INADEQUATE_MAX) _fanMax = -1; // skipping inadvequate settings
if (_fanMax < 0 && AppConfig.ContainsModel("401")) _fanMax = 72;
if (_fanMax < 0 && AppConfig.ContainsModel("503")) _fanMax = 68;
if (_fanMax < 0) _fanMax = DEFAULT_FAN_MAX;
_fanRpm = AppConfig.Is("fan_rpm");
}
public static string FormatFan(int fan) public static string FormatFan(int fan)
{ {
// fix for old models // fix for old models
@@ -50,10 +81,9 @@ public static class HardwareControl
if (fan <= 0 || fan > 100) return null; //nothing reasonable if (fan <= 0 || fan > 100) return null; //nothing reasonable
} }
int fanMax = GetFanMax(); if (fan > fanMax && fan <= INADEQUATE_MAX) fanMax = fan;
if (fan > fanMax && fan < 80) SetFanMax(fan);
if (AppConfig.Is("fan_rpm")) if (fanRpm)
return GHelper.Properties.Strings.FanSpeed + ": " + (fan * 100).ToString() + "RPM"; return GHelper.Properties.Strings.FanSpeed + ": " + (fan * 100).ToString() + "RPM";
else else
return GHelper.Properties.Strings.FanSpeed + ": " + Math.Min(Math.Round((float)fan / fanMax * 100), 100).ToString() + "%"; // relatively to 6000 rpm return GHelper.Properties.Strings.FanSpeed + ": " + Math.Min(Math.Round((float)fan / fanMax * 100), 100).ToString() + "%"; // relatively to 6000 rpm
@@ -174,22 +204,12 @@ public static class HardwareControl
public static float? GetCPUTemp() { public static float? GetCPUTemp() {
if (Math.Abs(DateTimeOffset.Now.ToUnixTimeMilliseconds() - lastUpdate) < 1000) return cpuTemp; var last = DateTimeOffset.Now.ToUnixTimeSeconds();
lastUpdate = DateTimeOffset.Now.ToUnixTimeMilliseconds(); if (Math.Abs(last - lastUpdate) < 2) return cpuTemp;
lastUpdate = last;
cpuTemp = Program.acpi.DeviceGet(AsusACPI.Temp_CPU); cpuTemp = Program.acpi.DeviceGet(AsusACPI.Temp_CPU);
//Debug.WriteLine(cpuTemp);
if (cpuTemp < 0) try
{
using (var ct = new PerformanceCounter("Thermal Zone Information", "Temperature", @"\_TZ.THRM", true))
{
cpuTemp = ct.NextValue() - 273;
}
}
catch (Exception ex)
{
Debug.WriteLine("Failed reading CPU temp :" + ex.Message);
}
return cpuTemp; return cpuTemp;
} }

View File

@@ -6,6 +6,13 @@ namespace GHelper.Helpers
{ {
internal class ClamshellModeControl internal class ClamshellModeControl
{ {
public ClamshellModeControl()
{
//Save current setting if hibernate or shutdown to prevent reverting the user set option.
CheckAndSaveLidAction();
}
public bool IsExternalDisplayConnected() public bool IsExternalDisplayConnected()
{ {
var devices = ScreenInterrogatory.GetAllDevices().ToArray(); var devices = ScreenInterrogatory.GetAllDevices().ToArray();
@@ -31,7 +38,7 @@ namespace GHelper.Helpers
public bool IsClamshellEnabled() public bool IsClamshellEnabled()
{ {
return AppConfig.Get("toggle_clamshell_mode") != 0; return AppConfig.Is("toggle_clamshell_mode");
} }
public bool IsChargerConnected() public bool IsChargerConnected()
@@ -62,7 +69,7 @@ namespace GHelper.Helpers
} }
public static void DisableClamshellMode() public static void DisableClamshellMode()
{ {
PowerNative.SetLidAction(1, true); PowerNative.SetLidAction(GetDefaultLidAction(), true);
Logger.WriteLine("Disengaging Clamshell Mode"); Logger.WriteLine("Disengaging Clamshell Mode");
} }
@@ -89,5 +96,43 @@ namespace GHelper.Helpers
if (IsClamshellEnabled()) if (IsClamshellEnabled())
ToggleLidAction(); ToggleLidAction();
} }
private static int CheckAndSaveLidAction()
{
if (AppConfig.Get("clamshell_default_lid_action", -1) != -1)
{
//Seting was alredy set. Do not touch it
return AppConfig.Get("clamshell_default_lid_action", -1);
}
int val = PowerNative.GetLidAction(true);
//If it is 0 then it is likely already set by clamshell mdoe
//If 0 was set by the user, then why do they even use clamshell mode?
//We only care about hibernate or shutdown setting here
if (val == 2 || val == 3)
{
AppConfig.Set("clamshell_default_lid_action", val);
return val;
}
return 1;
}
//Power users can change that setting.
//0 = Do nothing
//1 = Sleep (default)
//2 = Hibernate
//3 = Shutdown
private static int GetDefaultLidAction()
{
int val = AppConfig.Get("clamshell_default_lid_action", 1);
if (val < 0 || val > 3)
{
val = 1;
}
return val;
}
} }
} }

View File

@@ -2,7 +2,6 @@
using GHelper.Helpers; using GHelper.Helpers;
using GHelper.Mode; using GHelper.Mode;
using Microsoft.Win32; using Microsoft.Win32;
using NAudio.CoreAudioApi;
using System.Diagnostics; using System.Diagnostics;
using System.Management; using System.Management;
@@ -153,6 +152,7 @@ namespace GHelper.Input
return AppConfig.ContainsModel("Z13") || return AppConfig.ContainsModel("Z13") ||
AppConfig.ContainsModel("FA506") || AppConfig.ContainsModel("FA506") ||
AppConfig.ContainsModel("FX506") || AppConfig.ContainsModel("FX506") ||
AppConfig.ContainsModel("Duo") ||
AppConfig.ContainsModel("FX505"); AppConfig.ContainsModel("FX505");
} }
@@ -179,7 +179,7 @@ namespace GHelper.Input
} }
} }
if (AppConfig.ContainsModel("Z13")) if (AppConfig.ContainsModel("Z13") || AppConfig.ContainsModel("Duo"))
{ {
switch (e.Key) switch (e.Key)
{ {
@@ -534,7 +534,7 @@ namespace GHelper.Input
AppConfig.Set("screenpad", brightness); AppConfig.Set("screenpad", brightness);
Program.acpi.DeviceSet(AsusACPI.ScreenPadBrightness, (brightness*255/100), "Screenpad"); Program.acpi.DeviceSet(AsusACPI.ScreenPadBrightness, (brightness * 255 / 100), "Screenpad");
if (brightness == 0) Program.acpi.DeviceSet(AsusACPI.ScreenPadToggle, brightness, "ScreenpadToggle"); if (brightness == 0) Program.acpi.DeviceSet(AsusACPI.ScreenPadToggle, brightness, "ScreenpadToggle");
Program.toast.RunToast($"Screen Pad {brightness}", delta > 0 ? ToastIcon.BrightnessUp : ToastIcon.BrightnessDown); Program.toast.RunToast($"Screen Pad {brightness}", delta > 0 ? ToastIcon.BrightnessUp : ToastIcon.BrightnessDown);

View File

@@ -143,7 +143,7 @@ namespace GHelper.Mode
} }
// force set PPTs for missbehaving bios on FX507/517 series // force set PPTs for missbehaving bios on FX507/517 series
if ((AppConfig.ContainsModel("FX507") || AppConfig.ContainsModel("FX517") || xgmFan) && !AppConfig.IsMode("auto_apply_power")) if ((AppConfig.ContainsModel("FX507") || AppConfig.ContainsModel("FX517") || AppConfig.ContainsModel("FX707") || xgmFan) && !AppConfig.IsMode("auto_apply_power"))
{ {
Task.Run(async () => Task.Run(async () =>
{ {

View File

@@ -167,6 +167,28 @@ namespace GHelper.Mode
} }
} }
public static int GetLidAction(bool ac)
{
Guid activeSchemeGuid = GetActiveScheme();
IntPtr activeIndex;
if (ac)
PowerReadACValueIndex(IntPtr.Zero,
activeSchemeGuid,
GUID_SYSTEM_BUTTON_SUBGROUP,
GUID_LIDACTION, out activeIndex);
else
PowerReadDCValueIndex(IntPtr.Zero,
activeSchemeGuid,
GUID_SYSTEM_BUTTON_SUBGROUP,
GUID_LIDACTION, out activeIndex);
return activeIndex.ToInt32();
}
public static void SetLidAction(int action, bool acOnly = false) public static void SetLidAction(int action, bool acOnly = false)
{ {
/** /**

View File

@@ -56,6 +56,15 @@ namespace GHelper.Peripherals.Mouse
BatteryState = 0x6 BatteryState = 0x6
} }
public enum LightingZone
{
Logo = 0x00,
Scrollwheel = 0x01,
Underglow = 0x02,
All = 0x03,
Dock = 0x04,
}
public class LightingSetting public class LightingSetting
{ {
public LightingSetting() public LightingSetting()
@@ -77,11 +86,29 @@ namespace GHelper.Peripherals.Mouse
public AnimationDirection AnimationDirection { get; set; } public AnimationDirection AnimationDirection { get; set; }
public override bool Equals(object? obj)
{
return obj is LightingSetting setting &&
LightingMode == setting.LightingMode &&
Brightness == setting.Brightness &&
RGBColor.Equals(setting.RGBColor) &&
RandomColor == setting.RandomColor &&
AnimationSpeed == setting.AnimationSpeed &&
AnimationDirection == setting.AnimationDirection;
}
public override int GetHashCode()
{
return HashCode.Combine(LightingMode, Brightness, RGBColor, RandomColor, AnimationSpeed, AnimationDirection);
}
public override string? ToString() public override string? ToString()
{ {
return "LightingMode: " + LightingMode + ", Color (" + RGBColor.R + ", " + RGBColor.G + ", " + RGBColor.B return "LightingMode: " + LightingMode + ", Color (" + RGBColor.R + ", " + RGBColor.G + ", " + RGBColor.B
+ "), Brightness: " + Brightness + "%, LightingSpeed: " + AnimationSpeed + ", RandomColor:" + RandomColor + ", AnimationDirection:" + AnimationDirection; + "), Brightness: " + Brightness + "%, LightingSpeed: " + AnimationSpeed + ", RandomColor:" + RandomColor + ", AnimationDirection:" + AnimationDirection;
} }
} }
public class AsusMouseDPI public class AsusMouseDPI
@@ -102,19 +129,36 @@ namespace GHelper.Peripherals.Mouse
public abstract class AsusMouse : Device, IPeripheral public abstract class AsusMouse : Device, IPeripheral
{ {
private static string[] POLLING_RATES = { "125 Hz", "250 Hz", "500 Hz", "1000 Hz", "2000 Hz", "4000 Hz", "8000 Hz", "16000 Hz" }; private static string[] POLLING_RATES = { "125 Hz", "250 Hz", "500 Hz", "1000 Hz", "2000 Hz", "4000 Hz", "8000 Hz", "16000 Hz" };
internal const bool PACKET_LOGGER_ALWAYS_ON = true;
internal const int ASUS_MOUSE_PACKET_SIZE = 65; internal const int ASUS_MOUSE_PACKET_SIZE = 65;
public event EventHandler? Disconnect; public event EventHandler? Disconnect;
public event EventHandler? BatteryUpdated; public event EventHandler? BatteryUpdated;
public event EventHandler? MouseReadyChanged;
private readonly string path; private readonly string path;
public bool IsDeviceReady { get; protected set; } public bool IsDeviceReady { get; protected set; }
private void SetDeviceReady(bool ready)
{
bool notify = false;
if (IsDeviceReady != ready)
{
notify = true;
}
IsDeviceReady = ready;
if (MouseReadyChanged is not null && notify)
{
MouseReadyChanged(this, EventArgs.Empty);
}
}
public bool Wireless { get; protected set; } public bool Wireless { get; protected set; }
public int Battery { get; protected set; } public int Battery { get; protected set; }
public bool Charging { get; protected set; } public bool Charging { get; protected set; }
public LightingSetting? LightingSetting { get; protected set; } public LightingSetting[] LightingSetting { get; protected set; }
public int LowBatteryWarning { get; protected set; } public int LowBatteryWarning { get; protected set; }
public PowerOffSetting PowerOffSetting { get; protected set; } public PowerOffSetting PowerOffSetting { get; protected set; }
public LiftOffDistance LiftOffDistance { get; protected set; } public LiftOffDistance LiftOffDistance { get; protected set; }
@@ -130,6 +174,7 @@ namespace GHelper.Peripherals.Mouse
this.path = path; this.path = path;
this.Wireless = wireless; this.Wireless = wireless;
DpiSettings = new AsusMouseDPI[1]; DpiSettings = new AsusMouseDPI[1];
LightingSetting = new LightingSetting[SupportedLightingZones().Length];
} }
public override bool Equals(object? obj) public override bool Equals(object? obj)
@@ -161,6 +206,7 @@ namespace GHelper.Peripherals.Mouse
public override void Dispose() public override void Dispose()
{ {
Logger.WriteLine(GetDisplayName() + ": Disposing");
HidSharp.DeviceList.Local.Changed -= Device_Changed; HidSharp.DeviceList.Local.Changed -= Device_Changed;
base.Dispose(); base.Dispose();
} }
@@ -193,13 +239,19 @@ namespace GHelper.Peripherals.Mouse
} }
} }
public virtual int USBTimeout()
{
return 300;
}
public override void SetProvider() public override void SetProvider()
{ {
_usbProvider = new WindowsUsbProvider(_vendorId, _productId, path); _usbProvider = new WindowsUsbProvider(_vendorId, _productId, path, USBTimeout());
} }
protected virtual void OnDisconnect() protected virtual void OnDisconnect()
{ {
Logger.WriteLine(GetDisplayName() + ": OnDisconnect()");
if (Disconnect is not null) if (Disconnect is not null)
{ {
Disconnect(this, EventArgs.Empty); Disconnect(this, EventArgs.Empty);
@@ -212,10 +264,25 @@ namespace GHelper.Peripherals.Mouse
return true; return true;
#else #else
return AppConfig.Get("usb_packet_logger") == 1; return AppConfig.Get("usb_packet_logger") == 1 || PACKET_LOGGER_ALWAYS_ON;
#endif #endif
} }
protected virtual bool IsMouseError(byte[] packet)
{
return packet[1] == 0xFF && packet[2] == 0xAA;
}
protected virtual long MeasuredIO(Action<byte[]> ioFunc, byte[] param)
{
var watch = System.Diagnostics.Stopwatch.StartNew();
ioFunc(param);
watch.Stop();
return watch.ElapsedMilliseconds;
}
[MethodImpl(MethodImplOptions.Synchronized)] [MethodImpl(MethodImplOptions.Synchronized)]
protected virtual byte[]? WriteForResponse(byte[] packet) protected virtual byte[]? WriteForResponse(byte[] packet)
{ {
@@ -226,12 +293,31 @@ namespace GHelper.Peripherals.Mouse
if (IsPacketLoggerEnabled()) if (IsPacketLoggerEnabled())
Logger.WriteLine(GetDisplayName() + ": Sending packet: " + ByteArrayToString(packet)); Logger.WriteLine(GetDisplayName() + ": Sending packet: " + ByteArrayToString(packet));
Write(packet); long time = MeasuredIO(Write, packet);
Logger.WriteLine(GetDisplayName() + ": Write took " + time + "ms");
Read(response); time = MeasuredIO(Read, response);
Logger.WriteLine(GetDisplayName() + ": Read took " + time + "ms");
if (IsPacketLoggerEnabled()) if (IsPacketLoggerEnabled())
Logger.WriteLine(GetDisplayName() + ": Read packet: " + ByteArrayToString(response)); Logger.WriteLine(GetDisplayName() + ": Read packet: " + ByteArrayToString(response));
if (IsMouseError(response))
{
Logger.WriteLine(GetDisplayName() + ": Mouse returned error (FF AA). Packet probably not supported by mouse firmware.");
//Error. Mouse could not understand or process the sent packet
return response;
}
//Not the response we were looking for, continue reading
while (response[0] != packet[0] || response[1] != packet[1] || response[2] != packet[2])
{
Logger.WriteLine(GetDisplayName() + ": Read wrong packet left in buffer: " + ByteArrayToString(response) + ". Retrying...");
//Read again
time = MeasuredIO(Read, response);
Logger.WriteLine(GetDisplayName() + ": Read took " + time + "ms");
}
} }
catch (IOException e) catch (IOException e)
{ {
@@ -239,12 +325,12 @@ namespace GHelper.Peripherals.Mouse
OnDisconnect(); OnDisconnect();
return null; return null;
} }
catch (System.TimeoutException e) catch (TimeoutException e)
{ {
Logger.WriteLine(GetDisplayName() + ": Timeout reading packet " + e.Message); Logger.WriteLine(GetDisplayName() + ": Timeout reading packet " + e.Message);
return null; return null;
} }
catch (System.ObjectDisposedException e) catch (ObjectDisposedException)
{ {
Logger.WriteLine(GetDisplayName() + ": Channel closed "); Logger.WriteLine(GetDisplayName() + ": Channel closed ");
OnDisconnect(); OnDisconnect();
@@ -269,16 +355,16 @@ namespace GHelper.Peripherals.Mouse
{ {
//Likely only the dongle connected and the mouse is either sleeping or turned off. //Likely only the dongle connected and the mouse is either sleeping or turned off.
//The mouse will not respond with proper data, but empty responses at this point //The mouse will not respond with proper data, but empty responses at this point
IsDeviceReady = false; SetDeviceReady(false);
return; return;
} }
IsDeviceReady = true; SetDeviceReady(true);
ReadProfile(); ReadProfile();
ReadDPI(); ReadDPI();
ReadLightingSetting();
ReadLiftOffDistance();
ReadPollingRate(); ReadPollingRate();
ReadLiftOffDistance();
ReadLightingSetting();
} }
// ------------------------------------------------------------------------------ // ------------------------------------------------------------------------------
@@ -378,7 +464,13 @@ namespace GHelper.Peripherals.Mouse
Charging = ParseChargingState(response); Charging = ParseChargingState(response);
//If the device goes to standby it will not report battery state anymore. //If the device goes to standby it will not report battery state anymore.
IsDeviceReady = Battery > 0; SetDeviceReady(Battery > 0);
if (!IsDeviceReady)
{
Logger.WriteLine(GetDisplayName() + ": Device gone");
return;
}
Logger.WriteLine(GetDisplayName() + ": Got Battery Percentage " + Battery + "% - Charging:" + Charging); Logger.WriteLine(GetDisplayName() + ": Got Battery Percentage " + Battery + "% - Charging:" + Charging);
@@ -400,7 +492,9 @@ namespace GHelper.Peripherals.Mouse
if (HasLowBatteryWarning() || HasAutoPowerOff()) if (HasLowBatteryWarning() || HasAutoPowerOff())
{ {
Logger.WriteLine(GetDisplayName() + ": Got Auto Power Off: " + PowerOffSetting + " - Low Battery Warnning at: " + LowBatteryWarning + "%"); string pos = HasAutoPowerOff() ? PowerOffSetting.ToString() : "Not Supported";
string lbw = HasLowBatteryWarning() ? LowBatteryWarning.ToString() : "Not Supported";
Logger.WriteLine(GetDisplayName() + ": Got Auto Power Off: " + pos + " - Low Battery Warnning at: " + lbw + "%");
} }
} }
@@ -668,6 +762,11 @@ namespace GHelper.Peripherals.Mouse
return false; return false;
} }
public virtual int DPIIncrements()
{
return 50;
}
public virtual bool CanChangeDPIProfile() public virtual bool CanChangeDPIProfile()
{ {
return DPIProfileCount() > 1; return DPIProfileCount() > 1;
@@ -682,13 +781,23 @@ namespace GHelper.Peripherals.Mouse
return 100; return 100;
} }
public virtual bool HasXYDPI()
{
return false;
}
protected virtual byte[] GetChangeDPIProfilePacket(int profile) protected virtual byte[] GetChangeDPIProfilePacket(int profile)
{
return new byte[] { 0x00, 0x51, 0x31, 0x0A, 0x00, (byte)profile };
}
protected virtual byte[] GetChangeDPIProfilePacket2(int profile)
{ {
return new byte[] { 0x00, 0x51, 0x31, 0x09, 0x00, (byte)profile }; return new byte[] { 0x00, 0x51, 0x31, 0x09, 0x00, (byte)profile };
} }
//profiles start to count at 1 //profiles start to count at 1
public void SetDPIProfile(int profile) public virtual void SetDPIProfile(int profile)
{ {
if (!CanChangeDPIProfile()) if (!CanChangeDPIProfile())
{ {
@@ -703,6 +812,8 @@ namespace GHelper.Peripherals.Mouse
//The first DPI profile is 1 //The first DPI profile is 1
WriteForResponse(GetChangeDPIProfilePacket(profile)); WriteForResponse(GetChangeDPIProfilePacket(profile));
//For whatever reason that is required or the mouse will not store the change and reverts once you power it off.
WriteForResponse(GetChangeDPIProfilePacket2(profile));
FlushSettings(); FlushSettings();
Logger.WriteLine(GetDisplayName() + ": DPI Profile set to " + profile); Logger.WriteLine(GetDisplayName() + ": DPI Profile set to " + profile);
@@ -711,6 +822,11 @@ namespace GHelper.Peripherals.Mouse
protected virtual byte[] GetReadDPIPacket() protected virtual byte[] GetReadDPIPacket()
{ {
if (!HasXYDPI())
{
return new byte[] { 0x00, 0x12, 0x04, 0x00 };
}
return new byte[] { 0x00, 0x12, 0x04, 0x02 }; return new byte[] { 0x00, 0x12, 0x04, 0x02 };
} }
@@ -724,7 +840,7 @@ namespace GHelper.Peripherals.Mouse
{ {
return null; return null;
} }
ushort dpiEncoded = (ushort)((dpi.DPI - 50) / 50); ushort dpiEncoded = (ushort)((dpi.DPI - DPIIncrements()) / DPIIncrements());
if (HasDPIColors()) if (HasDPIColors())
{ {
@@ -739,7 +855,7 @@ namespace GHelper.Peripherals.Mouse
protected virtual void ParseDPI(byte[] packet) protected virtual void ParseDPI(byte[] packet)
{ {
if (packet[1] != 0x12 || packet[2] != 0x04 || packet[3] != 0x02) if (packet[1] != 0x12 || packet[2] != 0x04 || (packet[3] != 0x02 && HasXYDPI()))
{ {
return; return;
} }
@@ -751,12 +867,13 @@ namespace GHelper.Peripherals.Mouse
DpiSettings[i] = new AsusMouseDPI(); DpiSettings[i] = new AsusMouseDPI();
} }
int offset = 5 + (i * 4); int offset = HasXYDPI() ? (5 + (i * 4)) : (5 + (i * 2));
uint b1 = packet[offset]; uint b1 = packet[offset];
uint b2 = packet[offset + 1]; uint b2 = packet[offset + 1];
DpiSettings[i].DPI = (uint)(b2 << 8 | b1) * 50 + 50; DpiSettings[i].DPI = (uint)((b2 << 8 | b1) * DPIIncrements() + DPIIncrements());
} }
} }
@@ -897,6 +1014,11 @@ namespace GHelper.Peripherals.Mouse
return false; return false;
} }
public virtual int MaxBrightness()
{
return 100;
}
//Override to remap lighting mode IDs. //Override to remap lighting mode IDs.
//From OpenRGB code it looks like some mice have different orders of the modes or do not support some modes at all. //From OpenRGB code it looks like some mice have different orders of the modes or do not support some modes at all.
protected virtual byte IndexForLightingMode(LightingMode lightingMode) protected virtual byte IndexForLightingMode(LightingMode lightingMode)
@@ -944,31 +1066,97 @@ namespace GHelper.Peripherals.Mouse
|| lightingMode == LightingMode.React; || lightingMode == LightingMode.React;
} }
protected virtual byte[] GetReadLightingModePacket() public virtual LightingZone[] SupportedLightingZones()
{ {
return new byte[] { 0x00, 0x12, 0x03 }; return new LightingZone[] { };
} }
protected virtual byte[] GetUpdateLightingModePacket(LightingSetting lightingSetting) public virtual int IndexForZone(LightingZone zone)
{ {
if (lightingSetting.Brightness < 0 || lightingSetting.Brightness > 100) LightingZone[] lz = SupportedLightingZones();
for (int i = 0; i < lz.Length; ++i)
{ {
Logger.WriteLine(GetDisplayName() + ": Brightness " + lightingSetting.Brightness + " is out of range [0;100]. Setting to 25."); if (lz[i] == zone)
lightingSetting.Brightness = 25; {
return i;
}
}
return 0;
}
public virtual bool IsLightingZoned()
{
//Check whether all zones are the same or not
for (int i = 1; i < LightingSetting.Length; ++i)
{
if (LightingSetting[i] is null
|| LightingSetting[i - 1] is null
|| !LightingSetting[i].Equals(LightingSetting[i - 1]))
{
return true;
}
}
return false;
}
public virtual bool IsLightingModeSupportedForZone(LightingMode lm, LightingZone lz)
{
if (lz == LightingZone.All)
{
return true;
}
return lm == LightingMode.Static
|| lm == LightingMode.Breathing
|| lm == LightingMode.ColorCycle
|| lm == LightingMode.React;
}
public virtual LightingSetting LightingSettingForZone(LightingZone zone)
{
if (zone == LightingZone.All)
{
//First zone is treated as ALL for reading purpose
return LightingSetting[0];
}
return LightingSetting[IndexForZone(zone)];
}
protected virtual byte[] GetReadLightingModePacket(LightingZone zone)
{
int idx = 0;
if (zone != LightingZone.All)
{
idx = IndexForZone(zone);
}
return new byte[] { 0x00, 0x12, 0x03, (byte)idx };
}
protected virtual byte[] GetUpdateLightingModePacket(LightingSetting lightingSetting, LightingZone zone)
{
if (lightingSetting.Brightness < 0 || lightingSetting.Brightness > MaxBrightness())
{
Logger.WriteLine(GetDisplayName() + ": Brightness " + lightingSetting.Brightness
+ " is out of range [0;" + MaxBrightness() + "]. Setting to " + (MaxBrightness() / 4) + " .");
lightingSetting.Brightness = MaxBrightness() / 4; // set t0 25% of max brightness
} }
if (!IsLightingModeSupported(lightingSetting.LightingMode)) if (!IsLightingModeSupported(lightingSetting.LightingMode))
{ {
Logger.WriteLine(GetDisplayName() + ": Lighting Mode " + lightingSetting.LightingMode + " is not supported. Setting to Rainbow ;)"); Logger.WriteLine(GetDisplayName() + ": Lighting Mode " + lightingSetting.LightingMode + " is not supported. Setting to Color Cycle ;)");
lightingSetting.LightingMode = LightingMode.Rainbow; lightingSetting.LightingMode = LightingMode.ColorCycle;
} }
return new byte[] { 0x00, 0x51, 0x28, 0x03, 0x00, return new byte[] { 0x00, 0x51, 0x28, (byte)zone, 0x00,
IndexForLightingMode(lightingSetting.LightingMode), IndexForLightingMode(lightingSetting.LightingMode),
(byte)lightingSetting.Brightness, (byte)lightingSetting.Brightness,
lightingSetting.RGBColor.R, lightingSetting.RGBColor.G, lightingSetting.RGBColor.B, lightingSetting.RGBColor.R, lightingSetting.RGBColor.G, lightingSetting.RGBColor.B,
(byte)lightingSetting.AnimationDirection, (byte)(SupportsAnimationDirection(lightingSetting.LightingMode) ? lightingSetting.AnimationDirection : 0x00),
(byte)(lightingSetting.RandomColor ? 0x01: 0x00), (byte)((lightingSetting.RandomColor && SupportsRandomColor(lightingSetting.LightingMode)) ? 0x01: 0x00),
(byte)lightingSetting.AnimationSpeed (byte)(SupportsAnimationSpeed(lightingSetting.LightingMode) ? lightingSetting.AnimationSpeed : 0x00)
}; };
} }
@@ -985,11 +1173,18 @@ namespace GHelper.Peripherals.Mouse
setting.Brightness = packet[6]; setting.Brightness = packet[6];
setting.RGBColor = Color.FromArgb(packet[7], packet[8], packet[9]); setting.RGBColor = Color.FromArgb(packet[7], packet[8], packet[9]);
setting.AnimationDirection = (AnimationDirection)packet[11];
setting.RandomColor = packet[12] == 0x01;
setting.AnimationSpeed = (AnimationSpeed)packet[13];
//If the mouse reports 0, which it does when the current setting has no speed option, chose medium as default
setting.AnimationDirection = SupportsAnimationDirection(setting.LightingMode)
? (AnimationDirection)packet[11]
: AnimationDirection.Clockwise;
setting.RandomColor = SupportsRandomColor(setting.LightingMode) && packet[12] == 0x01;
setting.AnimationSpeed = SupportsAnimationSpeed(setting.LightingMode)
? (AnimationSpeed)packet[13]
: 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 if (setting.AnimationSpeed != AnimationSpeed.Fast
&& setting.AnimationSpeed != AnimationSpeed.Medium && setting.AnimationSpeed != AnimationSpeed.Medium
&& setting.AnimationSpeed != AnimationSpeed.Slow) && setting.AnimationSpeed != AnimationSpeed.Slow)
@@ -1006,33 +1201,47 @@ namespace GHelper.Peripherals.Mouse
{ {
return; return;
} }
byte[]? response = WriteForResponse(GetReadLightingModePacket());
if (response is null) return;
LightingSetting = ParseLightingSetting(response); LightingZone[] lz = SupportedLightingZones();
for (int i = 0; i < lz.Length; ++i)
{
byte[]? response = WriteForResponse(GetReadLightingModePacket(lz[i]));
if (response is null) return;
if (LightingSetting is not null) LightingSetting? ls = ParseLightingSetting(response);
{ if (ls is null)
Logger.WriteLine(GetDisplayName() + ": Read RGB Setting" + LightingSetting.ToString()); {
} Logger.WriteLine(GetDisplayName() + ": Failed to read RGB Setting for Zone " + lz[i].ToString());
else continue;
{ }
Logger.WriteLine(GetDisplayName() + ": Failed to read RGB Setting");
Logger.WriteLine(GetDisplayName() + ": Read RGB Setting for Zone " + lz[i].ToString() + ": " + ls.ToString());
LightingSetting[i] = ls;
} }
} }
public void SetLightingSetting(LightingSetting lightingSetting) public void SetLightingSetting(LightingSetting lightingSetting, LightingZone zone)
{ {
if (!HasRGB() || lightingSetting is null) if (!HasRGB() || lightingSetting is null)
{ {
return; return;
} }
WriteForResponse(GetUpdateLightingModePacket(lightingSetting)); WriteForResponse(GetUpdateLightingModePacket(lightingSetting, zone));
FlushSettings(); FlushSettings();
Logger.WriteLine(GetDisplayName() + ": Set RGB Setting " + lightingSetting.ToString()); Logger.WriteLine(GetDisplayName() + ": Set RGB Setting for zone " + zone.ToString() + ": " + lightingSetting.ToString());
this.LightingSetting = lightingSetting; if (zone == LightingZone.All)
{
for (int i = 0; i < this.LightingSetting.Length; ++i)
{
this.LightingSetting[i] = lightingSetting;
}
}
else
{
this.LightingSetting[IndexForZone(zone)] = lightingSetting;
}
} }
protected virtual byte[] GetSaveProfilePacket() protected virtual byte[] GetSaveProfilePacket()

View File

@@ -45,6 +45,11 @@ namespace GHelper.Peripherals.Mouse.Models
return 36_000; return 36_000;
} }
public override bool HasXYDPI()
{
return true;
}
public override bool HasLiftOffSetting() public override bool HasLiftOffSetting()
{ {
return true; return true;
@@ -55,6 +60,11 @@ namespace GHelper.Peripherals.Mouse.Models
return true; return true;
} }
public override LightingZone[] SupportedLightingZones()
{
return new LightingZone[] { LightingZone.Logo, LightingZone.Scrollwheel, LightingZone.Underglow };
}
public override bool HasAutoPowerOff() public override bool HasAutoPowerOff()
{ {
return true; return true;

View File

@@ -1,12 +1,12 @@
namespace GHelper.Peripherals.Mouse.Models namespace GHelper.Peripherals.Mouse.Models
{ {
public class GladiusIII : AsusMouse public class GladiusIIIAimpoint : AsusMouse
{ {
public GladiusIII() : base(0x0B05, 0x1A70, "mi_00", true) public GladiusIIIAimpoint() : base(0x0B05, 0x1A70, "mi_00", true)
{ {
} }
protected GladiusIII(ushort vendorId, bool wireless) : base(0x0B05, vendorId, "mi_00", wireless) protected GladiusIIIAimpoint(ushort vendorId, bool wireless) : base(0x0B05, vendorId, "mi_00", wireless)
{ {
} }
@@ -40,6 +40,11 @@
return 36_000; return 36_000;
} }
public override bool HasXYDPI()
{
return true;
}
public override bool HasLiftOffSetting() public override bool HasLiftOffSetting()
{ {
return true; return true;
@@ -50,6 +55,11 @@
return true; return true;
} }
public override LightingZone[] SupportedLightingZones()
{
return new LightingZone[] { LightingZone.Logo, LightingZone.Scrollwheel, LightingZone.Underglow };
}
public override bool HasAutoPowerOff() public override bool HasAutoPowerOff()
{ {
return true; return true;
@@ -76,9 +86,9 @@
} }
} }
public class GladiusIIIWired : GladiusIII public class GladiusIIIAimpointWired : GladiusIIIAimpoint
{ {
public GladiusIIIWired() : base(0x1A72, false) public GladiusIIIAimpointWired() : base(0x1A72, false)
{ {
} }

View File

@@ -0,0 +1,169 @@
namespace GHelper.Peripherals.Mouse.Models
{
//P513
public class ROGKerisWireless : AsusMouse
{
public ROGKerisWireless() : base(0x0B05, 0x1960, "mi_00", true)
{
}
protected ROGKerisWireless(ushort vendorId, bool wireless) : base(0x0B05, vendorId, "mi_00", wireless)
{
}
public override int DPIProfileCount()
{
return 4;
}
public override string GetDisplayName()
{
return "ROG Keris (Wireless)";
}
public override PollingRate[] SupportedPollingrates()
{
return new PollingRate[] {
PollingRate.PR125Hz,
PollingRate.PR250Hz,
PollingRate.PR500Hz,
PollingRate.PR1000Hz
};
}
public override int ProfileCount()
{
return 3;
}
public override int MaxDPI()
{
return 16_000;
}
public override bool HasLiftOffSetting()
{
return true;
}
public override bool HasRGB()
{
return true;
}
public override bool HasAutoPowerOff()
{
return true;
}
public override bool HasAngleSnapping()
{
return true;
}
public override bool HasAngleTuning()
{
return false;
}
public override bool HasLowBatteryWarning()
{
return true;
}
public override bool HasDPIColors()
{
return false;
}
public override bool IsLightingModeSupported(LightingMode lightingMode)
{
return lightingMode == LightingMode.Static
|| lightingMode == LightingMode.Breathing
|| lightingMode == LightingMode.ColorCycle
|| lightingMode == LightingMode.React
|| lightingMode == LightingMode.BatteryState
|| lightingMode == LightingMode.Off;
}
//Has 25% increments
protected override int ParseBattery(byte[] packet)
{
if (packet[1] == 0x12 && packet[2] == 0x07)
{
return packet[5] * 25;
}
return -1;
}
public override int DPIIncrements()
{
return 100;
}
public override bool CanChangeDPIProfile()
{
return false;
}
protected override byte[] GetUpdateEnergySettingsPacket(int lowBatteryWarning, PowerOffSetting powerOff)
{
return base.GetUpdateEnergySettingsPacket(lowBatteryWarning / 25, powerOff);
}
protected override int ParseLowBatteryWarning(byte[] packet)
{
int lowBat = base.ParseLowBatteryWarning(packet);
return lowBat * 25;
}
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) };
}
public override LightingZone[] SupportedLightingZones()
{
return new LightingZone[] { LightingZone.Logo, LightingZone.Scrollwheel };
}
public override int MaxBrightness()
{
return 4;
}
protected override byte IndexForLightingMode(LightingMode lightingMode)
{
if (lightingMode == LightingMode.Off)
{
return 0xFF;
}
return ((byte)lightingMode);
}
}
public class ROGKerisWirelessWired : ROGKerisWireless
{
public ROGKerisWirelessWired() : base(0x195E, false)
{
}
public override string GetDisplayName()
{
return "ROG Keris (Wired)";
}
}
}

View File

@@ -0,0 +1,80 @@
namespace GHelper.Peripherals.Mouse.Models
{
//P306_Wireless
public class TUFM4Wirelss : AsusMouse
{
public TUFM4Wirelss() : base(0x0B05, 0x19F4, "mi_00", true)
{
}
public override int DPIProfileCount()
{
return 4;
}
public override string GetDisplayName()
{
return "TUF GAMING M4 (Wireless)";
}
public override PollingRate[] SupportedPollingrates()
{
return new PollingRate[] {
PollingRate.PR125Hz,
PollingRate.PR250Hz,
PollingRate.PR500Hz,
PollingRate.PR1000Hz
};
}
public override int ProfileCount()
{
return 3;
}
public override int MaxDPI()
{
return 12_000;
}
public override bool HasLiftOffSetting()
{
return false;
}
public override bool HasAutoPowerOff()
{
return true;
}
public override bool HasAngleSnapping()
{
return true;
}
public override bool HasAngleTuning()
{
return false;
}
public override bool HasLowBatteryWarning()
{
return true;
}
public override bool HasDPIColors()
{
return false;
}
public override int DPIIncrements()
{
return 100;
}
public override bool CanChangeDPIProfile()
{
return true;
}
}
}

View File

@@ -6,15 +6,33 @@ namespace GHelper.Peripherals
{ {
public class PeripheralsProvider public class PeripheralsProvider
{ {
public static object _LOCK = new object(); private static readonly object _LOCK = new object();
public static List<AsusMouse> ConnectedMice = new List<AsusMouse>(); public static List<AsusMouse> ConnectedMice = new List<AsusMouse>();
public static event EventHandler? DeviceChanged; public static event EventHandler? DeviceChanged;
private static System.Timers.Timer timer = new System.Timers.Timer(1000);
static PeripheralsProvider()
{
timer.Elapsed += DeviceTimer_Elapsed;
}
private static long lastRefresh;
public static bool IsMouseConnected() public static bool IsMouseConnected()
{ {
return ConnectedMice.Count > 0; lock (_LOCK)
{
return ConnectedMice.Count > 0;
}
}
public static bool IsDeviceConnected(IPeripheral peripheral)
{
return AllPeripherals().Contains(peripheral);
} }
//Expand if keyboards or other device get supported later. //Expand if keyboards or other device get supported later.
@@ -26,84 +44,111 @@ namespace GHelper.Peripherals
public static List<IPeripheral> AllPeripherals() public static List<IPeripheral> AllPeripherals()
{ {
List<IPeripheral> l = new List<IPeripheral>(); List<IPeripheral> l = new List<IPeripheral>();
l.AddRange(ConnectedMice); lock (_LOCK)
{
l.AddRange(ConnectedMice);
}
return l; return l;
} }
public static void RefreshBatteryForAllDevices() public static void RefreshBatteryForAllDevices()
{ {
lock (_LOCK) RefreshBatteryForAllDevices(false);
}
public static void RefreshBatteryForAllDevices(bool force)
{
//Polling the battery every 20s should be enough
if (!force && Math.Abs(DateTimeOffset.Now.ToUnixTimeMilliseconds() - lastRefresh) < 20_000) return;
lastRefresh = DateTimeOffset.Now.ToUnixTimeMilliseconds();
List<IPeripheral> l = AllPeripherals();
foreach (IPeripheral m in l)
{ {
foreach (IPeripheral m in AllPeripherals()) if (!m.IsDeviceReady)
{ {
if (!m.IsDeviceReady) //Try to sync the device if that hasn't been done yet
{ m.SynchronizeDevice();
//Try to sync the device if that hasn't been done yet }
m.SynchronizeDevice(); else
} {
else m.ReadBattery();
{
m.ReadBattery();
}
} }
} }
} }
public static void Disconnect(AsusMouse am) public static void Disconnect(AsusMouse am)
{ {
lock (_LOCK) lock (_LOCK)
{ {
am.Disconnect -= Mouse_Disconnect;
am.MouseReadyChanged -= MouseReadyChanged;
am.BatteryUpdated -= BatteryUpdated;
ConnectedMice.Remove(am); ConnectedMice.Remove(am);
if (DeviceChanged is not null) }
{ if (DeviceChanged is not null)
DeviceChanged(am, EventArgs.Empty); {
} DeviceChanged(am, EventArgs.Empty);
} }
} }
public static void Connect(AsusMouse am) public static void Connect(AsusMouse am)
{ {
if (IsDeviceConnected(am))
{
//Mouse already connected;
return;
}
try
{
am.Connect();
}
catch (IOException e)
{
Logger.WriteLine(am.GetDisplayName() + " failed to connect to device: " + e);
return;
}
//The Mouse might needs a few ms to register all its subdevices or the sync will fail.
//Retry 3 times. Do not call this on main thread! It would block the UI
int tries = 0;
while (!am.IsDeviceReady && tries < 3)
{
Thread.Sleep(250);
Logger.WriteLine(am.GetDisplayName() + " synchronising. Try " + (tries + 1));
am.SynchronizeDevice();
++tries;
}
lock (_LOCK) lock (_LOCK)
{ {
if (ConnectedMice.Contains(am))
{
//Mouse already connected;
return;
}
try
{
am.Connect();
}
catch (IOException e)
{
Logger.WriteLine(am.GetDisplayName() + " failed to connect to device: " + e);
return;
}
am.Disconnect += Mouse_Disconnect;
//The Mouse might needs a few ms to register all its subdevices or the sync will fail.
//Retry 3 times. Do not call this on main thread! It would block the UI
int tries = 0;
while (!am.IsDeviceReady && tries < 3)
{
Thread.Sleep(250);
Logger.WriteLine(am.GetDisplayName() + " synchronising. Try " + (tries + 1));
am.SynchronizeDevice();
++tries;
}
ConnectedMice.Add(am); ConnectedMice.Add(am);
Logger.WriteLine(am.GetDisplayName() + " added to the list: " + ConnectedMice.Count + " device are conneted.");
if (DeviceChanged is not null)
{
DeviceChanged(am, EventArgs.Empty);
}
UpdateSettingsView();
} }
Logger.WriteLine(am.GetDisplayName() + " added to the list: " + ConnectedMice.Count + " device are conneted.");
am.Disconnect += Mouse_Disconnect;
am.MouseReadyChanged += MouseReadyChanged;
am.BatteryUpdated += BatteryUpdated;
if (DeviceChanged is not null)
{
DeviceChanged(am, EventArgs.Empty);
}
UpdateSettingsView();
}
private static void BatteryUpdated(object? sender, EventArgs e)
{
UpdateSettingsView();
}
private static void MouseReadyChanged(object? sender, EventArgs e)
{
UpdateSettingsView();
} }
private static void Mouse_Disconnect(object? sender, EventArgs e) private static void Mouse_Disconnect(object? sender, EventArgs e)
@@ -112,14 +157,17 @@ namespace GHelper.Peripherals
{ {
return; return;
} }
AsusMouse am = (AsusMouse)sender;
lock (_LOCK) lock (_LOCK)
{ {
AsusMouse am = (AsusMouse)sender;
ConnectedMice.Remove(am); ConnectedMice.Remove(am);
Logger.WriteLine(am.GetDisplayName() + " reported disconnect. " + ConnectedMice.Count + " device are conneted.");
am.Dispose();
UpdateSettingsView();
} }
Logger.WriteLine(am.GetDisplayName() + " reported disconnect. " + ConnectedMice.Count + " device are conneted.");
am.Dispose();
UpdateSettingsView();
} }
@@ -137,13 +185,16 @@ namespace GHelper.Peripherals
//Add one line for every supported mouse class here to support them. //Add one line for every supported mouse class here to support them.
DetectMouse(new ChakramX()); DetectMouse(new ChakramX());
DetectMouse(new ChakramXWired()); DetectMouse(new ChakramXWired());
DetectMouse(new GladiusIII()); DetectMouse(new GladiusIIIAimpoint());
DetectMouse(new GladiusIIIWired()); DetectMouse(new GladiusIIIAimpointWired());
DetectMouse(new ROGKerisWireless());
DetectMouse(new ROGKerisWirelessWired());
DetectMouse(new TUFM4Wirelss());
} }
public static void DetectMouse(AsusMouse am) public static void DetectMouse(AsusMouse am)
{ {
if (am.IsDeviceConnected() && !ConnectedMice.Contains(am)) if (am.IsDeviceConnected() && !IsDeviceConnected(am))
{ {
Logger.WriteLine("Detected a new" + am.GetDisplayName() + " . Connecting..."); Logger.WriteLine("Detected a new" + am.GetDisplayName() + " . Connecting...");
Connect(am); Connect(am);
@@ -162,8 +213,14 @@ namespace GHelper.Peripherals
private static void Device_Changed(object? sender, HidSharp.DeviceListChangedEventArgs e) private static void Device_Changed(object? sender, HidSharp.DeviceListChangedEventArgs e)
{ {
timer.Start();
}
private static void DeviceTimer_Elapsed(object? sender, System.Timers.ElapsedEventArgs e)
{
timer.Stop();
Logger.WriteLine("HID Device Event: Checking for new ASUS Mice"); Logger.WriteLine("HID Device Event: Checking for new ASUS Mice");
Task task = Task.Run((Action)DetectAllAsusMice); DetectAllAsusMice();
} }
} }
} }

View File

@@ -258,6 +258,15 @@ namespace GHelper.Properties {
} }
} }
/// <summary>
/// Looks up a localized string similar to Lighting Mode.
/// </summary>
internal static string AuraLightingMode {
get {
return ResourceManager.GetString("AuraLightingMode", resourceCulture);
}
}
/// <summary> /// <summary>
/// Looks up a localized string similar to Normal. /// Looks up a localized string similar to Normal.
/// </summary> /// </summary>
@@ -321,6 +330,51 @@ namespace GHelper.Properties {
} }
} }
/// <summary>
/// Looks up a localized string similar to All.
/// </summary>
internal static string AuraZoneAll {
get {
return ResourceManager.GetString("AuraZoneAll", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Dock.
/// </summary>
internal static string AuraZoneDock {
get {
return ResourceManager.GetString("AuraZoneDock", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Logo.
/// </summary>
internal static string AuraZoneLogo {
get {
return ResourceManager.GetString("AuraZoneLogo", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Scrollwheel.
/// </summary>
internal static string AuraZoneScroll {
get {
return ResourceManager.GetString("AuraZoneScroll", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Underglow.
/// </summary>
internal static string AuraZoneUnderglow {
get {
return ResourceManager.GetString("AuraZoneUnderglow", resourceCulture);
}
}
/// <summary> /// <summary>
/// Looks up a localized string similar to Auto Apply. /// Looks up a localized string similar to Auto Apply.
/// </summary> /// </summary>

View File

@@ -183,6 +183,9 @@
<data name="AuraFast" xml:space="preserve"> <data name="AuraFast" xml:space="preserve">
<value>Schnell</value> <value>Schnell</value>
</data> </data>
<data name="AuraLightingMode" xml:space="preserve">
<value>Beleuchtungsmodus</value>
</data>
<data name="AuraNormal" xml:space="preserve"> <data name="AuraNormal" xml:space="preserve">
<value>Normal</value> <value>Normal</value>
</data> </data>
@@ -204,6 +207,21 @@
<data name="AuraStrobe" xml:space="preserve"> <data name="AuraStrobe" xml:space="preserve">
<value>Stroboskop</value> <value>Stroboskop</value>
</data> </data>
<data name="AuraZoneAll" xml:space="preserve">
<value>Alle</value>
</data>
<data name="AuraZoneDock" xml:space="preserve">
<value>Dock</value>
</data>
<data name="AuraZoneLogo" xml:space="preserve">
<value>Logo</value>
</data>
<data name="AuraZoneScroll" xml:space="preserve">
<value>Scrollrad</value>
</data>
<data name="AuraZoneUnderglow" xml:space="preserve">
<value>Front</value>
</data>
<data name="AutoApply" xml:space="preserve"> <data name="AutoApply" xml:space="preserve">
<value>Automatisch anwenden</value> <value>Automatisch anwenden</value>
</data> </data>

View File

@@ -163,26 +163,29 @@
<value>Servicios de Asus en ejecución</value> <value>Servicios de Asus en ejecución</value>
</data> </data>
<data name="AuraBatteryState" xml:space="preserve"> <data name="AuraBatteryState" xml:space="preserve">
<value>Battery State</value> <value>Estado de la batería</value>
</data> </data>
<data name="AuraBreathe" xml:space="preserve"> <data name="AuraBreathe" xml:space="preserve">
<value>Respiración</value> <value>Respiración</value>
</data> </data>
<data name="AuraClockwise" xml:space="preserve"> <data name="AuraClockwise" xml:space="preserve">
<value>Clockwise</value> <value>Sentido horario</value>
</data> </data>
<data name="AuraColorCycle" xml:space="preserve"> <data name="AuraColorCycle" xml:space="preserve">
<value>Ciclo de color</value> <value>Ciclo de color</value>
</data> </data>
<data name="AuraComet" xml:space="preserve"> <data name="AuraComet" xml:space="preserve">
<value>Comet</value> <value>Cometa</value>
</data> </data>
<data name="AuraCounterClockwise" xml:space="preserve"> <data name="AuraCounterClockwise" xml:space="preserve">
<value>Counterclockwise</value> <value>Sentido anti-horario</value>
</data> </data>
<data name="AuraFast" xml:space="preserve"> <data name="AuraFast" xml:space="preserve">
<value>Rápido</value> <value>Rápido</value>
</data> </data>
<data name="AuraLightingMode" xml:space="preserve">
<value>Lighting Mode</value>
</data>
<data name="AuraNormal" xml:space="preserve"> <data name="AuraNormal" xml:space="preserve">
<value>Normal</value> <value>Normal</value>
</data> </data>
@@ -190,10 +193,10 @@
<value>Arcoíris</value> <value>Arcoíris</value>
</data> </data>
<data name="AuraRandomColor" xml:space="preserve"> <data name="AuraRandomColor" xml:space="preserve">
<value>Random</value> <value>Aleatorio</value>
</data> </data>
<data name="AuraReact" xml:space="preserve"> <data name="AuraReact" xml:space="preserve">
<value>React</value> <value>Sensible</value>
</data> </data>
<data name="AuraSlow" xml:space="preserve"> <data name="AuraSlow" xml:space="preserve">
<value>Lento</value> <value>Lento</value>
@@ -204,6 +207,21 @@
<data name="AuraStrobe" xml:space="preserve"> <data name="AuraStrobe" xml:space="preserve">
<value>Estroboscópico</value> <value>Estroboscópico</value>
</data> </data>
<data name="AuraZoneAll" xml:space="preserve">
<value>All</value>
</data>
<data name="AuraZoneDock" xml:space="preserve">
<value>Dock</value>
</data>
<data name="AuraZoneLogo" xml:space="preserve">
<value>Logo</value>
</data>
<data name="AuraZoneScroll" xml:space="preserve">
<value>Scrollwheel</value>
</data>
<data name="AuraZoneUnderglow" xml:space="preserve">
<value>Underglow</value>
</data>
<data name="AutoApply" xml:space="preserve"> <data name="AutoApply" xml:space="preserve">
<value>Autoaplicar</value> <value>Autoaplicar</value>
</data> </data>
@@ -285,7 +303,7 @@
<value>Modo de Pantalla NVIDIA no está configurado en Optimus</value> <value>Modo de Pantalla NVIDIA no está configurado en Optimus</value>
</data> </data>
<data name="EnergySettings" xml:space="preserve"> <data name="EnergySettings" xml:space="preserve">
<value>Energy Settings</value> <value>Ajustes de energía</value>
</data> </data>
<data name="Extra" xml:space="preserve"> <data name="Extra" xml:space="preserve">
<value>Adicional</value> <value>Adicional</value>
@@ -354,7 +372,7 @@
<value>Temperatura objetivo</value> <value>Temperatura objetivo</value>
</data> </data>
<data name="High" xml:space="preserve"> <data name="High" xml:space="preserve">
<value>High</value> <value>Alto</value>
</data> </data>
<data name="KeyBindings" xml:space="preserve"> <data name="KeyBindings" xml:space="preserve">
<value>Atajos de teclado</value> <value>Atajos de teclado</value>
@@ -381,13 +399,13 @@
<value>Barra de luz</value> <value>Barra de luz</value>
</data> </data>
<data name="Lighting" xml:space="preserve"> <data name="Lighting" xml:space="preserve">
<value>Lighting</value> <value>Iluminación</value>
</data> </data>
<data name="Logo" xml:space="preserve"> <data name="Logo" xml:space="preserve">
<value>Logo</value> <value>Logo</value>
</data> </data>
<data name="Low" xml:space="preserve"> <data name="Low" xml:space="preserve">
<value>Low</value> <value>Bajo</value>
</data> </data>
<data name="MatrixAudio" xml:space="preserve"> <data name="MatrixAudio" xml:space="preserve">
<value>Visualizador de audio</value> <value>Visualizador de audio</value>
@@ -423,28 +441,28 @@
<value>Frecuencia de actualización de 60Hz para ahorrar batería</value> <value>Frecuencia de actualización de 60Hz para ahorrar batería</value>
</data> </data>
<data name="Minute" xml:space="preserve"> <data name="Minute" xml:space="preserve">
<value>Minute</value> <value>Minuto</value>
</data> </data>
<data name="Minutes" xml:space="preserve"> <data name="Minutes" xml:space="preserve">
<value>Minutes</value> <value>Minutos</value>
</data> </data>
<data name="MouseAngleSnapping" xml:space="preserve"> <data name="MouseAngleSnapping" xml:space="preserve">
<value>Angle Snapping</value> <value>Ajuste de ángulo</value>
</data> </data>
<data name="MouseAutoPowerOff" xml:space="preserve"> <data name="MouseAutoPowerOff" xml:space="preserve">
<value>Auto Power Off After</value> <value>Auto-apagar tras</value>
</data> </data>
<data name="MouseLiftOffDistance" xml:space="preserve"> <data name="MouseLiftOffDistance" xml:space="preserve">
<value>Lift Off Distance</value> <value>Distancia de despegue (LOD)</value>
</data> </data>
<data name="MouseLowBatteryWarning" xml:space="preserve"> <data name="MouseLowBatteryWarning" xml:space="preserve">
<value>Low Battery Warning at</value> <value>Aviso de batería baja al</value>
</data> </data>
<data name="MousePerformance" xml:space="preserve"> <data name="MousePerformance" xml:space="preserve">
<value>Performance</value> <value>Rendimiento</value>
</data> </data>
<data name="MouseSynchronize" xml:space="preserve"> <data name="MouseSynchronize" xml:space="preserve">
<value>Synchronize with mouse</value> <value>Sincronizar con el ratón</value>
</data> </data>
<data name="Multizone" xml:space="preserve"> <data name="Multizone" xml:space="preserve">
<value>Multizona</value> <value>Multizona</value>
@@ -453,7 +471,7 @@
<value>Silenciar micrófono</value> <value>Silenciar micrófono</value>
</data> </data>
<data name="Never" xml:space="preserve"> <data name="Never" xml:space="preserve">
<value>Never</value> <value>Nunca</value>
</data> </data>
<data name="NewUpdates" xml:space="preserve"> <data name="NewUpdates" xml:space="preserve">
<value>Nuevas actualizaciones</value> <value>Nuevas actualizaciones</value>
@@ -462,7 +480,7 @@
<value>No hay actualizaciones</value> <value>No hay actualizaciones</value>
</data> </data>
<data name="NotConnected" xml:space="preserve"> <data name="NotConnected" xml:space="preserve">
<value>Not Connected</value> <value>No conectado</value>
</data> </data>
<data name="OpenGHelper" xml:space="preserve"> <data name="OpenGHelper" xml:space="preserve">
<value>Abrir ventana G-Helper</value> <value>Abrir ventana G-Helper</value>
@@ -486,7 +504,7 @@
<value>Modo</value> <value>Modo</value>
</data> </data>
<data name="Peripherals" xml:space="preserve"> <data name="Peripherals" xml:space="preserve">
<value>Peripherals</value> <value>Periféricos</value>
</data> </data>
<data name="PictureGif" xml:space="preserve"> <data name="PictureGif" xml:space="preserve">
<value>Imagen / Gif</value> <value>Imagen / Gif</value>
@@ -495,7 +513,7 @@
<value>Reproducir / Pausar</value> <value>Reproducir / Pausar</value>
</data> </data>
<data name="PollingRate" xml:space="preserve"> <data name="PollingRate" xml:space="preserve">
<value>Polling Rate</value> <value>Velocidad de respuesta</value>
</data> </data>
<data name="PowerLimits" xml:space="preserve"> <data name="PowerLimits" xml:space="preserve">
<value>Límites de energía</value> <value>Límites de energía</value>
@@ -507,7 +525,7 @@
<value>Capturar pantalla</value> <value>Capturar pantalla</value>
</data> </data>
<data name="Profile" xml:space="preserve"> <data name="Profile" xml:space="preserve">
<value>Profile</value> <value>Perfil</value>
</data> </data>
<data name="Quit" xml:space="preserve"> <data name="Quit" xml:space="preserve">
<value>Quitar</value> <value>Quitar</value>

View File

@@ -163,26 +163,29 @@
<value>Services Asus actifs</value> <value>Services Asus actifs</value>
</data> </data>
<data name="AuraBatteryState" xml:space="preserve"> <data name="AuraBatteryState" xml:space="preserve">
<value>Battery State</value> <value>État de la batterie</value>
</data> </data>
<data name="AuraBreathe" xml:space="preserve"> <data name="AuraBreathe" xml:space="preserve">
<value>Pulsation</value> <value>Pulsation</value>
</data> </data>
<data name="AuraClockwise" xml:space="preserve"> <data name="AuraClockwise" xml:space="preserve">
<value>Clockwise</value> <value>Sens horaire</value>
</data> </data>
<data name="AuraColorCycle" xml:space="preserve"> <data name="AuraColorCycle" xml:space="preserve">
<value>Cycle de couleur</value> <value>Cycle de couleur</value>
</data> </data>
<data name="AuraComet" xml:space="preserve"> <data name="AuraComet" xml:space="preserve">
<value>Comet</value> <value>Comète</value>
</data> </data>
<data name="AuraCounterClockwise" xml:space="preserve"> <data name="AuraCounterClockwise" xml:space="preserve">
<value>Counterclockwise</value> <value>Sens antihoraire</value>
</data> </data>
<data name="AuraFast" xml:space="preserve"> <data name="AuraFast" xml:space="preserve">
<value>Rapide</value> <value>Rapide</value>
</data> </data>
<data name="AuraLightingMode" xml:space="preserve">
<value>Lighting Mode</value>
</data>
<data name="AuraNormal" xml:space="preserve"> <data name="AuraNormal" xml:space="preserve">
<value>Normal</value> <value>Normal</value>
</data> </data>
@@ -190,7 +193,7 @@
<value>Arc-en-ciel</value> <value>Arc-en-ciel</value>
</data> </data>
<data name="AuraRandomColor" xml:space="preserve"> <data name="AuraRandomColor" xml:space="preserve">
<value>Random</value> <value>Aléatoire</value>
</data> </data>
<data name="AuraReact" xml:space="preserve"> <data name="AuraReact" xml:space="preserve">
<value>React</value> <value>React</value>
@@ -204,8 +207,23 @@
<data name="AuraStrobe" xml:space="preserve"> <data name="AuraStrobe" xml:space="preserve">
<value>Stroboscopique</value> <value>Stroboscopique</value>
</data> </data>
<data name="AuraZoneAll" xml:space="preserve">
<value>All</value>
</data>
<data name="AuraZoneDock" xml:space="preserve">
<value>Dock</value>
</data>
<data name="AuraZoneLogo" xml:space="preserve">
<value>Logo</value>
</data>
<data name="AuraZoneScroll" xml:space="preserve">
<value>Scrollwheel</value>
</data>
<data name="AuraZoneUnderglow" xml:space="preserve">
<value>Underglow</value>
</data>
<data name="AutoApply" xml:space="preserve"> <data name="AutoApply" xml:space="preserve">
<value>Applicage automatique</value> <value>Appliquer automatiquement</value>
</data> </data>
<data name="AutoMode" xml:space="preserve"> <data name="AutoMode" xml:space="preserve">
<value>Automatique</value> <value>Automatique</value>
@@ -226,7 +244,7 @@
<value>Limite de charge </value> <value>Limite de charge </value>
</data> </data>
<data name="BatteryHealth" xml:space="preserve"> <data name="BatteryHealth" xml:space="preserve">
<value>Battery Health</value> <value>Santé de la batterie</value>
</data> </data>
<data name="BiosAndDriverUpdates" xml:space="preserve"> <data name="BiosAndDriverUpdates" xml:space="preserve">
<value>Mise à jour BIOS et pilotes</value> <value>Mise à jour BIOS et pilotes</value>
@@ -285,7 +303,7 @@ Voulez-vous continuer ?</value>
<value>Le mode d'affichage NVIDIA n'est pas réglé sur Optimus</value> <value>Le mode d'affichage NVIDIA n'est pas réglé sur Optimus</value>
</data> </data>
<data name="EnergySettings" xml:space="preserve"> <data name="EnergySettings" xml:space="preserve">
<value>Energy Settings</value> <value>Paramètres d'énergie</value>
</data> </data>
<data name="Extra" xml:space="preserve"> <data name="Extra" xml:space="preserve">
<value>+ d'options</value> <value>+ d'options</value>
@@ -381,7 +399,7 @@ Voulez-vous continuer ?</value>
<value>Barre lumineuse</value> <value>Barre lumineuse</value>
</data> </data>
<data name="Lighting" xml:space="preserve"> <data name="Lighting" xml:space="preserve">
<value>Lighting</value> <value>Éclairage</value>
</data> </data>
<data name="Logo" xml:space="preserve"> <data name="Logo" xml:space="preserve">
<value>Logo</value> <value>Logo</value>
@@ -432,19 +450,19 @@ Voulez-vous continuer ?</value>
<value>Angle Snapping</value> <value>Angle Snapping</value>
</data> </data>
<data name="MouseAutoPowerOff" xml:space="preserve"> <data name="MouseAutoPowerOff" xml:space="preserve">
<value>Auto Power Off After</value> <value>Arrêt automatique après</value>
</data> </data>
<data name="MouseLiftOffDistance" xml:space="preserve"> <data name="MouseLiftOffDistance" xml:space="preserve">
<value>Lift Off Distance</value> <value>Lift Off Distance</value>
</data> </data>
<data name="MouseLowBatteryWarning" xml:space="preserve"> <data name="MouseLowBatteryWarning" xml:space="preserve">
<value>Low Battery Warning at</value> <value>Avertissement de batterie faible à</value>
</data> </data>
<data name="MousePerformance" xml:space="preserve"> <data name="MousePerformance" xml:space="preserve">
<value>Performance</value> <value>Performance</value>
</data> </data>
<data name="MouseSynchronize" xml:space="preserve"> <data name="MouseSynchronize" xml:space="preserve">
<value>Synchronize with mouse</value> <value>Synchroniser avec le pointeur</value>
</data> </data>
<data name="Multizone" xml:space="preserve"> <data name="Multizone" xml:space="preserve">
<value>Multi-zone</value> <value>Multi-zone</value>
@@ -453,7 +471,7 @@ Voulez-vous continuer ?</value>
<value>Désactiver le micro</value> <value>Désactiver le micro</value>
</data> </data>
<data name="Never" xml:space="preserve"> <data name="Never" xml:space="preserve">
<value>Never</value> <value>Jamais</value>
</data> </data>
<data name="NewUpdates" xml:space="preserve"> <data name="NewUpdates" xml:space="preserve">
<value>Nouvelles mises à jour</value> <value>Nouvelles mises à jour</value>
@@ -462,7 +480,7 @@ Voulez-vous continuer ?</value>
<value>Aucune mise à jour disponible</value> <value>Aucune mise à jour disponible</value>
</data> </data>
<data name="NotConnected" xml:space="preserve"> <data name="NotConnected" xml:space="preserve">
<value>Not Connected</value> <value>Non connecté</value>
</data> </data>
<data name="OpenGHelper" xml:space="preserve"> <data name="OpenGHelper" xml:space="preserve">
<value>Ouvrir G-Helper</value> <value>Ouvrir G-Helper</value>
@@ -486,7 +504,7 @@ Voulez-vous continuer ?</value>
<value>Mode Performance</value> <value>Mode Performance</value>
</data> </data>
<data name="Peripherals" xml:space="preserve"> <data name="Peripherals" xml:space="preserve">
<value>Peripherals</value> <value>Périphériques</value>
</data> </data>
<data name="PictureGif" xml:space="preserve"> <data name="PictureGif" xml:space="preserve">
<value>Image / Gif</value> <value>Image / Gif</value>
@@ -507,7 +525,7 @@ Voulez-vous continuer ?</value>
<value>Capture d'écran</value> <value>Capture d'écran</value>
</data> </data>
<data name="Profile" xml:space="preserve"> <data name="Profile" xml:space="preserve">
<value>Profile</value> <value>Profil</value>
</data> </data>
<data name="Quit" xml:space="preserve"> <data name="Quit" xml:space="preserve">
<value>Quitter</value> <value>Quitter</value>

View File

@@ -183,6 +183,9 @@
<data name="AuraFast" xml:space="preserve"> <data name="AuraFast" xml:space="preserve">
<value>Gyors</value> <value>Gyors</value>
</data> </data>
<data name="AuraLightingMode" xml:space="preserve">
<value>Lighting Mode</value>
</data>
<data name="AuraNormal" xml:space="preserve"> <data name="AuraNormal" xml:space="preserve">
<value>Normál</value> <value>Normál</value>
</data> </data>
@@ -204,6 +207,21 @@
<data name="AuraStrobe" xml:space="preserve"> <data name="AuraStrobe" xml:space="preserve">
<value>Stroboszkóp</value> <value>Stroboszkóp</value>
</data> </data>
<data name="AuraZoneAll" xml:space="preserve">
<value>All</value>
</data>
<data name="AuraZoneDock" xml:space="preserve">
<value>Dock</value>
</data>
<data name="AuraZoneLogo" xml:space="preserve">
<value>Logo</value>
</data>
<data name="AuraZoneScroll" xml:space="preserve">
<value>Scrollwheel</value>
</data>
<data name="AuraZoneUnderglow" xml:space="preserve">
<value>Underglow</value>
</data>
<data name="AutoApply" xml:space="preserve"> <data name="AutoApply" xml:space="preserve">
<value>Automatikus alkalmazás</value> <value>Automatikus alkalmazás</value>
</data> </data>

View File

@@ -183,6 +183,9 @@
<data name="AuraFast" xml:space="preserve"> <data name="AuraFast" xml:space="preserve">
<value>Veloce</value> <value>Veloce</value>
</data> </data>
<data name="AuraLightingMode" xml:space="preserve">
<value>Lighting Mode</value>
</data>
<data name="AuraNormal" xml:space="preserve"> <data name="AuraNormal" xml:space="preserve">
<value>Normale</value> <value>Normale</value>
</data> </data>
@@ -204,6 +207,21 @@
<data name="AuraStrobe" xml:space="preserve"> <data name="AuraStrobe" xml:space="preserve">
<value>Strobo</value> <value>Strobo</value>
</data> </data>
<data name="AuraZoneAll" xml:space="preserve">
<value>All</value>
</data>
<data name="AuraZoneDock" xml:space="preserve">
<value>Dock</value>
</data>
<data name="AuraZoneLogo" xml:space="preserve">
<value>Logo</value>
</data>
<data name="AuraZoneScroll" xml:space="preserve">
<value>Scrollwheel</value>
</data>
<data name="AuraZoneUnderglow" xml:space="preserve">
<value>Underglow</value>
</data>
<data name="AutoApply" xml:space="preserve"> <data name="AutoApply" xml:space="preserve">
<value>Auto Applica</value> <value>Auto Applica</value>
</data> </data>

View File

@@ -183,6 +183,9 @@
<data name="AuraFast" xml:space="preserve"> <data name="AuraFast" xml:space="preserve">
<value>빠르게</value> <value>빠르게</value>
</data> </data>
<data name="AuraLightingMode" xml:space="preserve">
<value>Lighting Mode</value>
</data>
<data name="AuraNormal" xml:space="preserve"> <data name="AuraNormal" xml:space="preserve">
<value>보통</value> <value>보통</value>
</data> </data>
@@ -204,6 +207,21 @@
<data name="AuraStrobe" xml:space="preserve"> <data name="AuraStrobe" xml:space="preserve">
<value>Strobe</value> <value>Strobe</value>
</data> </data>
<data name="AuraZoneAll" xml:space="preserve">
<value>All</value>
</data>
<data name="AuraZoneDock" xml:space="preserve">
<value>Dock</value>
</data>
<data name="AuraZoneLogo" xml:space="preserve">
<value>Logo</value>
</data>
<data name="AuraZoneScroll" xml:space="preserve">
<value>Scrollwheel</value>
</data>
<data name="AuraZoneUnderglow" xml:space="preserve">
<value>Underglow</value>
</data>
<data name="AutoApply" xml:space="preserve"> <data name="AutoApply" xml:space="preserve">
<value>자동 적용</value> <value>자동 적용</value>
</data> </data>

View File

@@ -163,13 +163,13 @@
<value>Veikiančios Asus tarnybos</value> <value>Veikiančios Asus tarnybos</value>
</data> </data>
<data name="AuraBatteryState" xml:space="preserve"> <data name="AuraBatteryState" xml:space="preserve">
<value>Battery State</value> <value>Būsena</value>
</data> </data>
<data name="AuraBreathe" xml:space="preserve"> <data name="AuraBreathe" xml:space="preserve">
<value>Kvėpavimas</value> <value>Kvėpavimas</value>
</data> </data>
<data name="AuraClockwise" xml:space="preserve"> <data name="AuraClockwise" xml:space="preserve">
<value>Clockwise</value> <value>Pagal laikrodžio rodyklę</value>
</data> </data>
<data name="AuraColorCycle" xml:space="preserve"> <data name="AuraColorCycle" xml:space="preserve">
<value>Spalvų ciklas</value> <value>Spalvų ciklas</value>
@@ -178,11 +178,14 @@
<value>Comet</value> <value>Comet</value>
</data> </data>
<data name="AuraCounterClockwise" xml:space="preserve"> <data name="AuraCounterClockwise" xml:space="preserve">
<value>Counterclockwise</value> <value>Prieš laikrodžio rodyklę</value>
</data> </data>
<data name="AuraFast" xml:space="preserve"> <data name="AuraFast" xml:space="preserve">
<value>Greitas</value> <value>Greitas</value>
</data> </data>
<data name="AuraLightingMode" xml:space="preserve">
<value>Lighting Mode</value>
</data>
<data name="AuraNormal" xml:space="preserve"> <data name="AuraNormal" xml:space="preserve">
<value>Normalus</value> <value>Normalus</value>
</data> </data>
@@ -190,7 +193,7 @@
<value>Vaivorykštė</value> <value>Vaivorykštė</value>
</data> </data>
<data name="AuraRandomColor" xml:space="preserve"> <data name="AuraRandomColor" xml:space="preserve">
<value>Random</value> <value>Atsitiktinė</value>
</data> </data>
<data name="AuraReact" xml:space="preserve"> <data name="AuraReact" xml:space="preserve">
<value>React</value> <value>React</value>
@@ -204,6 +207,21 @@
<data name="AuraStrobe" xml:space="preserve"> <data name="AuraStrobe" xml:space="preserve">
<value>Blyksniai</value> <value>Blyksniai</value>
</data> </data>
<data name="AuraZoneAll" xml:space="preserve">
<value>All</value>
</data>
<data name="AuraZoneDock" xml:space="preserve">
<value>Dock</value>
</data>
<data name="AuraZoneLogo" xml:space="preserve">
<value>Logo</value>
</data>
<data name="AuraZoneScroll" xml:space="preserve">
<value>Scrollwheel</value>
</data>
<data name="AuraZoneUnderglow" xml:space="preserve">
<value>Underglow</value>
</data>
<data name="AutoApply" xml:space="preserve"> <data name="AutoApply" xml:space="preserve">
<value>Taikyti automatiškai</value> <value>Taikyti automatiškai</value>
</data> </data>
@@ -211,7 +229,7 @@
<value>Automatinis</value> <value>Automatinis</value>
</data> </data>
<data name="AutoRefreshTooltip" xml:space="preserve"> <data name="AutoRefreshTooltip" xml:space="preserve">
<value>Nustato 60Hz, kad stokotų akumuliatorių, ir atgal, kai prijungtas prie lizdo</value> <value>Nustato 60Hz, kad taupytų energiją, ir atgal, kai įjungtas į lizdą</value>
</data> </data>
<data name="Awake" xml:space="preserve"> <data name="Awake" xml:space="preserve">
<value>Pabudęs</value> <value>Pabudęs</value>
@@ -271,7 +289,7 @@
<value>Tvarkyklės ir programinė įranga</value> <value>Tvarkyklės ir programinė įranga</value>
</data> </data>
<data name="EcoGPUTooltip" xml:space="preserve"> <data name="EcoGPUTooltip" xml:space="preserve">
<value>Išjungia dGPU, kad stokotų akumuliatorių</value> <value>Išjungia dGPU, kad taupytų energiją</value>
</data> </data>
<data name="EcoMode" xml:space="preserve"> <data name="EcoMode" xml:space="preserve">
<value>Ekonomiškas</value> <value>Ekonomiškas</value>
@@ -285,7 +303,7 @@ Vis tiek norite tęsti?</value>
<value>NVIDIA ekrano režimas nenustatytas į Optimus</value> <value>NVIDIA ekrano režimas nenustatytas į Optimus</value>
</data> </data>
<data name="EnergySettings" xml:space="preserve"> <data name="EnergySettings" xml:space="preserve">
<value>Energy Settings</value> <value>Energijos nustatymai</value>
</data> </data>
<data name="Extra" xml:space="preserve"> <data name="Extra" xml:space="preserve">
<value>Išplėstiniai</value> <value>Išplėstiniai</value>
@@ -354,7 +372,7 @@ Vis tiek norite tęsti?</value>
<value>Temperatūros tikslas</value> <value>Temperatūros tikslas</value>
</data> </data>
<data name="High" xml:space="preserve"> <data name="High" xml:space="preserve">
<value>High</value> <value>Aukštas</value>
</data> </data>
<data name="KeyBindings" xml:space="preserve"> <data name="KeyBindings" xml:space="preserve">
<value>Klavišų priskyrimas</value> <value>Klavišų priskyrimas</value>
@@ -381,13 +399,13 @@ Vis tiek norite tęsti?</value>
<value>Šviesos juosta</value> <value>Šviesos juosta</value>
</data> </data>
<data name="Lighting" xml:space="preserve"> <data name="Lighting" xml:space="preserve">
<value>Lighting</value> <value>Apšvietimas</value>
</data> </data>
<data name="Logo" xml:space="preserve"> <data name="Logo" xml:space="preserve">
<value>Logotipas</value> <value>Logotipas</value>
</data> </data>
<data name="Low" xml:space="preserve"> <data name="Low" xml:space="preserve">
<value>Low</value> <value>Žemas</value>
</data> </data>
<data name="MatrixAudio" xml:space="preserve"> <data name="MatrixAudio" xml:space="preserve">
<value>Garso vizualizatorius</value> <value>Garso vizualizatorius</value>
@@ -420,49 +438,49 @@ Vis tiek norite tęsti?</value>
<value>Maksimalus kadrų dažnis už mažesnę delsą</value> <value>Maksimalus kadrų dažnis už mažesnę delsą</value>
</data> </data>
<data name="MinRefreshTooltip" xml:space="preserve"> <data name="MinRefreshTooltip" xml:space="preserve">
<value>60Hz kadrų dažnis, kad stokotumėte akumuliatorių</value> <value>60Hz kadrų dažnis, kad taupytumėte energiją</value>
</data> </data>
<data name="Minute" xml:space="preserve"> <data name="Minute" xml:space="preserve">
<value>Minute</value> <value>min.</value>
</data> </data>
<data name="Minutes" xml:space="preserve"> <data name="Minutes" xml:space="preserve">
<value>Minutes</value> <value>min.</value>
</data> </data>
<data name="MouseAngleSnapping" xml:space="preserve"> <data name="MouseAngleSnapping" xml:space="preserve">
<value>Angle Snapping</value> <value>Angle Snapping</value>
</data> </data>
<data name="MouseAutoPowerOff" xml:space="preserve"> <data name="MouseAutoPowerOff" xml:space="preserve">
<value>Auto Power Off After</value> <value>Automatiškai išjungti po</value>
</data> </data>
<data name="MouseLiftOffDistance" xml:space="preserve"> <data name="MouseLiftOffDistance" xml:space="preserve">
<value>Lift Off Distance</value> <value>Pakilimo atstumas</value>
</data> </data>
<data name="MouseLowBatteryWarning" xml:space="preserve"> <data name="MouseLowBatteryWarning" xml:space="preserve">
<value>Low Battery Warning at</value> <value>Senkančio akumuliatoriaus įspėjimas</value>
</data> </data>
<data name="MousePerformance" xml:space="preserve"> <data name="MousePerformance" xml:space="preserve">
<value>Performance</value> <value>Našumas</value>
</data> </data>
<data name="MouseSynchronize" xml:space="preserve"> <data name="MouseSynchronize" xml:space="preserve">
<value>Synchronize with mouse</value> <value>Sinchronizuoti su pele</value>
</data> </data>
<data name="Multizone" xml:space="preserve"> <data name="Multizone" xml:space="preserve">
<value>Daugiazonė</value> <value>Daugiazonis</value>
</data> </data>
<data name="MuteMic" xml:space="preserve"> <data name="MuteMic" xml:space="preserve">
<value>Mikrofono nutildymas</value> <value>Mikrofono nutildymas</value>
</data> </data>
<data name="Never" xml:space="preserve"> <data name="Never" xml:space="preserve">
<value>Never</value> <value>Niekada</value>
</data> </data>
<data name="NewUpdates" xml:space="preserve"> <data name="NewUpdates" xml:space="preserve">
<value>Prieinami naujinimai</value> <value>Nauji naujinimai</value>
</data> </data>
<data name="NoNewUpdates" xml:space="preserve"> <data name="NoNewUpdates" xml:space="preserve">
<value>Nėra prieinamų naujinimų</value> <value>Nėra naujų naujinimų</value>
</data> </data>
<data name="NotConnected" xml:space="preserve"> <data name="NotConnected" xml:space="preserve">
<value>Not Connected</value> <value>Neprijungta</value>
</data> </data>
<data name="OpenGHelper" xml:space="preserve"> <data name="OpenGHelper" xml:space="preserve">
<value>Atidaryti G-Helper langą</value> <value>Atidaryti G-Helper langą</value>
@@ -471,7 +489,7 @@ Vis tiek norite tęsti?</value>
<value>Optimizuotas</value> <value>Optimizuotas</value>
</data> </data>
<data name="OptimizedGPUTooltip" xml:space="preserve"> <data name="OptimizedGPUTooltip" xml:space="preserve">
<value>Perjungti į ekonomišką, kai naudojamas akumuliatorius, ir į standartinį, kai prijungtas prie lizdo</value> <value>Perjungti į ekonomišką, kai naudojamas akumuliatorius, ir į standartinį, kai įjungtas į lizdą</value>
</data> </data>
<data name="OptimizedUSBC" xml:space="preserve"> <data name="OptimizedUSBC" xml:space="preserve">
<value>Neįjungti GPU, kai naudojamas USB-C įkroviklis optimizuotame režime</value> <value>Neįjungti GPU, kai naudojamas USB-C įkroviklis optimizuotame režime</value>
@@ -486,7 +504,7 @@ Vis tiek norite tęsti?</value>
<value>Režimas</value> <value>Režimas</value>
</data> </data>
<data name="Peripherals" xml:space="preserve"> <data name="Peripherals" xml:space="preserve">
<value>Peripherals</value> <value>Išoriniai įrenginiai</value>
</data> </data>
<data name="PictureGif" xml:space="preserve"> <data name="PictureGif" xml:space="preserve">
<value>Paveikslėlis / GIF</value> <value>Paveikslėlis / GIF</value>
@@ -495,7 +513,7 @@ Vis tiek norite tęsti?</value>
<value>Paleisti / Pristabdyti</value> <value>Paleisti / Pristabdyti</value>
</data> </data>
<data name="PollingRate" xml:space="preserve"> <data name="PollingRate" xml:space="preserve">
<value>Polling Rate</value> <value>Iškvietų dažnis</value>
</data> </data>
<data name="PowerLimits" xml:space="preserve"> <data name="PowerLimits" xml:space="preserve">
<value>Galios ribos</value> <value>Galios ribos</value>
@@ -507,7 +525,7 @@ Vis tiek norite tęsti?</value>
<value>Ekrano kopija</value> <value>Ekrano kopija</value>
</data> </data>
<data name="Profile" xml:space="preserve"> <data name="Profile" xml:space="preserve">
<value>Profile</value> <value>Profilis</value>
</data> </data>
<data name="Quit" xml:space="preserve"> <data name="Quit" xml:space="preserve">
<value>Išeiti</value> <value>Išeiti</value>

View File

@@ -163,26 +163,29 @@
<value>Uruchomione usługi Asus</value> <value>Uruchomione usługi Asus</value>
</data> </data>
<data name="AuraBatteryState" xml:space="preserve"> <data name="AuraBatteryState" xml:space="preserve">
<value>Battery State</value> <value>Stan baterii</value>
</data> </data>
<data name="AuraBreathe" xml:space="preserve"> <data name="AuraBreathe" xml:space="preserve">
<value>Oddychanie</value> <value>Oddychanie</value>
</data> </data>
<data name="AuraClockwise" xml:space="preserve"> <data name="AuraClockwise" xml:space="preserve">
<value>Clockwise</value> <value>W prawo</value>
</data> </data>
<data name="AuraColorCycle" xml:space="preserve"> <data name="AuraColorCycle" xml:space="preserve">
<value>Pętla kolorów</value> <value>Pętla kolorów</value>
</data> </data>
<data name="AuraComet" xml:space="preserve"> <data name="AuraComet" xml:space="preserve">
<value>Comet</value> <value>Kometa</value>
</data> </data>
<data name="AuraCounterClockwise" xml:space="preserve"> <data name="AuraCounterClockwise" xml:space="preserve">
<value>Counterclockwise</value> <value>W lewo</value>
</data> </data>
<data name="AuraFast" xml:space="preserve"> <data name="AuraFast" xml:space="preserve">
<value>Szybka</value> <value>Szybka</value>
</data> </data>
<data name="AuraLightingMode" xml:space="preserve">
<value>Lighting Mode</value>
</data>
<data name="AuraNormal" xml:space="preserve"> <data name="AuraNormal" xml:space="preserve">
<value>Normalna</value> <value>Normalna</value>
</data> </data>
@@ -190,10 +193,10 @@
<value>Tęcza</value> <value>Tęcza</value>
</data> </data>
<data name="AuraRandomColor" xml:space="preserve"> <data name="AuraRandomColor" xml:space="preserve">
<value>Random</value> <value>Losowo</value>
</data> </data>
<data name="AuraReact" xml:space="preserve"> <data name="AuraReact" xml:space="preserve">
<value>React</value> <value>Tryb reaktywny</value>
</data> </data>
<data name="AuraSlow" xml:space="preserve"> <data name="AuraSlow" xml:space="preserve">
<value>Powolna</value> <value>Powolna</value>
@@ -204,6 +207,21 @@
<data name="AuraStrobe" xml:space="preserve"> <data name="AuraStrobe" xml:space="preserve">
<value>Stroboskop</value> <value>Stroboskop</value>
</data> </data>
<data name="AuraZoneAll" xml:space="preserve">
<value>All</value>
</data>
<data name="AuraZoneDock" xml:space="preserve">
<value>Dock</value>
</data>
<data name="AuraZoneLogo" xml:space="preserve">
<value>Logo</value>
</data>
<data name="AuraZoneScroll" xml:space="preserve">
<value>Scrollwheel</value>
</data>
<data name="AuraZoneUnderglow" xml:space="preserve">
<value>Underglow</value>
</data>
<data name="AutoApply" xml:space="preserve"> <data name="AutoApply" xml:space="preserve">
<value>Zastosuj automatycznie</value> <value>Zastosuj automatycznie</value>
</data> </data>
@@ -285,7 +303,7 @@ Nadal chcesz kontynuować?</value>
<value>Tryb wyświetlania NVIDIA nie jest ustawiony na Optimus</value> <value>Tryb wyświetlania NVIDIA nie jest ustawiony na Optimus</value>
</data> </data>
<data name="EnergySettings" xml:space="preserve"> <data name="EnergySettings" xml:space="preserve">
<value>Energy Settings</value> <value>Ustawienia zasilania</value>
</data> </data>
<data name="Extra" xml:space="preserve"> <data name="Extra" xml:space="preserve">
<value>Ustawienia</value> <value>Ustawienia</value>
@@ -354,7 +372,7 @@ Nadal chcesz kontynuować?</value>
<value>Temperatura docelowa</value> <value>Temperatura docelowa</value>
</data> </data>
<data name="High" xml:space="preserve"> <data name="High" xml:space="preserve">
<value>High</value> <value>Wysoka</value>
</data> </data>
<data name="KeyBindings" xml:space="preserve"> <data name="KeyBindings" xml:space="preserve">
<value>Ustawienia klawiszy skrótów</value> <value>Ustawienia klawiszy skrótów</value>
@@ -381,13 +399,13 @@ Nadal chcesz kontynuować?</value>
<value>Lightbar</value> <value>Lightbar</value>
</data> </data>
<data name="Lighting" xml:space="preserve"> <data name="Lighting" xml:space="preserve">
<value>Lighting</value> <value>Oświetlenie</value>
</data> </data>
<data name="Logo" xml:space="preserve"> <data name="Logo" xml:space="preserve">
<value>Logo</value> <value>Logo</value>
</data> </data>
<data name="Low" xml:space="preserve"> <data name="Low" xml:space="preserve">
<value>Low</value> <value>Niska</value>
</data> </data>
<data name="MatrixAudio" xml:space="preserve"> <data name="MatrixAudio" xml:space="preserve">
<value>Wizualizer muzyki</value> <value>Wizualizer muzyki</value>
@@ -423,28 +441,28 @@ Nadal chcesz kontynuować?</value>
<value>Częstotliwość odświeżania 60 Hz dla oszczędzania baterii</value> <value>Częstotliwość odświeżania 60 Hz dla oszczędzania baterii</value>
</data> </data>
<data name="Minute" xml:space="preserve"> <data name="Minute" xml:space="preserve">
<value>Minute</value> <value>min.</value>
</data> </data>
<data name="Minutes" xml:space="preserve"> <data name="Minutes" xml:space="preserve">
<value>Minutes</value> <value>min.</value>
</data> </data>
<data name="MouseAngleSnapping" xml:space="preserve"> <data name="MouseAngleSnapping" xml:space="preserve">
<value>Angle Snapping</value> <value>Korekcja kąta ruchu</value>
</data> </data>
<data name="MouseAutoPowerOff" xml:space="preserve"> <data name="MouseAutoPowerOff" xml:space="preserve">
<value>Auto Power Off After</value> <value>Przejście w tryb uśpienia po</value>
</data> </data>
<data name="MouseLiftOffDistance" xml:space="preserve"> <data name="MouseLiftOffDistance" xml:space="preserve">
<value>Lift Off Distance</value> <value>Wysokość reakcji sensora</value>
</data> </data>
<data name="MouseLowBatteryWarning" xml:space="preserve"> <data name="MouseLowBatteryWarning" xml:space="preserve">
<value>Low Battery Warning at</value> <value>Ostrzeżenie o niskim poziomie baterii</value>
</data> </data>
<data name="MousePerformance" xml:space="preserve"> <data name="MousePerformance" xml:space="preserve">
<value>Performance</value> <value>Wydajność</value>
</data> </data>
<data name="MouseSynchronize" xml:space="preserve"> <data name="MouseSynchronize" xml:space="preserve">
<value>Synchronize with mouse</value> <value>Synchronizuj z myszką</value>
</data> </data>
<data name="Multizone" xml:space="preserve"> <data name="Multizone" xml:space="preserve">
<value>Multizone</value> <value>Multizone</value>
@@ -453,7 +471,7 @@ Nadal chcesz kontynuować?</value>
<value>Wyciszenie mikrofonu</value> <value>Wyciszenie mikrofonu</value>
</data> </data>
<data name="Never" xml:space="preserve"> <data name="Never" xml:space="preserve">
<value>Never</value> <value>Nigdy</value>
</data> </data>
<data name="NewUpdates" xml:space="preserve"> <data name="NewUpdates" xml:space="preserve">
<value>Nowe aktualizacje</value> <value>Nowe aktualizacje</value>
@@ -462,7 +480,7 @@ Nadal chcesz kontynuować?</value>
<value>Brak aktualizacji</value> <value>Brak aktualizacji</value>
</data> </data>
<data name="NotConnected" xml:space="preserve"> <data name="NotConnected" xml:space="preserve">
<value>Not Connected</value> <value>Nie połączono</value>
</data> </data>
<data name="OpenGHelper" xml:space="preserve"> <data name="OpenGHelper" xml:space="preserve">
<value>Otwórz okno G-Helper</value> <value>Otwórz okno G-Helper</value>
@@ -486,7 +504,7 @@ Nadal chcesz kontynuować?</value>
<value>Tryb zasilania</value> <value>Tryb zasilania</value>
</data> </data>
<data name="Peripherals" xml:space="preserve"> <data name="Peripherals" xml:space="preserve">
<value>Peripherals</value> <value>Urządzenia peryferyjne</value>
</data> </data>
<data name="PictureGif" xml:space="preserve"> <data name="PictureGif" xml:space="preserve">
<value>Obraz / GIF</value> <value>Obraz / GIF</value>
@@ -495,7 +513,7 @@ Nadal chcesz kontynuować?</value>
<value>Odtwórz / Pauza</value> <value>Odtwórz / Pauza</value>
</data> </data>
<data name="PollingRate" xml:space="preserve"> <data name="PollingRate" xml:space="preserve">
<value>Polling Rate</value> <value>Częstotliwość raportowania</value>
</data> </data>
<data name="PowerLimits" xml:space="preserve"> <data name="PowerLimits" xml:space="preserve">
<value>Limit mocy</value> <value>Limit mocy</value>
@@ -507,7 +525,7 @@ Nadal chcesz kontynuować?</value>
<value>Zrzut ekranu</value> <value>Zrzut ekranu</value>
</data> </data>
<data name="Profile" xml:space="preserve"> <data name="Profile" xml:space="preserve">
<value>Profile</value> <value>Profil</value>
</data> </data>
<data name="Quit" xml:space="preserve"> <data name="Quit" xml:space="preserve">
<value>Zamknij</value> <value>Zamknij</value>

View File

@@ -183,6 +183,9 @@
<data name="AuraFast" xml:space="preserve"> <data name="AuraFast" xml:space="preserve">
<value>Rápido</value> <value>Rápido</value>
</data> </data>
<data name="AuraLightingMode" xml:space="preserve">
<value>Lighting Mode</value>
</data>
<data name="AuraNormal" xml:space="preserve"> <data name="AuraNormal" xml:space="preserve">
<value>Normal</value> <value>Normal</value>
</data> </data>
@@ -204,6 +207,21 @@
<data name="AuraStrobe" xml:space="preserve"> <data name="AuraStrobe" xml:space="preserve">
<value>Estroboscópio</value> <value>Estroboscópio</value>
</data> </data>
<data name="AuraZoneAll" xml:space="preserve">
<value>All</value>
</data>
<data name="AuraZoneDock" xml:space="preserve">
<value>Dock</value>
</data>
<data name="AuraZoneLogo" xml:space="preserve">
<value>Logo</value>
</data>
<data name="AuraZoneScroll" xml:space="preserve">
<value>Scrollwheel</value>
</data>
<data name="AuraZoneUnderglow" xml:space="preserve">
<value>Underglow</value>
</data>
<data name="AutoApply" xml:space="preserve"> <data name="AutoApply" xml:space="preserve">
<value>Auto Apply</value> <value>Auto Apply</value>
</data> </data>

View File

@@ -183,6 +183,9 @@
<data name="AuraFast" xml:space="preserve"> <data name="AuraFast" xml:space="preserve">
<value>Fast</value> <value>Fast</value>
</data> </data>
<data name="AuraLightingMode" xml:space="preserve">
<value>Lighting Mode</value>
</data>
<data name="AuraNormal" xml:space="preserve"> <data name="AuraNormal" xml:space="preserve">
<value>Normal</value> <value>Normal</value>
</data> </data>
@@ -204,6 +207,21 @@
<data name="AuraStrobe" xml:space="preserve"> <data name="AuraStrobe" xml:space="preserve">
<value>Strobe</value> <value>Strobe</value>
</data> </data>
<data name="AuraZoneAll" xml:space="preserve">
<value>All</value>
</data>
<data name="AuraZoneDock" xml:space="preserve">
<value>Dock</value>
</data>
<data name="AuraZoneLogo" xml:space="preserve">
<value>Logo</value>
</data>
<data name="AuraZoneScroll" xml:space="preserve">
<value>Scrollwheel</value>
</data>
<data name="AuraZoneUnderglow" xml:space="preserve">
<value>Underglow</value>
</data>
<data name="AutoApply" xml:space="preserve"> <data name="AutoApply" xml:space="preserve">
<value>Auto Apply</value> <value>Auto Apply</value>
</data> </data>

View File

@@ -183,6 +183,9 @@
<data name="AuraFast" xml:space="preserve"> <data name="AuraFast" xml:space="preserve">
<value>Rapid</value> <value>Rapid</value>
</data> </data>
<data name="AuraLightingMode" xml:space="preserve">
<value>Lighting Mode</value>
</data>
<data name="AuraNormal" xml:space="preserve"> <data name="AuraNormal" xml:space="preserve">
<value>Normal</value> <value>Normal</value>
</data> </data>
@@ -204,6 +207,21 @@
<data name="AuraStrobe" xml:space="preserve"> <data name="AuraStrobe" xml:space="preserve">
<value>Stroboscop</value> <value>Stroboscop</value>
</data> </data>
<data name="AuraZoneAll" xml:space="preserve">
<value>All</value>
</data>
<data name="AuraZoneDock" xml:space="preserve">
<value>Dock</value>
</data>
<data name="AuraZoneLogo" xml:space="preserve">
<value>Logo</value>
</data>
<data name="AuraZoneScroll" xml:space="preserve">
<value>Scrollwheel</value>
</data>
<data name="AuraZoneUnderglow" xml:space="preserve">
<value>Underglow</value>
</data>
<data name="AutoApply" xml:space="preserve"> <data name="AutoApply" xml:space="preserve">
<value>Aplicare automată</value> <value>Aplicare automată</value>
</data> </data>

View File

@@ -183,6 +183,9 @@
<data name="AuraFast" xml:space="preserve"> <data name="AuraFast" xml:space="preserve">
<value>Hızlı</value> <value>Hızlı</value>
</data> </data>
<data name="AuraLightingMode" xml:space="preserve">
<value>Lighting Mode</value>
</data>
<data name="AuraNormal" xml:space="preserve"> <data name="AuraNormal" xml:space="preserve">
<value>Normal</value> <value>Normal</value>
</data> </data>
@@ -204,6 +207,21 @@
<data name="AuraStrobe" xml:space="preserve"> <data name="AuraStrobe" xml:space="preserve">
<value>Flaş</value> <value>Flaş</value>
</data> </data>
<data name="AuraZoneAll" xml:space="preserve">
<value>All</value>
</data>
<data name="AuraZoneDock" xml:space="preserve">
<value>Dock</value>
</data>
<data name="AuraZoneLogo" xml:space="preserve">
<value>Logo</value>
</data>
<data name="AuraZoneScroll" xml:space="preserve">
<value>Scrollwheel</value>
</data>
<data name="AuraZoneUnderglow" xml:space="preserve">
<value>Underglow</value>
</data>
<data name="AutoApply" xml:space="preserve"> <data name="AutoApply" xml:space="preserve">
<value>Auto Apply</value> <value>Auto Apply</value>
</data> </data>

View File

@@ -163,7 +163,7 @@
<value>Кількість запущених сервісів Asus</value> <value>Кількість запущених сервісів Asus</value>
</data> </data>
<data name="AuraBatteryState" xml:space="preserve"> <data name="AuraBatteryState" xml:space="preserve">
<value>Battery State</value> <value>Стан батареї</value>
</data> </data>
<data name="AuraBreathe" xml:space="preserve"> <data name="AuraBreathe" xml:space="preserve">
<value>Дихання</value> <value>Дихання</value>
@@ -183,6 +183,9 @@
<data name="AuraFast" xml:space="preserve"> <data name="AuraFast" xml:space="preserve">
<value>Швидка</value> <value>Швидка</value>
</data> </data>
<data name="AuraLightingMode" xml:space="preserve">
<value>Lighting Mode</value>
</data>
<data name="AuraNormal" xml:space="preserve"> <data name="AuraNormal" xml:space="preserve">
<value>Нормальна</value> <value>Нормальна</value>
</data> </data>
@@ -204,6 +207,21 @@
<data name="AuraStrobe" xml:space="preserve"> <data name="AuraStrobe" xml:space="preserve">
<value>Стробоскоп</value> <value>Стробоскоп</value>
</data> </data>
<data name="AuraZoneAll" xml:space="preserve">
<value>All</value>
</data>
<data name="AuraZoneDock" xml:space="preserve">
<value>Dock</value>
</data>
<data name="AuraZoneLogo" xml:space="preserve">
<value>Logo</value>
</data>
<data name="AuraZoneScroll" xml:space="preserve">
<value>Scrollwheel</value>
</data>
<data name="AuraZoneUnderglow" xml:space="preserve">
<value>Underglow</value>
</data>
<data name="AutoApply" xml:space="preserve"> <data name="AutoApply" xml:space="preserve">
<value>Автоматично</value> <value>Автоматично</value>
</data> </data>
@@ -426,25 +444,25 @@
<value>Minute</value> <value>Minute</value>
</data> </data>
<data name="Minutes" xml:space="preserve"> <data name="Minutes" xml:space="preserve">
<value>Minutes</value> <value>Хвилини</value>
</data> </data>
<data name="MouseAngleSnapping" xml:space="preserve"> <data name="MouseAngleSnapping" xml:space="preserve">
<value>Angle Snapping</value> <value>Привʼязка по куту</value>
</data> </data>
<data name="MouseAutoPowerOff" xml:space="preserve"> <data name="MouseAutoPowerOff" xml:space="preserve">
<value>Auto Power Off After</value> <value>Авто-вимикання</value>
</data> </data>
<data name="MouseLiftOffDistance" xml:space="preserve"> <data name="MouseLiftOffDistance" xml:space="preserve">
<value>Lift Off Distance</value> <value>Відстань підйому</value>
</data> </data>
<data name="MouseLowBatteryWarning" xml:space="preserve"> <data name="MouseLowBatteryWarning" xml:space="preserve">
<value>Low Battery Warning at</value> <value>Попередження про низький заряд</value>
</data> </data>
<data name="MousePerformance" xml:space="preserve"> <data name="MousePerformance" xml:space="preserve">
<value>Performance</value> <value>Performance</value>
</data> </data>
<data name="MouseSynchronize" xml:space="preserve"> <data name="MouseSynchronize" xml:space="preserve">
<value>Synchronize with mouse</value> <value>Синхронізувати з мишею</value>
</data> </data>
<data name="Multizone" xml:space="preserve"> <data name="Multizone" xml:space="preserve">
<value>Мультизони</value> <value>Мультизони</value>
@@ -453,7 +471,7 @@
<value>Вимкнути мікрофон</value> <value>Вимкнути мікрофон</value>
</data> </data>
<data name="Never" xml:space="preserve"> <data name="Never" xml:space="preserve">
<value>Never</value> <value>Ніколи</value>
</data> </data>
<data name="NewUpdates" xml:space="preserve"> <data name="NewUpdates" xml:space="preserve">
<value>Є оновлення</value> <value>Є оновлення</value>
@@ -462,7 +480,7 @@
<value>Немає оновлень</value> <value>Немає оновлень</value>
</data> </data>
<data name="NotConnected" xml:space="preserve"> <data name="NotConnected" xml:space="preserve">
<value>Not Connected</value> <value>Не під'єднано</value>
</data> </data>
<data name="OpenGHelper" xml:space="preserve"> <data name="OpenGHelper" xml:space="preserve">
<value>Відкрити вікно G-Helper</value> <value>Відкрити вікно G-Helper</value>
@@ -486,7 +504,7 @@
<value>Режим</value> <value>Режим</value>
</data> </data>
<data name="Peripherals" xml:space="preserve"> <data name="Peripherals" xml:space="preserve">
<value>Peripherals</value> <value>Периферія</value>
</data> </data>
<data name="PictureGif" xml:space="preserve"> <data name="PictureGif" xml:space="preserve">
<value>Картинка / GIF</value> <value>Картинка / GIF</value>
@@ -495,7 +513,7 @@
<value>Відтворення / Пауза</value> <value>Відтворення / Пауза</value>
</data> </data>
<data name="PollingRate" xml:space="preserve"> <data name="PollingRate" xml:space="preserve">
<value>Polling Rate</value> <value>Частота опитування</value>
</data> </data>
<data name="PowerLimits" xml:space="preserve"> <data name="PowerLimits" xml:space="preserve">
<value>Ліміти Потужності</value> <value>Ліміти Потужності</value>
@@ -507,7 +525,7 @@
<value>Print Screen</value> <value>Print Screen</value>
</data> </data>
<data name="Profile" xml:space="preserve"> <data name="Profile" xml:space="preserve">
<value>Profile</value> <value>Профіль</value>
</data> </data>
<data name="Quit" xml:space="preserve"> <data name="Quit" xml:space="preserve">
<value>Вихід</value> <value>Вихід</value>

View File

@@ -183,6 +183,9 @@
<data name="AuraFast" xml:space="preserve"> <data name="AuraFast" xml:space="preserve">
<value>Nhanh</value> <value>Nhanh</value>
</data> </data>
<data name="AuraLightingMode" xml:space="preserve">
<value>Lighting Mode</value>
</data>
<data name="AuraNormal" xml:space="preserve"> <data name="AuraNormal" xml:space="preserve">
<value>Bình thường</value> <value>Bình thường</value>
</data> </data>
@@ -204,6 +207,21 @@
<data name="AuraStrobe" xml:space="preserve"> <data name="AuraStrobe" xml:space="preserve">
<value>Nhấp nháy</value> <value>Nhấp nháy</value>
</data> </data>
<data name="AuraZoneAll" xml:space="preserve">
<value>All</value>
</data>
<data name="AuraZoneDock" xml:space="preserve">
<value>Dock</value>
</data>
<data name="AuraZoneLogo" xml:space="preserve">
<value>Logo</value>
</data>
<data name="AuraZoneScroll" xml:space="preserve">
<value>Scrollwheel</value>
</data>
<data name="AuraZoneUnderglow" xml:space="preserve">
<value>Underglow</value>
</data>
<data name="AutoApply" xml:space="preserve"> <data name="AutoApply" xml:space="preserve">
<value>Áp dụng tự động</value> <value>Áp dụng tự động</value>
</data> </data>

View File

@@ -163,26 +163,29 @@
<value>正在运行的 Asus 服务</value> <value>正在运行的 Asus 服务</value>
</data> </data>
<data name="AuraBatteryState" xml:space="preserve"> <data name="AuraBatteryState" xml:space="preserve">
<value>Battery State</value> <value>电池状态</value>
</data> </data>
<data name="AuraBreathe" xml:space="preserve"> <data name="AuraBreathe" xml:space="preserve">
<value>呼吸</value> <value>呼吸</value>
</data> </data>
<data name="AuraClockwise" xml:space="preserve"> <data name="AuraClockwise" xml:space="preserve">
<value>Clockwise</value> <value>顺时针</value>
</data> </data>
<data name="AuraColorCycle" xml:space="preserve"> <data name="AuraColorCycle" xml:space="preserve">
<value>彩色循环</value> <value>彩色循环</value>
</data> </data>
<data name="AuraComet" xml:space="preserve"> <data name="AuraComet" xml:space="preserve">
<value>Comet</value> <value>彗星</value>
</data> </data>
<data name="AuraCounterClockwise" xml:space="preserve"> <data name="AuraCounterClockwise" xml:space="preserve">
<value>Counterclockwise</value> <value>逆时针</value>
</data> </data>
<data name="AuraFast" xml:space="preserve"> <data name="AuraFast" xml:space="preserve">
<value>快速</value> <value>快速</value>
</data> </data>
<data name="AuraLightingMode" xml:space="preserve">
<value>Lighting Mode</value>
</data>
<data name="AuraNormal" xml:space="preserve"> <data name="AuraNormal" xml:space="preserve">
<value>正常</value> <value>正常</value>
</data> </data>
@@ -190,10 +193,10 @@
<value>彩虹</value> <value>彩虹</value>
</data> </data>
<data name="AuraRandomColor" xml:space="preserve"> <data name="AuraRandomColor" xml:space="preserve">
<value>Random</value> <value>随机</value>
</data> </data>
<data name="AuraReact" xml:space="preserve"> <data name="AuraReact" xml:space="preserve">
<value>React</value> <value>触发</value>
</data> </data>
<data name="AuraSlow" xml:space="preserve"> <data name="AuraSlow" xml:space="preserve">
<value>慢</value> <value>慢</value>
@@ -204,6 +207,21 @@
<data name="AuraStrobe" xml:space="preserve"> <data name="AuraStrobe" xml:space="preserve">
<value>闪烁</value> <value>闪烁</value>
</data> </data>
<data name="AuraZoneAll" xml:space="preserve">
<value>All</value>
</data>
<data name="AuraZoneDock" xml:space="preserve">
<value>Dock</value>
</data>
<data name="AuraZoneLogo" xml:space="preserve">
<value>Logo</value>
</data>
<data name="AuraZoneScroll" xml:space="preserve">
<value>Scrollwheel</value>
</data>
<data name="AuraZoneUnderglow" xml:space="preserve">
<value>Underglow</value>
</data>
<data name="AutoApply" xml:space="preserve"> <data name="AutoApply" xml:space="preserve">
<value>自动应用</value> <value>自动应用</value>
</data> </data>
@@ -282,10 +300,10 @@
确定还要继续吗?</value> 确定还要继续吗?</value>
</data> </data>
<data name="EnableOptimusTitle" xml:space="preserve"> <data name="EnableOptimusTitle" xml:space="preserve">
<value>nVIDIA显示模式未设置至Optimus</value> <value>NVIDIA 显示模式未设置为自动切换</value>
</data> </data>
<data name="EnergySettings" xml:space="preserve"> <data name="EnergySettings" xml:space="preserve">
<value>Energy Settings</value> <value>电源设置</value>
</data> </data>
<data name="Extra" xml:space="preserve"> <data name="Extra" xml:space="preserve">
<value>更多</value> <value>更多</value>
@@ -318,7 +336,7 @@
<value>风扇</value> <value>风扇</value>
</data> </data>
<data name="FansPower" xml:space="preserve"> <data name="FansPower" xml:space="preserve">
<value>高级设置</value> <value>风扇 + 电源</value>
</data> </data>
<data name="FnLock" xml:space="preserve"> <data name="FnLock" xml:space="preserve">
<value>打开FnLock (无需按下FN使用FN+(F1-F12)热键)</value> <value>打开FnLock (无需按下FN使用FN+(F1-F12)热键)</value>
@@ -354,7 +372,7 @@
<value>温度目标</value> <value>温度目标</value>
</data> </data>
<data name="High" xml:space="preserve"> <data name="High" xml:space="preserve">
<value>High</value> <value></value>
</data> </data>
<data name="KeyBindings" xml:space="preserve"> <data name="KeyBindings" xml:space="preserve">
<value>按键绑定</value> <value>按键绑定</value>
@@ -381,13 +399,13 @@
<value>灯条</value> <value>灯条</value>
</data> </data>
<data name="Lighting" xml:space="preserve"> <data name="Lighting" xml:space="preserve">
<value>Lighting</value> <value>背光</value>
</data> </data>
<data name="Logo" xml:space="preserve"> <data name="Logo" xml:space="preserve">
<value>徽标</value> <value>徽标</value>
</data> </data>
<data name="Low" xml:space="preserve"> <data name="Low" xml:space="preserve">
<value>Low</value> <value></value>
</data> </data>
<data name="MatrixAudio" xml:space="preserve"> <data name="MatrixAudio" xml:space="preserve">
<value>音频可视化器</value> <value>音频可视化器</value>
@@ -423,28 +441,28 @@
<value>调整刷新率为60Hz以节省电量</value> <value>调整刷新率为60Hz以节省电量</value>
</data> </data>
<data name="Minute" xml:space="preserve"> <data name="Minute" xml:space="preserve">
<value>Minute</value> <value>分钟</value>
</data> </data>
<data name="Minutes" xml:space="preserve"> <data name="Minutes" xml:space="preserve">
<value>Minutes</value> <value>分组</value>
</data> </data>
<data name="MouseAngleSnapping" xml:space="preserve"> <data name="MouseAngleSnapping" xml:space="preserve">
<value>Angle Snapping</value> <value>角度校正</value>
</data> </data>
<data name="MouseAutoPowerOff" xml:space="preserve"> <data name="MouseAutoPowerOff" xml:space="preserve">
<value>Auto Power Off After</value> <value>自动关闭时间</value>
</data> </data>
<data name="MouseLiftOffDistance" xml:space="preserve"> <data name="MouseLiftOffDistance" xml:space="preserve">
<value>Lift Off Distance</value> <value>静默高度</value>
</data> </data>
<data name="MouseLowBatteryWarning" xml:space="preserve"> <data name="MouseLowBatteryWarning" xml:space="preserve">
<value>Low Battery Warning at</value> <value>低于该电量时警告</value>
</data> </data>
<data name="MousePerformance" xml:space="preserve"> <data name="MousePerformance" xml:space="preserve">
<value>Performance</value> <value>性能</value>
</data> </data>
<data name="MouseSynchronize" xml:space="preserve"> <data name="MouseSynchronize" xml:space="preserve">
<value>Synchronize with mouse</value> <value>和鼠标同步</value>
</data> </data>
<data name="Multizone" xml:space="preserve"> <data name="Multizone" xml:space="preserve">
<value>多区域设置</value> <value>多区域设置</value>
@@ -453,7 +471,7 @@
<value>静音麦克风</value> <value>静音麦克风</value>
</data> </data>
<data name="Never" xml:space="preserve"> <data name="Never" xml:space="preserve">
<value>Never</value> <value>从不</value>
</data> </data>
<data name="NewUpdates" xml:space="preserve"> <data name="NewUpdates" xml:space="preserve">
<value>有更新</value> <value>有更新</value>
@@ -462,7 +480,7 @@
<value>无更新</value> <value>无更新</value>
</data> </data>
<data name="NotConnected" xml:space="preserve"> <data name="NotConnected" xml:space="preserve">
<value>Not Connected</value> <value>未连接</value>
</data> </data>
<data name="OpenGHelper" xml:space="preserve"> <data name="OpenGHelper" xml:space="preserve">
<value>打开G-Helper窗口</value> <value>打开G-Helper窗口</value>
@@ -480,13 +498,13 @@
<value>其他</value> <value>其他</value>
</data> </data>
<data name="Overdrive" xml:space="preserve"> <data name="Overdrive" xml:space="preserve">
<value>OD</value> <value>超频</value>
</data> </data>
<data name="PerformanceMode" xml:space="preserve"> <data name="PerformanceMode" xml:space="preserve">
<value>性能模式</value> <value>性能模式</value>
</data> </data>
<data name="Peripherals" xml:space="preserve"> <data name="Peripherals" xml:space="preserve">
<value>Peripherals</value> <value>外设</value>
</data> </data>
<data name="PictureGif" xml:space="preserve"> <data name="PictureGif" xml:space="preserve">
<value>图片/动图</value> <value>图片/动图</value>
@@ -495,7 +513,7 @@
<value>播放/暂停</value> <value>播放/暂停</value>
</data> </data>
<data name="PollingRate" xml:space="preserve"> <data name="PollingRate" xml:space="preserve">
<value>Polling Rate</value> <value>回报率</value>
</data> </data>
<data name="PowerLimits" xml:space="preserve"> <data name="PowerLimits" xml:space="preserve">
<value>功率限制</value> <value>功率限制</value>
@@ -507,7 +525,7 @@
<value>截图</value> <value>截图</value>
</data> </data>
<data name="Profile" xml:space="preserve"> <data name="Profile" xml:space="preserve">
<value>Profile</value> <value>配置</value>
</data> </data>
<data name="Quit" xml:space="preserve"> <data name="Quit" xml:space="preserve">
<value>退出</value> <value>退出</value>
@@ -564,7 +582,7 @@
<value>切换 Aura 模式</value> <value>切换 Aura 模式</value>
</data> </data>
<data name="ToggleClamshellMode" xml:space="preserve"> <data name="ToggleClamshellMode" xml:space="preserve">
<value>自动启用外接显示器模式</value> <value>自动切换合盖模式</value>
</data> </data>
<data name="ToggleFnLock" xml:space="preserve"> <data name="ToggleFnLock" xml:space="preserve">
<value>切换 Fn 锁定</value> <value>切换 Fn 锁定</value>

View File

@@ -163,26 +163,29 @@
<value>執行中的華碩服務</value> <value>執行中的華碩服務</value>
</data> </data>
<data name="AuraBatteryState" xml:space="preserve"> <data name="AuraBatteryState" xml:space="preserve">
<value>Battery State</value> <value>電池狀態</value>
</data> </data>
<data name="AuraBreathe" xml:space="preserve"> <data name="AuraBreathe" xml:space="preserve">
<value>呼吸</value> <value>呼吸</value>
</data> </data>
<data name="AuraClockwise" xml:space="preserve"> <data name="AuraClockwise" xml:space="preserve">
<value>Clockwise</value> <value>順時針</value>
</data> </data>
<data name="AuraColorCycle" xml:space="preserve"> <data name="AuraColorCycle" xml:space="preserve">
<value>循環</value> <value>循環</value>
</data> </data>
<data name="AuraComet" xml:space="preserve"> <data name="AuraComet" xml:space="preserve">
<value>Comet</value> <value>彗星</value>
</data> </data>
<data name="AuraCounterClockwise" xml:space="preserve"> <data name="AuraCounterClockwise" xml:space="preserve">
<value>Counterclockwise</value> <value>逆時針</value>
</data> </data>
<data name="AuraFast" xml:space="preserve"> <data name="AuraFast" xml:space="preserve">
<value>快速</value> <value>快速</value>
</data> </data>
<data name="AuraLightingMode" xml:space="preserve">
<value>Lighting Mode</value>
</data>
<data name="AuraNormal" xml:space="preserve"> <data name="AuraNormal" xml:space="preserve">
<value>正常</value> <value>正常</value>
</data> </data>
@@ -190,10 +193,10 @@
<value>彩虹</value> <value>彩虹</value>
</data> </data>
<data name="AuraRandomColor" xml:space="preserve"> <data name="AuraRandomColor" xml:space="preserve">
<value>Random</value> <value>隨機</value>
</data> </data>
<data name="AuraReact" xml:space="preserve"> <data name="AuraReact" xml:space="preserve">
<value>React</value> <value>觸發</value>
</data> </data>
<data name="AuraSlow" xml:space="preserve"> <data name="AuraSlow" xml:space="preserve">
<value>慢</value> <value>慢</value>
@@ -204,6 +207,21 @@
<data name="AuraStrobe" xml:space="preserve"> <data name="AuraStrobe" xml:space="preserve">
<value>閃爍</value> <value>閃爍</value>
</data> </data>
<data name="AuraZoneAll" xml:space="preserve">
<value>All</value>
</data>
<data name="AuraZoneDock" xml:space="preserve">
<value>Dock</value>
</data>
<data name="AuraZoneLogo" xml:space="preserve">
<value>Logo</value>
</data>
<data name="AuraZoneScroll" xml:space="preserve">
<value>Scrollwheel</value>
</data>
<data name="AuraZoneUnderglow" xml:space="preserve">
<value>Underglow</value>
</data>
<data name="AutoApply" xml:space="preserve"> <data name="AutoApply" xml:space="preserve">
<value>自動套用</value> <value>自動套用</value>
</data> </data>
@@ -285,7 +303,7 @@
<value>Nvidia顯示模式未設置為自動切換</value> <value>Nvidia顯示模式未設置為自動切換</value>
</data> </data>
<data name="EnergySettings" xml:space="preserve"> <data name="EnergySettings" xml:space="preserve">
<value>Energy Settings</value> <value>電源設定</value>
</data> </data>
<data name="Extra" xml:space="preserve"> <data name="Extra" xml:space="preserve">
<value>更多</value> <value>更多</value>
@@ -354,7 +372,7 @@
<value>GPU溫度上限</value> <value>GPU溫度上限</value>
</data> </data>
<data name="High" xml:space="preserve"> <data name="High" xml:space="preserve">
<value>High</value> <value></value>
</data> </data>
<data name="KeyBindings" xml:space="preserve"> <data name="KeyBindings" xml:space="preserve">
<value>按鍵綁定</value> <value>按鍵綁定</value>
@@ -381,13 +399,13 @@
<value>燈條</value> <value>燈條</value>
</data> </data>
<data name="Lighting" xml:space="preserve"> <data name="Lighting" xml:space="preserve">
<value>Lighting</value> <value>亮度</value>
</data> </data>
<data name="Logo" xml:space="preserve"> <data name="Logo" xml:space="preserve">
<value>Logo</value> <value>Logo</value>
</data> </data>
<data name="Low" xml:space="preserve"> <data name="Low" xml:space="preserve">
<value>Low</value> <value></value>
</data> </data>
<data name="MatrixAudio" xml:space="preserve"> <data name="MatrixAudio" xml:space="preserve">
<value>音效視覺化</value> <value>音效視覺化</value>
@@ -423,28 +441,28 @@
<value>維持60Hz以節省電量</value> <value>維持60Hz以節省電量</value>
</data> </data>
<data name="Minute" xml:space="preserve"> <data name="Minute" xml:space="preserve">
<value>Minute</value> <value>分鐘</value>
</data> </data>
<data name="Minutes" xml:space="preserve"> <data name="Minutes" xml:space="preserve">
<value>Minutes</value> <value>分鐘</value>
</data> </data>
<data name="MouseAngleSnapping" xml:space="preserve"> <data name="MouseAngleSnapping" xml:space="preserve">
<value>Angle Snapping</value> <value>角度修正</value>
</data> </data>
<data name="MouseAutoPowerOff" xml:space="preserve"> <data name="MouseAutoPowerOff" xml:space="preserve">
<value>Auto Power Off After</value> <value>自動關閉電源</value>
</data> </data>
<data name="MouseLiftOffDistance" xml:space="preserve"> <data name="MouseLiftOffDistance" xml:space="preserve">
<value>Lift Off Distance</value> <value>響應高度(LOD)</value>
</data> </data>
<data name="MouseLowBatteryWarning" xml:space="preserve"> <data name="MouseLowBatteryWarning" xml:space="preserve">
<value>Low Battery Warning at</value> <value>低電量警告</value>
</data> </data>
<data name="MousePerformance" xml:space="preserve"> <data name="MousePerformance" xml:space="preserve">
<value>Performance</value> <value>性能設定</value>
</data> </data>
<data name="MouseSynchronize" xml:space="preserve"> <data name="MouseSynchronize" xml:space="preserve">
<value>Synchronize with mouse</value> <value>與滑鼠同步</value>
</data> </data>
<data name="Multizone" xml:space="preserve"> <data name="Multizone" xml:space="preserve">
<value>多區域</value> <value>多區域</value>
@@ -453,7 +471,7 @@
<value>麥克風開關</value> <value>麥克風開關</value>
</data> </data>
<data name="Never" xml:space="preserve"> <data name="Never" xml:space="preserve">
<value>Never</value> <value>永不</value>
</data> </data>
<data name="NewUpdates" xml:space="preserve"> <data name="NewUpdates" xml:space="preserve">
<value>新的更新</value> <value>新的更新</value>
@@ -462,7 +480,7 @@
<value>沒有新的更新</value> <value>沒有新的更新</value>
</data> </data>
<data name="NotConnected" xml:space="preserve"> <data name="NotConnected" xml:space="preserve">
<value>Not Connected</value> <value>未連線</value>
</data> </data>
<data name="OpenGHelper" xml:space="preserve"> <data name="OpenGHelper" xml:space="preserve">
<value>開啟G-Helper視窗</value> <value>開啟G-Helper視窗</value>
@@ -486,7 +504,7 @@
<value>性能模式:</value> <value>性能模式:</value>
</data> </data>
<data name="Peripherals" xml:space="preserve"> <data name="Peripherals" xml:space="preserve">
<value>Peripherals</value> <value>週邊設備</value>
</data> </data>
<data name="PictureGif" xml:space="preserve"> <data name="PictureGif" xml:space="preserve">
<value>圖片/動圖</value> <value>圖片/動圖</value>
@@ -495,7 +513,7 @@
<value>播放/暫停</value> <value>播放/暫停</value>
</data> </data>
<data name="PollingRate" xml:space="preserve"> <data name="PollingRate" xml:space="preserve">
<value>Polling Rate</value> <value>輪循率</value>
</data> </data>
<data name="PowerLimits" xml:space="preserve"> <data name="PowerLimits" xml:space="preserve">
<value>功率限制</value> <value>功率限制</value>
@@ -507,7 +525,7 @@
<value>截圖</value> <value>截圖</value>
</data> </data>
<data name="Profile" xml:space="preserve"> <data name="Profile" xml:space="preserve">
<value>Profile</value> <value>設定檔</value>
</data> </data>
<data name="Quit" xml:space="preserve"> <data name="Quit" xml:space="preserve">
<value>退出</value> <value>退出</value>

View File

@@ -1207,6 +1207,7 @@ namespace GHelper
panelPeripherals.Padding = new Padding(20, 20, 20, 10); panelPeripherals.Padding = new Padding(20, 20, 20, 10);
panelPeripherals.Size = new Size(827, 198); panelPeripherals.Size = new Size(827, 198);
panelPeripherals.TabIndex = 4; panelPeripherals.TabIndex = 4;
panelPeripherals.Visible = false;
// //
// tableLayoutPeripherals // tableLayoutPeripherals
// //

View File

@@ -188,6 +188,10 @@ namespace GHelper
buttonPeripheral2.Click += ButtonPeripheral_Click; buttonPeripheral2.Click += ButtonPeripheral_Click;
buttonPeripheral3.Click += ButtonPeripheral_Click; buttonPeripheral3.Click += ButtonPeripheral_Click;
buttonPeripheral1.MouseEnter += ButtonPeripheral_MouseEnter;
buttonPeripheral2.MouseEnter += ButtonPeripheral_MouseEnter;
buttonPeripheral3.MouseEnter += ButtonPeripheral_MouseEnter;
Text = "G-Helper " + (ProcessHelper.IsUserAdministrator() ? "—" : "-") + " " + AppConfig.GetModelShort(); Text = "G-Helper " + (ProcessHelper.IsUserAdministrator() ? "—" : "-") + " " + AppConfig.GetModelShort();
TopMost = AppConfig.Is("topmost"); TopMost = AppConfig.Is("topmost");
@@ -236,10 +240,16 @@ namespace GHelper
{ {
screenControl.InitScreen(); screenControl.InitScreen();
gpuControl.InitXGM(); gpuControl.InitXGM();
Task.Run((Action)RefreshPeripheralsBattery);
updateControl.CheckForUpdates(); updateControl.CheckForUpdates();
} }
} }
private void RefreshPeripheralsBattery()
{
PeripheralsProvider.RefreshBatteryForAllDevices(true);
}
private void ButtonUpdates_Click(object? sender, EventArgs e) private void ButtonUpdates_Click(object? sender, EventArgs e)
{ {
if (updates == null || updates.Text == "") if (updates == null || updates.Text == "")
@@ -524,7 +534,7 @@ namespace GHelper
private void LabelCPUFan_Click(object? sender, EventArgs e) private void LabelCPUFan_Click(object? sender, EventArgs e)
{ {
AppConfig.Set("fan_rpm", (AppConfig.Get("fan_rpm") == 1) ? 0 : 1); HardwareControl.fanRpm = !HardwareControl.fanRpm;
RefreshSensors(true); RefreshSensors(true);
} }
@@ -631,7 +641,7 @@ namespace GHelper
if (AppConfig.ContainsModel("GA401I")) if (AppConfig.ContainsModel("GA401I"))
{ {
panelKeyboard.Visible = false; comboKeyboard.Visible = false;
} }
VisualiseAura(); VisualiseAura();
@@ -762,6 +772,7 @@ namespace GHelper
this.Hide(); this.Hide();
if (fans != null && fans.Text != "") fans.Close(); if (fans != null && fans.Text != "") fans.Close();
if (keyb != null && keyb.Text != "") keyb.Close(); if (keyb != null && keyb.Text != "") keyb.Close();
if (updates != null && updates.Text != "") updates.Close();
} }
@@ -813,6 +824,7 @@ namespace GHelper
string battery = ""; string battery = "";
HardwareControl.ReadSensors(); HardwareControl.ReadSensors();
Task.Run((Action)PeripheralsProvider.RefreshBatteryForAllDevices);
if (HardwareControl.cpuTemp > 0) if (HardwareControl.cpuTemp > 0)
cpuTemp = ": " + Math.Round((decimal)HardwareControl.cpuTemp).ToString() + "°C"; cpuTemp = ": " + Math.Round((decimal)HardwareControl.cpuTemp).ToString() + "°C";
@@ -823,14 +835,11 @@ namespace GHelper
battery = Properties.Strings.Charging + ": " + Math.Round((decimal)HardwareControl.batteryRate, 1).ToString() + "W"; battery = Properties.Strings.Charging + ": " + Math.Round((decimal)HardwareControl.batteryRate, 1).ToString() + "W";
if (HardwareControl.gpuTemp > 0) if (HardwareControl.gpuTemp > 0)
{ {
gpuTemp = $": {HardwareControl.gpuTemp}°C"; gpuTemp = $": {HardwareControl.gpuTemp}°C";
} }
PeripheralsProvider.RefreshBatteryForAllDevices();
Program.settingsForm.BeginInvoke(delegate Program.settingsForm.BeginInvoke(delegate
{ {
labelCPUFan.Text = "CPU" + cpuTemp + " " + HardwareControl.cpuFan; labelCPUFan.Text = "CPU" + cpuTemp + " " + HardwareControl.cpuFan;
@@ -839,7 +848,6 @@ namespace GHelper
labelMidFan.Text = "Mid " + HardwareControl.midFan; labelMidFan.Text = "Mid " + HardwareControl.midFan;
if (!batteryMouseOver) labelBattery.Text = battery; if (!batteryMouseOver) labelBattery.Text = battery;
VisualizePeripherals();
}); });
string trayTip = "CPU" + cpuTemp + " " + HardwareControl.cpuFan; string trayTip = "CPU" + cpuTemp + " " + HardwareControl.cpuFan;
@@ -1096,13 +1104,11 @@ namespace GHelper
{ {
b.Text = m.GetDisplayName() + "\n" + m.Battery + "%" b.Text = m.GetDisplayName() + "\n" + m.Battery + "%"
+ (m.Charging ? "(" + Properties.Strings.Charging + ")" : ""); + (m.Charging ? "(" + Properties.Strings.Charging + ")" : "");
b.Enabled = true;
} }
else else
{ {
//Mouse is either not connected or in standby //Mouse is either not connected or in standby
b.Text = m.GetDisplayName() + "\n(" + Properties.Strings.NotConnected + ")"; b.Text = m.GetDisplayName() + "\n(" + Properties.Strings.NotConnected + ")";
b.Enabled = false;
} }
switch (m.DeviceType()) switch (m.DeviceType())
@@ -1127,6 +1133,26 @@ namespace GHelper
panelPeripherals.Visible = true; panelPeripherals.Visible = true;
} }
private void ButtonPeripheral_MouseEnter(object? sender, EventArgs e)
{
int index = 0;
if (sender == buttonPeripheral2) index = 1;
if (sender == buttonPeripheral3) index = 2;
IPeripheral iph = PeripheralsProvider.AllPeripherals().ElementAt(index);
if (iph is null)
{
return;
}
if (!iph.IsDeviceReady)
{
//Refresh battery on hover if the device is marked as "Not Ready"
iph.ReadBattery();
}
}
private void ButtonPeripheral_Click(object? sender, EventArgs e) private void ButtonPeripheral_Click(object? sender, EventArgs e)
{ {
int index = 0; int index = 0;
@@ -1144,7 +1170,7 @@ namespace GHelper
if (iph.DeviceType() == PeripheralType.Mouse) if (iph.DeviceType() == PeripheralType.Mouse)
{ {
AsusMouse? am = iph as AsusMouse; AsusMouse? am = iph as AsusMouse;
if (am is null) if (am is null || !am.IsDeviceReady)
{ {
//Should not happen if all device classes are implemented correctly. But better safe than sorry. //Should not happen if all device classes are implemented correctly. But better safe than sorry.
return; return;