From d2e0e6f51e58119557d920d7dd95605917d925c0 Mon Sep 17 00:00:00 2001
From: Serge <5920850+seerge@users.noreply.github.com>
Date: Sun, 11 Jun 2023 17:09:17 +0200
Subject: [PATCH] Colors for custom modes
---
app/InputDispatcher.cs | 4 ++++
app/Properties/Strings.Designer.cs | 4 ++--
app/Properties/Strings.resx | 4 ++--
app/Settings.cs | 22 +++++++++++++++++-----
4 files changed, 25 insertions(+), 9 deletions(-)
diff --git a/app/InputDispatcher.cs b/app/InputDispatcher.cs
index afb294d6..386d5070 100644
--- a/app/InputDispatcher.cs
+++ b/app/InputDispatcher.cs
@@ -312,6 +312,7 @@ namespace GHelper
KeyboardHook.KeyPress(Keys.Snapshot);
break;
case "screen":
+ Logger.WriteLine("Screen off toggle");
NativeMethods.TurnOffScreen(Program.settingsForm.Handle);
break;
case "miniled":
@@ -423,6 +424,9 @@ namespace GHelper
case 199: // ON Z13 - FN+F11 - cycles backlight
SetBacklight(4);
break;
+ case 53: // FN+F6 on GA-502DU model
+ KeyProcess("screen");
+ return;
}
if (OptimizationService.IsRunning()) return;
diff --git a/app/Properties/Strings.Designer.cs b/app/Properties/Strings.Designer.cs
index 9f696381..bfba75f1 100644
--- a/app/Properties/Strings.Designer.cs
+++ b/app/Properties/Strings.Designer.cs
@@ -943,7 +943,7 @@ namespace GHelper.Properties {
}
///
- /// Looks up a localized string similar to Power Limits (PPT).
+ /// Looks up a localized string similar to Power Limits.
///
internal static string PowerLimits {
get {
@@ -952,7 +952,7 @@ namespace GHelper.Properties {
}
///
- /// Looks up a localized string similar to Power Limits (PPT) is experimental feature. Use carefully and on your own risk!.
+ /// Looks up a localized string similar to Power Limits is experimental feature. Use carefully and on your own risk!.
///
internal static string PPTExperimental {
get {
diff --git a/app/Properties/Strings.resx b/app/Properties/Strings.resx
index a64178cc..3e0175d1 100644
--- a/app/Properties/Strings.resx
+++ b/app/Properties/Strings.resx
@@ -412,10 +412,10 @@
Play / Pause
- Power Limits (PPT)
+ Power Limits
- Power Limits (PPT) is experimental feature. Use carefully and on your own risk!
+ Power Limits is experimental feature. Use carefully and on your own risk!
PrintScreen
diff --git a/app/Settings.cs b/app/Settings.cs
index 3b14b368..2b34cc34 100644
--- a/app/Settings.cs
+++ b/app/Settings.cs
@@ -1282,16 +1282,28 @@ namespace GHelper
menuBalanced.Checked = true;
break;
default:
- if (!Modes.Exists(mode))
+ if (Modes.Exists(mode))
+ {
+ buttonFans.Activated = true;
+ switch (Modes.GetBase(mode))
+ {
+ case AsusACPI.PerformanceSilent:
+ buttonFans.BorderColor = colorEco;
+ break;
+ case AsusACPI.PerformanceTurbo:
+ buttonFans.BorderColor = colorTurbo;
+ break;
+ default:
+ buttonFans.BorderColor = colorStandard;
+ break;
+ }
+ }
+ else
{
buttonBalanced.Activated = true;
menuBalanced.Checked = true;
mode = AsusACPI.PerformanceBalanced;
}
- else
- {
- buttonFans.Activated = true;
- }
break;
}