mirror of
https://github.com/jkocon/g-helper.git
synced 2026-02-23 13:00:52 +01:00
Compare commits
41 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ebb8de4103 | ||
|
|
8a4d553591 | ||
|
|
c25ec71104 | ||
|
|
6a9cf45490 | ||
|
|
11da574c48 | ||
|
|
98a22802a0 | ||
|
|
5594be868b | ||
|
|
13c2e725fa | ||
|
|
11e0dc2df3 | ||
|
|
6758bde975 | ||
|
|
ed92dd236f | ||
|
|
3fc5d6a124 | ||
|
|
351566e24a | ||
|
|
65b40a4f7a | ||
|
|
e2a8688581 | ||
|
|
9445c1c60b | ||
|
|
9be602b230 | ||
|
|
2f83ae7cf6 | ||
|
|
ead49d117e | ||
|
|
9c0e2b4123 | ||
|
|
0355ca1420 | ||
|
|
b5274ae9be | ||
|
|
0fc261cfa7 | ||
|
|
efa2f0760a | ||
|
|
822391c98f | ||
|
|
22ffa19114 | ||
|
|
af90645d6d | ||
|
|
a5590a9ed6 | ||
|
|
ed8f056c6e | ||
|
|
0b2c962386 | ||
|
|
77e63f7703 | ||
|
|
8e686aded3 | ||
|
|
f866f724b2 | ||
|
|
29408c4256 | ||
|
|
c77a87f435 | ||
|
|
66a1774d78 | ||
|
|
2532aadb13 | ||
|
|
2ba6c9de20 | ||
|
|
e6938ea5cf | ||
|
|
5bf60e24b5 | ||
|
|
731a6c845f |
@@ -406,7 +406,7 @@ public static class AppConfig
|
||||
|
||||
public static bool IsOLED()
|
||||
{
|
||||
return ContainsModel("OLED") || IsSlash() || ContainsModel("M7600") || ContainsModel("UX64") || ContainsModel("UX34") || ContainsModel("UX53") || ContainsModel("K360") || ContainsModel("X150") || ContainsModel("M350") || ContainsModel("K650") || ContainsModel("UM53") || ContainsModel("K660") || ContainsModel("UX84") || ContainsModel("M650") || ContainsModel("K340");
|
||||
return ContainsModel("OLED") || IsSlash() || ContainsModel("M7600") || ContainsModel("UX64") || ContainsModel("UX34") || ContainsModel("UX53") || ContainsModel("K360") || ContainsModel("X150") || ContainsModel("M350") || ContainsModel("K650") || ContainsModel("UM53") || ContainsModel("K660") || ContainsModel("UX84") || ContainsModel("M650") || ContainsModel("K340") || ContainsModel("K350");
|
||||
}
|
||||
|
||||
public static bool IsNoOverdrive()
|
||||
@@ -442,7 +442,7 @@ public static class AppConfig
|
||||
|
||||
public static bool IsNoDirectRGB()
|
||||
{
|
||||
return ContainsModel("GA503") || ContainsModel("G533Q") || IsSlash();
|
||||
return ContainsModel("GA503") || ContainsModel("G533Q") || ContainsModel("GU502") || IsSlash();
|
||||
}
|
||||
|
||||
public static bool IsStrixNumpad()
|
||||
@@ -535,7 +535,10 @@ public static class AppConfig
|
||||
try
|
||||
{
|
||||
var (bios, model) = GetBiosAndModel();
|
||||
return (Int32.Parse(bios) == 317 || Int32.Parse(bios) == 316);
|
||||
var biosVersion = Int32.Parse(bios);
|
||||
if (ContainsModel("GA503RM") && biosVersion == 317) return true;
|
||||
if ((ContainsModel("GA503RS") || ContainsModel("GA503RW")) && biosVersion == 316) return true;
|
||||
return false;
|
||||
}
|
||||
catch
|
||||
{
|
||||
|
||||
@@ -1,4 +1,7 @@
|
||||
namespace GHelper.Battery
|
||||
using GHelper.Helpers;
|
||||
using System.Diagnostics;
|
||||
|
||||
namespace GHelper.Battery
|
||||
{
|
||||
internal class BatteryControl
|
||||
{
|
||||
@@ -42,5 +45,25 @@
|
||||
Program.settingsForm.VisualiseBattery(limit);
|
||||
}
|
||||
|
||||
public static void BatteryReport()
|
||||
{
|
||||
var reportDir = Environment.GetFolderPath(Environment.SpecialFolder.UserProfile);
|
||||
|
||||
try
|
||||
{
|
||||
var cmd = new Process();
|
||||
cmd.StartInfo.WorkingDirectory = reportDir;
|
||||
cmd.StartInfo.UseShellExecute = false;
|
||||
cmd.StartInfo.CreateNoWindow = true;
|
||||
cmd.StartInfo.FileName = "powershell";
|
||||
cmd.StartInfo.Arguments = "powercfg /batteryreport; explorer battery-report.html";
|
||||
cmd.Start();
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Logger.WriteLine(ex.Message);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6,7 +6,7 @@ namespace GHelper.Display
|
||||
public class ScreenCCD
|
||||
{
|
||||
|
||||
public static bool GetHDRStatus(bool log = false)
|
||||
public static bool GetHDRStatus(bool log = true)
|
||||
{
|
||||
var err = GetDisplayConfigBufferSizes(QDC.QDC_ONLY_ACTIVE_PATHS, out var pathCount, out var modeCount);
|
||||
if (err != 0)
|
||||
@@ -46,8 +46,8 @@ namespace GHelper.Display
|
||||
info.outputTechnology == DISPLAYCONFIG_VIDEO_OUTPUT_TECHNOLOGY.DISPLAYCONFIG_OUTPUT_TECHNOLOGY_DISPLAYPORT_EMBEDDED ||
|
||||
info.monitorFriendlyDeviceName == internalName)
|
||||
{
|
||||
if (log) Logger.WriteLine(info.monitorFriendlyDeviceName + " HDR: " + colorInfo.advancedColorEnabled);
|
||||
return colorInfo.advancedColorEnabled;
|
||||
if (log) Logger.WriteLine(info.monitorFriendlyDeviceName + " HDR: " + colorInfo.advancedColorEnabled + " " + colorInfo.bitsPerColorChannel + " " + colorInfo.value + " " + colorInfo.wideColorEnforced);
|
||||
return colorInfo.advancedColorEnabled && (colorInfo.bitsPerColorChannel > 8 || !colorInfo.wideColorEnforced);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -5,6 +5,10 @@ namespace GHelper.Display
|
||||
{
|
||||
public enum SplendidGamut : int
|
||||
{
|
||||
VivoNative = 0,
|
||||
VivoSRGB = 1,
|
||||
VivoDCIP3 = 3,
|
||||
ViviDisplayP3 = 4,
|
||||
Native = 50,
|
||||
sRGB = 51,
|
||||
DCIP3 = 53,
|
||||
@@ -15,6 +19,11 @@ namespace GHelper.Display
|
||||
{
|
||||
None = -1,
|
||||
|
||||
VivoNormal = 1,
|
||||
VivoVivid = 2,
|
||||
VivoManual = 6,
|
||||
VivoEycare = 7,
|
||||
|
||||
Init = 10,
|
||||
DimmingAsus = 9,
|
||||
DimmingVisual = 19,
|
||||
@@ -40,6 +49,8 @@ namespace GHelper.Display
|
||||
private static System.Timers.Timer brightnessTimer = new System.Timers.Timer(200);
|
||||
|
||||
public const int DefaultColorTemp = 50;
|
||||
|
||||
public static bool forceVisual = false;
|
||||
static VisualControl()
|
||||
{
|
||||
brightnessTimer.Elapsed += BrightnessTimerTimer_Elapsed;
|
||||
@@ -50,29 +61,39 @@ namespace GHelper.Display
|
||||
return Environment.GetFolderPath(Environment.SpecialFolder.CommonApplicationData) + "\\ASUS\\GameVisual";
|
||||
}
|
||||
|
||||
public static string GetVivobookPath()
|
||||
{
|
||||
return Environment.GetFolderPath(Environment.SpecialFolder.CommonApplicationData) + "\\ASUS\\ASUS System Control Interface\\ASUSOptimization\\Splendid";
|
||||
}
|
||||
|
||||
public static Dictionary<SplendidGamut, string> GetGamutModes()
|
||||
{
|
||||
|
||||
bool isVivo = AppConfig.IsVivoZenbook();
|
||||
|
||||
Dictionary<SplendidGamut, string> _modes = new Dictionary<SplendidGamut, string>();
|
||||
|
||||
string gameVisualPath = GetGameVisualPath();
|
||||
if (!Directory.Exists(gameVisualPath))
|
||||
string iccPath = isVivo ? GetVivobookPath() : GetGameVisualPath();
|
||||
|
||||
if (!Directory.Exists(iccPath))
|
||||
{
|
||||
Logger.WriteLine(gameVisualPath + " doesn't exit");
|
||||
Logger.WriteLine(iccPath + " doesn't exit");
|
||||
return _modes;
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
DirectoryInfo d = new DirectoryInfo(GetGameVisualPath());
|
||||
DirectoryInfo d = new DirectoryInfo(iccPath);
|
||||
FileInfo[] icms = d.GetFiles("*.icm");
|
||||
if (icms.Length == 0) return _modes;
|
||||
|
||||
_modes.Add(SplendidGamut.Native, "Gamut: Native");
|
||||
_modes.Add(isVivo ? SplendidGamut.VivoNative : SplendidGamut.Native, "Gamut: Native");
|
||||
foreach (FileInfo icm in icms)
|
||||
{
|
||||
if (icm.Name.Contains("sRGB")) _modes.Add(SplendidGamut.sRGB, "Gamut: sRGB");
|
||||
if (icm.Name.Contains("DCIP3")) _modes.Add(SplendidGamut.DCIP3, "Gamut: DCIP3");
|
||||
if (icm.Name.Contains("DisplayP3")) _modes.Add(SplendidGamut.DisplayP3, "Gamut: DisplayP3");
|
||||
//Logger.WriteLine(icm.FullName);
|
||||
if (icm.Name.Contains("sRGB")) _modes.Add(isVivo ? SplendidGamut.VivoSRGB : SplendidGamut.sRGB, "Gamut: sRGB");
|
||||
if (icm.Name.Contains("DCIP3")) _modes.Add(isVivo ? SplendidGamut.VivoDCIP3 : SplendidGamut.DCIP3, "Gamut: DCIP3");
|
||||
if (icm.Name.Contains("DisplayP3")) _modes.Add(isVivo ? SplendidGamut.ViviDisplayP3 : SplendidGamut.DisplayP3, "Gamut: DisplayP3");
|
||||
}
|
||||
return _modes;
|
||||
}
|
||||
@@ -85,6 +106,18 @@ namespace GHelper.Display
|
||||
|
||||
public static Dictionary<SplendidCommand, string> GetVisualModes()
|
||||
{
|
||||
|
||||
if (AppConfig.IsVivoZenbook())
|
||||
{
|
||||
return new Dictionary<SplendidCommand, string>
|
||||
{
|
||||
{ SplendidCommand.VivoNormal, "Default" },
|
||||
{ SplendidCommand.VivoVivid, "Vivid" },
|
||||
{ SplendidCommand.VivoManual, "Manual" },
|
||||
{ SplendidCommand.VivoEycare, "Eyecare" },
|
||||
};
|
||||
}
|
||||
|
||||
return new Dictionary<SplendidCommand, string>
|
||||
{
|
||||
{ SplendidCommand.Default, "Default"},
|
||||
@@ -112,6 +145,18 @@ namespace GHelper.Display
|
||||
};
|
||||
}
|
||||
|
||||
public static Dictionary<int, string> GetEyeCares()
|
||||
{
|
||||
return new Dictionary<int, string>
|
||||
{
|
||||
{ 0, "0"},
|
||||
{ 1, "1"},
|
||||
{ 2, "2"},
|
||||
{ 3, "3"},
|
||||
{ 4, "4"},
|
||||
};
|
||||
}
|
||||
|
||||
public static void SetGamut(int mode = 50)
|
||||
{
|
||||
if (RunSplendid(SplendidCommand.GamutMode, 0, mode)) return;
|
||||
@@ -129,12 +174,29 @@ namespace GHelper.Display
|
||||
if (mode == SplendidCommand.None) return;
|
||||
if (mode == SplendidCommand.Default && init) return; // Skip default setting on init
|
||||
|
||||
if (ScreenCCD.GetHDRStatus(true)) return;
|
||||
if (ScreenNative.GetRefreshRate(ScreenNative.FindLaptopScreen(true)) < 0) return;
|
||||
if (!forceVisual && ScreenCCD.GetHDRStatus(true)) return;
|
||||
if (!forceVisual && ScreenNative.GetRefreshRate(ScreenNative.FindLaptopScreen(true)) < 0) return;
|
||||
|
||||
if (whiteBalance != DefaultColorTemp && !init) ProcessHelper.RunAsAdmin();
|
||||
|
||||
int balance = mode == SplendidCommand.Eyecare ? 2 : whiteBalance;
|
||||
int? balance;
|
||||
|
||||
switch (mode) {
|
||||
case SplendidCommand.Eyecare:
|
||||
balance = 2;
|
||||
break;
|
||||
case SplendidCommand.VivoNormal:
|
||||
case SplendidCommand.VivoVivid:
|
||||
balance = null;
|
||||
break;
|
||||
case SplendidCommand.VivoEycare:
|
||||
balance = Math.Abs(whiteBalance - 50) * 4 / 50;
|
||||
break;
|
||||
default:
|
||||
balance = whiteBalance;
|
||||
break;
|
||||
}
|
||||
|
||||
if (RunSplendid(mode, 0, balance)) return;
|
||||
|
||||
if (_init)
|
||||
|
||||
@@ -30,6 +30,7 @@ namespace GHelper
|
||||
{"aura", Properties.Strings.ToggleAura},
|
||||
{"performance", Properties.Strings.PerformanceMode},
|
||||
{"screen", Properties.Strings.ToggleScreen},
|
||||
{"lock", Properties.Strings.LockScreen},
|
||||
{"miniled", Properties.Strings.ToggleMiniled},
|
||||
{"fnlock", Properties.Strings.ToggleFnLock},
|
||||
{"brightness_down", Properties.Strings.BrightnessDown},
|
||||
|
||||
6
app/Fans.Designer.cs
generated
6
app/Fans.Designer.cs
generated
@@ -220,10 +220,10 @@ namespace GHelper
|
||||
panelFans.Controls.Add(tableFanCharts);
|
||||
panelFans.Controls.Add(panelTitleFans);
|
||||
panelFans.Controls.Add(panelApplyFans);
|
||||
panelFans.Dock = DockStyle.Left;
|
||||
panelFans.Dock = DockStyle.Fill;
|
||||
panelFans.Location = new Point(530, 0);
|
||||
panelFans.Margin = new Padding(0);
|
||||
panelFans.MaximumSize = new Size(816, 0);
|
||||
//panelFans.MaximumSize = new Size(816, 0);
|
||||
panelFans.MinimumSize = new Size(816, 0);
|
||||
panelFans.Name = "panelFans";
|
||||
panelFans.Padding = new Padding(0, 0, 10, 0);
|
||||
@@ -1685,7 +1685,7 @@ namespace GHelper
|
||||
Controls.Add(panelFans);
|
||||
Controls.Add(panelSliders);
|
||||
Margin = new Padding(4, 2, 4, 2);
|
||||
MaximizeBox = false;
|
||||
MaximizeBox = true;
|
||||
MinimizeBox = false;
|
||||
MinimumSize = new Size(26, 1100);
|
||||
Name = "Fans";
|
||||
|
||||
@@ -1261,7 +1261,7 @@ namespace GHelper
|
||||
|
||||
labelTip.Text = Math.Floor(curPoint.XValue) + "C, " + ChartYLabel((int)curPoint.YValues[0], device, " " + Properties.Strings.RPM);
|
||||
labelTip.Top = e.Y + ((Control)sender).Top;
|
||||
labelTip.Left = e.X - 50;
|
||||
labelTip.Left = Math.Min(chart.Width - labelTip.Width - 20, e.X - 50);
|
||||
|
||||
}
|
||||
catch
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||
<ProduceReferenceAssembly>False</ProduceReferenceAssembly>
|
||||
<AllowUnsafeBlocks>True</AllowUnsafeBlocks>
|
||||
<AssemblyVersion>0.163</AssemblyVersion>
|
||||
<AssemblyVersion>0.165</AssemblyVersion>
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
|
||||
|
||||
@@ -190,7 +190,7 @@ namespace GHelper.Gpu
|
||||
int chargerMode = Program.acpi.DeviceGet(AsusACPI.ChargerMode);
|
||||
Logger.WriteLine("ChargerStatus: " + chargerMode);
|
||||
|
||||
if (chargerMode < 0) return true;
|
||||
if (chargerMode <= 0) return true;
|
||||
return (chargerMode & AsusACPI.ChargerBarrel) > 0;
|
||||
|
||||
}
|
||||
|
||||
@@ -30,6 +30,14 @@ public static class NvidiaSmi
|
||||
return false; // Return false if the "Display Active" status is not found
|
||||
}
|
||||
|
||||
public static int GetDefaultMaxGPUPower()
|
||||
{
|
||||
if (AppConfig.ContainsModel("GU605")) return 125;
|
||||
if (AppConfig.ContainsModel("GA403")) return 90;
|
||||
if (AppConfig.ContainsModel("FA607")) return 140;
|
||||
else return 175;
|
||||
}
|
||||
|
||||
public static int GetMaxGPUPower()
|
||||
{
|
||||
string output = RunNvidiaSmiCommand("--query-gpu=power.max_limit --format csv,noheader,nounits");
|
||||
@@ -38,10 +46,10 @@ public static class NvidiaSmi
|
||||
if (float.TryParse(output, out float floatValue))
|
||||
{
|
||||
int intValue = (int)floatValue;
|
||||
return intValue;
|
||||
if (intValue >= 50 && intValue <= 175) return intValue;
|
||||
}
|
||||
|
||||
return -1;
|
||||
return GetDefaultMaxGPUPower();
|
||||
}
|
||||
|
||||
private static string RunNvidiaSmiCommand(string arguments = "-i 0 -q")
|
||||
|
||||
2
app/Handheld.Designer.cs
generated
2
app/Handheld.Designer.cs
generated
@@ -971,7 +971,7 @@
|
||||
//
|
||||
// checkController
|
||||
//
|
||||
checkController.Anchor = AnchorStyles.Bottom | AnchorStyles.Right;
|
||||
checkController.Anchor = AnchorStyles.Bottom | AnchorStyles.Left;
|
||||
checkController.AutoSize = true;
|
||||
checkController.BackColor = SystemColors.ControlLight;
|
||||
checkController.Location = new Point(650, 41);
|
||||
|
||||
@@ -473,6 +473,10 @@ namespace GHelper.Input
|
||||
case "screenshot":
|
||||
KeyboardHook.KeyPress(Keys.Snapshot);
|
||||
break;
|
||||
case "lock":
|
||||
Logger.WriteLine("Screen lock");
|
||||
NativeMethods.LockScreen();
|
||||
break;
|
||||
case "screen":
|
||||
Logger.WriteLine("Screen off toggle");
|
||||
NativeMethods.TurnOffScreen();
|
||||
@@ -809,14 +813,14 @@ namespace GHelper.Input
|
||||
public static void ToggleScreenpad()
|
||||
{
|
||||
int toggle = AppConfig.Is("screenpad_toggle") ? 0 : 1;
|
||||
int brightness = AppConfig.Get("screenpad", 100);
|
||||
int brightness = toggle == 0 ? -10 : AppConfig.Get("screenpad", 100);
|
||||
|
||||
Program.acpi.DeviceSet(AsusACPI.ScreenPadToggle, toggle, "ScreenpadToggle");
|
||||
if (toggle > 0) Program.acpi.DeviceSet(AsusACPI.ScreenPadBrightness, Math.Max(brightness * 255 / 100, 0), "Screenpad");
|
||||
Debug.WriteLine($"Screenpad toggle = {toggle}");
|
||||
|
||||
ApplyScreenpadAction(brightness, true);
|
||||
|
||||
AppConfig.Set("screenpad_toggle", toggle);
|
||||
|
||||
|
||||
Program.toast.RunToast($"Screen Pad " + (toggle == 1 ? "On" : "Off"), toggle > 0 ? ToastIcon.BrightnessUp : ToastIcon.BrightnessDown);
|
||||
}
|
||||
|
||||
@@ -851,6 +855,37 @@ namespace GHelper.Input
|
||||
|
||||
}
|
||||
|
||||
private static System.Threading.Timer screenpadActionTimer;
|
||||
private static int screenpadBrightnessToSet;
|
||||
public static void ApplyScreenpadAction(int brightness, bool doToggle = false)
|
||||
{
|
||||
var delay = AppConfig.Get("screenpad_delay", 1500);
|
||||
|
||||
//Action
|
||||
Action<int> action = (b) =>
|
||||
{
|
||||
if (b >= 0) Program.acpi.DeviceSet(AsusACPI.ScreenPadToggle, 1, "ScreenpadOn");
|
||||
Program.acpi.DeviceSet(AsusACPI.ScreenPadBrightness, Math.Max(b * 255 / 100, 0), "Screenpad");
|
||||
if (b < 0) Program.acpi.DeviceSet(AsusACPI.ScreenPadToggle, 0, "ScreenpadOff");
|
||||
};
|
||||
|
||||
if(delay <= 0 || (brightness > 0 && brightness < 100 && doToggle == false)) //instant action
|
||||
{
|
||||
action(brightness);
|
||||
}
|
||||
else //delayed action
|
||||
{
|
||||
//Timer Approach
|
||||
if (screenpadActionTimer == null)
|
||||
{
|
||||
screenpadActionTimer = new System.Threading.Timer(_ => action(screenpadBrightnessToSet), null, Timeout.Infinite, Timeout.Infinite);
|
||||
}
|
||||
//Start Timer
|
||||
screenpadBrightnessToSet = brightness;
|
||||
screenpadActionTimer.Change(delay, Timeout.Infinite);
|
||||
}
|
||||
}
|
||||
|
||||
public static void SetScreenpad(int delta)
|
||||
{
|
||||
int brightness = AppConfig.Get("screenpad", 100);
|
||||
@@ -860,7 +895,6 @@ namespace GHelper.Input
|
||||
if (brightness < 0) brightness = 100;
|
||||
else if (brightness >= 100) brightness = 0;
|
||||
else brightness = -10;
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -869,11 +903,7 @@ namespace GHelper.Input
|
||||
|
||||
AppConfig.Set("screenpad", brightness);
|
||||
|
||||
if (brightness >= 0) Program.acpi.DeviceSet(AsusACPI.ScreenPadToggle, 1, "ScreenpadOn");
|
||||
|
||||
Program.acpi.DeviceSet(AsusACPI.ScreenPadBrightness, Math.Max(brightness * 255 / 100, 0), "Screenpad");
|
||||
|
||||
if (brightness < 0) Program.acpi.DeviceSet(AsusACPI.ScreenPadToggle, 0, "ScreenpadOff");
|
||||
ApplyScreenpadAction(brightness);
|
||||
|
||||
string toast;
|
||||
|
||||
@@ -882,10 +912,8 @@ namespace GHelper.Input
|
||||
else toast = brightness.ToString() + "%";
|
||||
|
||||
Program.toast.RunToast($"Screen Pad {toast}", delta > 0 ? ToastIcon.BrightnessUp : ToastIcon.BrightnessDown);
|
||||
|
||||
}
|
||||
|
||||
|
||||
static void LaunchProcess(string command = "")
|
||||
{
|
||||
|
||||
|
||||
@@ -15,6 +15,7 @@ namespace GHelper.Mode
|
||||
|
||||
private int _cpuUV = 0;
|
||||
private int _igpuUV = 0;
|
||||
private bool _ryzenPower = false;
|
||||
|
||||
static System.Timers.Timer reapplyTimer = default!;
|
||||
|
||||
@@ -27,7 +28,8 @@ namespace GHelper.Mode
|
||||
|
||||
private void ReapplyTimer_Elapsed(object? sender, System.Timers.ElapsedEventArgs e)
|
||||
{
|
||||
SetCPUTemp(AppConfig.GetMode("cpu_temp"), false);
|
||||
SetCPUTemp(AppConfig.GetMode("cpu_temp"));
|
||||
SetRyzenPower();
|
||||
}
|
||||
|
||||
public void AutoPerformance(bool powerChanged = false)
|
||||
@@ -222,6 +224,34 @@ namespace GHelper.Mode
|
||||
settings.SetModeLabel(Properties.Strings.PerformanceMode + ": " + Modes.GetCurrentName() + (customFans ? "+" : "") + ((customPower > 0) ? " " + customPower + "W" : ""));
|
||||
}
|
||||
|
||||
public void SetRyzenPower(bool init = false)
|
||||
{
|
||||
if (init) _ryzenPower = true;
|
||||
|
||||
if (!_ryzenPower) return;
|
||||
if (!RyzenControl.IsRingExsists()) return;
|
||||
if (!AppConfig.IsMode("auto_apply_power")) return;
|
||||
|
||||
int limit_total = AppConfig.GetMode("limit_total");
|
||||
int limit_slow = AppConfig.GetMode("limit_slow", limit_total);
|
||||
|
||||
if (limit_total > AsusACPI.MaxTotal) return;
|
||||
if (limit_total < AsusACPI.MinTotal) return;
|
||||
|
||||
var stapmResult = SendCommand.set_stapm_limit((uint)limit_total * 1000);
|
||||
if (init) Logger.WriteLine($"STAPM: {limit_total} {stapmResult}");
|
||||
|
||||
var stapmResult2 = SendCommand.set_stapm2_limit((uint)limit_total * 1000);
|
||||
if (init) Logger.WriteLine($"STAPM2: {limit_total} {stapmResult2}");
|
||||
|
||||
var slowResult = SendCommand.set_slow_limit((uint)limit_slow * 1000);
|
||||
if (init) Logger.WriteLine($"SLOW: {limit_slow} {slowResult}");
|
||||
|
||||
var fastResult = SendCommand.set_fast_limit((uint)limit_slow * 1000);
|
||||
if (init) Logger.WriteLine($"FAST: {limit_slow} {fastResult}");
|
||||
|
||||
}
|
||||
|
||||
public void SetPower(bool launchAsAdmin = false)
|
||||
{
|
||||
|
||||
@@ -258,19 +288,7 @@ namespace GHelper.Mode
|
||||
|
||||
if (ProcessHelper.IsUserAdministrator())
|
||||
{
|
||||
var stapmResult = SendCommand.set_stapm_limit((uint)limit_total * 1000);
|
||||
Logger.WriteLine($"STAPM: {limit_total} {stapmResult}");
|
||||
|
||||
var stapmResult2 = SendCommand.set_stapm2_limit((uint)limit_total * 1000);
|
||||
Logger.WriteLine($"STAPM2: {limit_total} {stapmResult2}");
|
||||
|
||||
var slowResult = SendCommand.set_slow_limit((uint)limit_total * 1000);
|
||||
Logger.WriteLine($"SLOW: {limit_total} {slowResult}");
|
||||
|
||||
var fastResult = SendCommand.set_fast_limit((uint)limit_total * 1000);
|
||||
Logger.WriteLine($"FAST: {limit_total} {fastResult}");
|
||||
|
||||
customPower = limit_total;
|
||||
SetRyzenPower(true);
|
||||
}
|
||||
else if (launchAsAdmin)
|
||||
{
|
||||
@@ -351,22 +369,15 @@ namespace GHelper.Mode
|
||||
|
||||
}
|
||||
|
||||
public void SetCPUTemp(int? cpuTemp, bool log = true)
|
||||
public void SetCPUTemp(int? cpuTemp, bool init = false)
|
||||
{
|
||||
if (cpuTemp >= RyzenControl.MinTemp && cpuTemp < RyzenControl.MaxTemp)
|
||||
{
|
||||
var resultCPU = SendCommand.set_tctl_temp((uint)cpuTemp);
|
||||
if (log) Logger.WriteLine($"CPU Temp: {cpuTemp} {resultCPU}");
|
||||
if (init) Logger.WriteLine($"CPU Temp: {cpuTemp} {resultCPU}");
|
||||
|
||||
var restultAPU = SendCommand.set_apu_skin_temp_limit((uint)cpuTemp);
|
||||
if (log) Logger.WriteLine($"APU Temp: {cpuTemp} {restultAPU}");
|
||||
|
||||
reapplyTimer.Enabled = AppConfig.IsMode("auto_uv");
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
reapplyTimer.Enabled = false;
|
||||
if (init) Logger.WriteLine($"APU Temp: {cpuTemp} {restultAPU}");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -409,18 +420,21 @@ namespace GHelper.Mode
|
||||
{
|
||||
SetUV(AppConfig.GetMode("cpu_uv", 0));
|
||||
SetUViGPU(AppConfig.GetMode("igpu_uv", 0));
|
||||
SetCPUTemp(AppConfig.GetMode("cpu_temp"));
|
||||
SetCPUTemp(AppConfig.GetMode("cpu_temp"), true);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Logger.WriteLine("UV Error: " + ex.ToString());
|
||||
}
|
||||
|
||||
reapplyTimer.Enabled = AppConfig.IsMode("auto_uv");
|
||||
}
|
||||
|
||||
public void ResetRyzen()
|
||||
{
|
||||
if (_cpuUV != 0) SetUV(0);
|
||||
if (_igpuUV != 0) SetUViGPU(0);
|
||||
reapplyTimer.Enabled = false;
|
||||
}
|
||||
|
||||
public void AutoRyzen()
|
||||
|
||||
@@ -27,14 +27,25 @@ public class NativeMethods
|
||||
private const int MONITOR_OFF = 2;
|
||||
|
||||
[DllImport("user32.dll", CharSet = CharSet.Auto, SetLastError = true)]
|
||||
private static extern IntPtr SendMessage(IntPtr hWnd, uint Msg, IntPtr wParam, IntPtr lParam);
|
||||
private static extern IntPtr SendMessage(nint hWnd, int hMsg, int wParam, int lParam);
|
||||
|
||||
[DllImport("kernel32.dll", CharSet = CharSet.Auto, SetLastError = true)]
|
||||
private static extern uint FormatMessage(uint dwFlags, IntPtr lpSource, uint dwMessageId, uint dwLanguageId, out string lpBuffer, uint nSize, IntPtr Arguments);
|
||||
|
||||
[DllImport("user32.dll", SetLastError = true)]
|
||||
[return: MarshalAs(UnmanagedType.Bool)]
|
||||
private static extern bool LockWorkStation();
|
||||
|
||||
public static void LockScreen()
|
||||
{
|
||||
LockWorkStation();
|
||||
}
|
||||
|
||||
public static void TurnOffScreen()
|
||||
{
|
||||
IntPtr result = SendMessage(-1, WM_SYSCOMMAND, (IntPtr)SC_MONITORPOWER, (IntPtr)MONITOR_OFF);
|
||||
Form f = new Form();
|
||||
IntPtr result = SendMessage(f.Handle, WM_SYSCOMMAND, SC_MONITORPOWER, MONITOR_OFF);
|
||||
|
||||
if (result == IntPtr.Zero)
|
||||
{
|
||||
int error = Marshal.GetLastWin32Error();
|
||||
|
||||
9
app/Properties/Strings.Designer.cs
generated
9
app/Properties/Strings.Designer.cs
generated
@@ -1223,6 +1223,15 @@ namespace GHelper.Properties {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Lock Screen.
|
||||
/// </summary>
|
||||
internal static string LockScreen {
|
||||
get {
|
||||
return ResourceManager.GetString("LockScreen", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Logo.
|
||||
/// </summary>
|
||||
|
||||
@@ -494,6 +494,9 @@ Trotzdem fortfahren?</value>
|
||||
<data name="LaptopScreen" xml:space="preserve">
|
||||
<value>Laptopbildschirm</value>
|
||||
</data>
|
||||
<data name="LEDStatusIndicators" xml:space="preserve">
|
||||
<value>LED Status Indicators</value>
|
||||
</data>
|
||||
<data name="Lid" xml:space="preserve">
|
||||
<value>Deckel</value>
|
||||
</data>
|
||||
@@ -503,6 +506,9 @@ Trotzdem fortfahren?</value>
|
||||
<data name="Lighting" xml:space="preserve">
|
||||
<value>Beleuchtung</value>
|
||||
</data>
|
||||
<data name="LockScreen" xml:space="preserve">
|
||||
<value>Lock Screen</value>
|
||||
</data>
|
||||
<data name="Logo" xml:space="preserve">
|
||||
<value>Logo</value>
|
||||
</data>
|
||||
@@ -768,10 +774,10 @@ Trotzdem fortfahren?</value>
|
||||
<value>Darstellungsmodus</value>
|
||||
</data>
|
||||
<data name="VisualModesHDR" xml:space="preserve">
|
||||
<value>Visual Modes are not available when HDR is active</value>
|
||||
<value>Darstellungsmodi sind nicht verfügbar, wenn HDR aktiv ist.</value>
|
||||
</data>
|
||||
<data name="VisualModesScreen" xml:space="preserve">
|
||||
<value>Visual Modes are not available when laptop screen is off</value>
|
||||
<value>Darstellungsmodi sind nicht verfügbar, wenn Laptop-Bildschirm aus ist.</value>
|
||||
</data>
|
||||
<data name="VolumeDown" xml:space="preserve">
|
||||
<value>Lautstärke verringern</value>
|
||||
|
||||
@@ -494,6 +494,9 @@
|
||||
<data name="LaptopScreen" xml:space="preserve">
|
||||
<value>Pantalla del portátil</value>
|
||||
</data>
|
||||
<data name="LEDStatusIndicators" xml:space="preserve">
|
||||
<value>Indicadores de estado LED</value>
|
||||
</data>
|
||||
<data name="Lid" xml:space="preserve">
|
||||
<value>Tapa</value>
|
||||
</data>
|
||||
@@ -503,6 +506,9 @@
|
||||
<data name="Lighting" xml:space="preserve">
|
||||
<value>Iluminación</value>
|
||||
</data>
|
||||
<data name="LockScreen" xml:space="preserve">
|
||||
<value>Lock Screen</value>
|
||||
</data>
|
||||
<data name="Logo" xml:space="preserve">
|
||||
<value>Logo</value>
|
||||
</data>
|
||||
@@ -768,10 +774,10 @@
|
||||
<value>Modo visual</value>
|
||||
</data>
|
||||
<data name="VisualModesHDR" xml:space="preserve">
|
||||
<value>Visual Modes are not available when HDR is active</value>
|
||||
<value>Los modos visuales no están disponibles cuando el HDR está activo</value>
|
||||
</data>
|
||||
<data name="VisualModesScreen" xml:space="preserve">
|
||||
<value>Visual Modes are not available when laptop screen is off</value>
|
||||
<value>Los modos visuales no están disponibles cuando la pantalla portátil está apagada</value>
|
||||
</data>
|
||||
<data name="VolumeDown" xml:space="preserve">
|
||||
<value>Bajar volumen</value>
|
||||
|
||||
@@ -494,6 +494,9 @@ Voulez-vous continuer ?</value>
|
||||
<data name="LaptopScreen" xml:space="preserve">
|
||||
<value>Écran</value>
|
||||
</data>
|
||||
<data name="LEDStatusIndicators" xml:space="preserve">
|
||||
<value>LED Status Indicators</value>
|
||||
</data>
|
||||
<data name="Lid" xml:space="preserve">
|
||||
<value>Capot</value>
|
||||
</data>
|
||||
@@ -503,6 +506,9 @@ Voulez-vous continuer ?</value>
|
||||
<data name="Lighting" xml:space="preserve">
|
||||
<value>Éclairage</value>
|
||||
</data>
|
||||
<data name="LockScreen" xml:space="preserve">
|
||||
<value>Lock Screen</value>
|
||||
</data>
|
||||
<data name="Logo" xml:space="preserve">
|
||||
<value>Logo</value>
|
||||
</data>
|
||||
|
||||
@@ -494,6 +494,9 @@ Do you still want to continue?</value>
|
||||
<data name="LaptopScreen" xml:space="preserve">
|
||||
<value>Laptop kijelző</value>
|
||||
</data>
|
||||
<data name="LEDStatusIndicators" xml:space="preserve">
|
||||
<value>LED Status Indicators</value>
|
||||
</data>
|
||||
<data name="Lid" xml:space="preserve">
|
||||
<value>Fedél</value>
|
||||
</data>
|
||||
@@ -503,6 +506,9 @@ Do you still want to continue?</value>
|
||||
<data name="Lighting" xml:space="preserve">
|
||||
<value>Világítás</value>
|
||||
</data>
|
||||
<data name="LockScreen" xml:space="preserve">
|
||||
<value>Lock Screen</value>
|
||||
</data>
|
||||
<data name="Logo" xml:space="preserve">
|
||||
<value>Logó</value>
|
||||
</data>
|
||||
|
||||
@@ -494,6 +494,9 @@ Apakah Anda masih ingin melanjutkan?</value>
|
||||
<data name="LaptopScreen" xml:space="preserve">
|
||||
<value>Layar Laptop</value>
|
||||
</data>
|
||||
<data name="LEDStatusIndicators" xml:space="preserve">
|
||||
<value>LED Status Indicators</value>
|
||||
</data>
|
||||
<data name="Lid" xml:space="preserve">
|
||||
<value>Lid</value>
|
||||
</data>
|
||||
@@ -503,6 +506,9 @@ Apakah Anda masih ingin melanjutkan?</value>
|
||||
<data name="Lighting" xml:space="preserve">
|
||||
<value>Lighting</value>
|
||||
</data>
|
||||
<data name="LockScreen" xml:space="preserve">
|
||||
<value>Lock Screen</value>
|
||||
</data>
|
||||
<data name="Logo" xml:space="preserve">
|
||||
<value>Logo</value>
|
||||
</data>
|
||||
|
||||
@@ -494,6 +494,9 @@ Sei sicuro di voler continuare?</value>
|
||||
<data name="LaptopScreen" xml:space="preserve">
|
||||
<value>Schermo Laptop</value>
|
||||
</data>
|
||||
<data name="LEDStatusIndicators" xml:space="preserve">
|
||||
<value>LED Status Indicators</value>
|
||||
</data>
|
||||
<data name="Lid" xml:space="preserve">
|
||||
<value>Lid</value>
|
||||
</data>
|
||||
@@ -503,6 +506,9 @@ Sei sicuro di voler continuare?</value>
|
||||
<data name="Lighting" xml:space="preserve">
|
||||
<value>Illuminazione</value>
|
||||
</data>
|
||||
<data name="LockScreen" xml:space="preserve">
|
||||
<value>Lock Screen</value>
|
||||
</data>
|
||||
<data name="Logo" xml:space="preserve">
|
||||
<value>Logo</value>
|
||||
</data>
|
||||
|
||||
@@ -494,6 +494,9 @@
|
||||
<data name="LaptopScreen" xml:space="preserve">
|
||||
<value>화면</value>
|
||||
</data>
|
||||
<data name="LEDStatusIndicators" xml:space="preserve">
|
||||
<value>LED Status Indicators</value>
|
||||
</data>
|
||||
<data name="Lid" xml:space="preserve">
|
||||
<value>덮개</value>
|
||||
</data>
|
||||
@@ -503,6 +506,9 @@
|
||||
<data name="Lighting" xml:space="preserve">
|
||||
<value>조명</value>
|
||||
</data>
|
||||
<data name="LockScreen" xml:space="preserve">
|
||||
<value>Lock Screen</value>
|
||||
</data>
|
||||
<data name="Logo" xml:space="preserve">
|
||||
<value>로고</value>
|
||||
</data>
|
||||
|
||||
@@ -494,6 +494,9 @@ Vis tiek norite tęsti?</value>
|
||||
<data name="LaptopScreen" xml:space="preserve">
|
||||
<value>Ekranas</value>
|
||||
</data>
|
||||
<data name="LEDStatusIndicators" xml:space="preserve">
|
||||
<value>LED Status Indicators</value>
|
||||
</data>
|
||||
<data name="Lid" xml:space="preserve">
|
||||
<value>Dangtis</value>
|
||||
</data>
|
||||
@@ -503,6 +506,9 @@ Vis tiek norite tęsti?</value>
|
||||
<data name="Lighting" xml:space="preserve">
|
||||
<value>Apšvietimas</value>
|
||||
</data>
|
||||
<data name="LockScreen" xml:space="preserve">
|
||||
<value>Lock Screen</value>
|
||||
</data>
|
||||
<data name="Logo" xml:space="preserve">
|
||||
<value>Logotipas</value>
|
||||
</data>
|
||||
|
||||
@@ -494,6 +494,9 @@ Nadal chcesz kontynuować?</value>
|
||||
<data name="LaptopScreen" xml:space="preserve">
|
||||
<value>Ekran laptopa</value>
|
||||
</data>
|
||||
<data name="LEDStatusIndicators" xml:space="preserve">
|
||||
<value>Wskaźniki stanu</value>
|
||||
</data>
|
||||
<data name="Lid" xml:space="preserve">
|
||||
<value>Pokrywa</value>
|
||||
</data>
|
||||
@@ -503,6 +506,9 @@ Nadal chcesz kontynuować?</value>
|
||||
<data name="Lighting" xml:space="preserve">
|
||||
<value>Oświetlenie</value>
|
||||
</data>
|
||||
<data name="LockScreen" xml:space="preserve">
|
||||
<value>Lock Screen</value>
|
||||
</data>
|
||||
<data name="Logo" xml:space="preserve">
|
||||
<value>Logo</value>
|
||||
</data>
|
||||
@@ -768,10 +774,10 @@ Nadal chcesz kontynuować?</value>
|
||||
<value>Tryb wyświetlania</value>
|
||||
</data>
|
||||
<data name="VisualModesHDR" xml:space="preserve">
|
||||
<value>Visual Modes are not available when HDR is active</value>
|
||||
<value>Tryby wyświetlania nie są dostępne, kiedy HDR jest włączone</value>
|
||||
</data>
|
||||
<data name="VisualModesScreen" xml:space="preserve">
|
||||
<value>Visual Modes are not available when laptop screen is off</value>
|
||||
<value>Tryby wyświetlania nie są dostępne, kiedy ekran laptopa jest wyłączony</value>
|
||||
</data>
|
||||
<data name="VolumeDown" xml:space="preserve">
|
||||
<value>Zmniejsz głośność</value>
|
||||
|
||||
@@ -494,6 +494,9 @@ Do you still want to continue?</value>
|
||||
<data name="LaptopScreen" xml:space="preserve">
|
||||
<value>Tela</value>
|
||||
</data>
|
||||
<data name="LEDStatusIndicators" xml:space="preserve">
|
||||
<value>LED Status Indicators</value>
|
||||
</data>
|
||||
<data name="Lid" xml:space="preserve">
|
||||
<value>Tampa</value>
|
||||
</data>
|
||||
@@ -503,6 +506,9 @@ Do you still want to continue?</value>
|
||||
<data name="Lighting" xml:space="preserve">
|
||||
<value>Lighting</value>
|
||||
</data>
|
||||
<data name="LockScreen" xml:space="preserve">
|
||||
<value>Lock Screen</value>
|
||||
</data>
|
||||
<data name="Logo" xml:space="preserve">
|
||||
<value>Logo</value>
|
||||
</data>
|
||||
|
||||
@@ -494,6 +494,9 @@ Quer prosseguir?</value>
|
||||
<data name="LaptopScreen" xml:space="preserve">
|
||||
<value>Ecrã</value>
|
||||
</data>
|
||||
<data name="LEDStatusIndicators" xml:space="preserve">
|
||||
<value>LED Status Indicators</value>
|
||||
</data>
|
||||
<data name="Lid" xml:space="preserve">
|
||||
<value>Tampa</value>
|
||||
</data>
|
||||
@@ -503,6 +506,9 @@ Quer prosseguir?</value>
|
||||
<data name="Lighting" xml:space="preserve">
|
||||
<value>Iluminação</value>
|
||||
</data>
|
||||
<data name="LockScreen" xml:space="preserve">
|
||||
<value>Lock Screen</value>
|
||||
</data>
|
||||
<data name="Logo" xml:space="preserve">
|
||||
<value>Logo</value>
|
||||
</data>
|
||||
|
||||
@@ -506,6 +506,9 @@ Do you still want to continue?</value>
|
||||
<data name="Lighting" xml:space="preserve">
|
||||
<value>Lighting</value>
|
||||
</data>
|
||||
<data name="LockScreen" xml:space="preserve">
|
||||
<value>Lock Screen</value>
|
||||
</data>
|
||||
<data name="Logo" xml:space="preserve">
|
||||
<value>Logo</value>
|
||||
</data>
|
||||
|
||||
@@ -494,6 +494,9 @@
|
||||
<data name="LaptopScreen" xml:space="preserve">
|
||||
<value>Ecran Laptop</value>
|
||||
</data>
|
||||
<data name="LEDStatusIndicators" xml:space="preserve">
|
||||
<value>LED Status Indicators</value>
|
||||
</data>
|
||||
<data name="Lid" xml:space="preserve">
|
||||
<value>Capac</value>
|
||||
</data>
|
||||
@@ -503,6 +506,9 @@
|
||||
<data name="Lighting" xml:space="preserve">
|
||||
<value>Iluminare</value>
|
||||
</data>
|
||||
<data name="LockScreen" xml:space="preserve">
|
||||
<value>Lock Screen</value>
|
||||
</data>
|
||||
<data name="Logo" xml:space="preserve">
|
||||
<value>Logo-ul</value>
|
||||
</data>
|
||||
|
||||
@@ -494,6 +494,9 @@ Yine de devam etmek istiyor musunuz?</value>
|
||||
<data name="LaptopScreen" xml:space="preserve">
|
||||
<value>Laptop Ekranı</value>
|
||||
</data>
|
||||
<data name="LEDStatusIndicators" xml:space="preserve">
|
||||
<value>LED Status Indicators</value>
|
||||
</data>
|
||||
<data name="Lid" xml:space="preserve">
|
||||
<value>Kapak</value>
|
||||
</data>
|
||||
@@ -503,6 +506,9 @@ Yine de devam etmek istiyor musunuz?</value>
|
||||
<data name="Lighting" xml:space="preserve">
|
||||
<value>Işıklandırma</value>
|
||||
</data>
|
||||
<data name="LockScreen" xml:space="preserve">
|
||||
<value>Lock Screen</value>
|
||||
</data>
|
||||
<data name="Logo" xml:space="preserve">
|
||||
<value>Logo</value>
|
||||
</data>
|
||||
|
||||
@@ -494,6 +494,9 @@
|
||||
<data name="LaptopScreen" xml:space="preserve">
|
||||
<value>Дисплей</value>
|
||||
</data>
|
||||
<data name="LEDStatusIndicators" xml:space="preserve">
|
||||
<value>LED-Індикатори стану</value>
|
||||
</data>
|
||||
<data name="Lid" xml:space="preserve">
|
||||
<value>Кришка</value>
|
||||
</data>
|
||||
@@ -503,6 +506,9 @@
|
||||
<data name="Lighting" xml:space="preserve">
|
||||
<value>Ілюмінація</value>
|
||||
</data>
|
||||
<data name="LockScreen" xml:space="preserve">
|
||||
<value>Lock Screen</value>
|
||||
</data>
|
||||
<data name="Logo" xml:space="preserve">
|
||||
<value>Лого</value>
|
||||
</data>
|
||||
@@ -768,10 +774,10 @@
|
||||
<value>Візуальний режим</value>
|
||||
</data>
|
||||
<data name="VisualModesHDR" xml:space="preserve">
|
||||
<value>Visual Modes are not available when HDR is active</value>
|
||||
<value>Візуальні режими недоступні, коли HDR активний</value>
|
||||
</data>
|
||||
<data name="VisualModesScreen" xml:space="preserve">
|
||||
<value>Visual Modes are not available when laptop screen is off</value>
|
||||
<value>Візуальні режими недоступні, коли екран вимкнений</value>
|
||||
</data>
|
||||
<data name="VolumeDown" xml:space="preserve">
|
||||
<value>Зменшення гучності</value>
|
||||
|
||||
@@ -494,6 +494,9 @@ Do you still want to continue?</value>
|
||||
<data name="LaptopScreen" xml:space="preserve">
|
||||
<value>Màn hình Laptop</value>
|
||||
</data>
|
||||
<data name="LEDStatusIndicators" xml:space="preserve">
|
||||
<value>LED Status Indicators</value>
|
||||
</data>
|
||||
<data name="Lid" xml:space="preserve">
|
||||
<value>Màn gập</value>
|
||||
</data>
|
||||
@@ -503,6 +506,9 @@ Do you still want to continue?</value>
|
||||
<data name="Lighting" xml:space="preserve">
|
||||
<value>Lighting</value>
|
||||
</data>
|
||||
<data name="LockScreen" xml:space="preserve">
|
||||
<value>Lock Screen</value>
|
||||
</data>
|
||||
<data name="Logo" xml:space="preserve">
|
||||
<value>Logo</value>
|
||||
</data>
|
||||
|
||||
@@ -494,6 +494,9 @@
|
||||
<data name="LaptopScreen" xml:space="preserve">
|
||||
<value>笔记本屏幕</value>
|
||||
</data>
|
||||
<data name="LEDStatusIndicators" xml:space="preserve">
|
||||
<value>LED Status Indicators</value>
|
||||
</data>
|
||||
<data name="Lid" xml:space="preserve">
|
||||
<value>盖子</value>
|
||||
</data>
|
||||
@@ -503,6 +506,9 @@
|
||||
<data name="Lighting" xml:space="preserve">
|
||||
<value>背光</value>
|
||||
</data>
|
||||
<data name="LockScreen" xml:space="preserve">
|
||||
<value>Lock Screen</value>
|
||||
</data>
|
||||
<data name="Logo" xml:space="preserve">
|
||||
<value>徽标</value>
|
||||
</data>
|
||||
|
||||
@@ -494,6 +494,9 @@
|
||||
<data name="LaptopScreen" xml:space="preserve">
|
||||
<value>螢幕顯示</value>
|
||||
</data>
|
||||
<data name="LEDStatusIndicators" xml:space="preserve">
|
||||
<value>LED狀態指示器</value>
|
||||
</data>
|
||||
<data name="Lid" xml:space="preserve">
|
||||
<value>螢幕背蓋</value>
|
||||
</data>
|
||||
@@ -503,6 +506,9 @@
|
||||
<data name="Lighting" xml:space="preserve">
|
||||
<value>亮度</value>
|
||||
</data>
|
||||
<data name="LockScreen" xml:space="preserve">
|
||||
<value>Lock Screen</value>
|
||||
</data>
|
||||
<data name="Logo" xml:space="preserve">
|
||||
<value>Logo</value>
|
||||
</data>
|
||||
@@ -768,10 +774,10 @@
|
||||
<value>色域模式</value>
|
||||
</data>
|
||||
<data name="VisualModesHDR" xml:space="preserve">
|
||||
<value>Visual Modes are not available when HDR is active</value>
|
||||
<value>HDR開啟時不支援色域模式</value>
|
||||
</data>
|
||||
<data name="VisualModesScreen" xml:space="preserve">
|
||||
<value>Visual Modes are not available when laptop screen is off</value>
|
||||
<value>筆電螢幕闔上時不支援色域模式</value>
|
||||
</data>
|
||||
<data name="VolumeDown" xml:space="preserve">
|
||||
<value>音量降低</value>
|
||||
|
||||
8
app/Settings.Designer.cs
generated
8
app/Settings.Designer.cs
generated
@@ -1408,6 +1408,7 @@ namespace GHelper
|
||||
labelCharge.Size = new Size(461, 56);
|
||||
labelCharge.TabIndex = 40;
|
||||
labelCharge.TextAlign = ContentAlignment.MiddleRight;
|
||||
labelCharge.Cursor = Cursors.Hand;
|
||||
//
|
||||
// panelPeripherals
|
||||
//
|
||||
@@ -1705,12 +1706,13 @@ namespace GHelper
|
||||
//
|
||||
// labelVisual
|
||||
//
|
||||
labelVisual.Cursor = Cursors.Hand;
|
||||
labelVisual.ForeColor = SystemColors.GrayText;
|
||||
labelVisual.Location = new Point(20, 170);
|
||||
labelVisual.Margin = new Padding(4, 0, 4, 0);
|
||||
labelVisual.Name = "labelVisual";
|
||||
labelVisual.Padding = new Padding(4);
|
||||
labelVisual.Size = new Size(787, 52);
|
||||
labelVisual.Size = new Size(800, 52);
|
||||
labelVisual.TabIndex = 42;
|
||||
labelVisual.Text = "Visual Modes are not available when HDR is active";
|
||||
labelVisual.Visible = false;
|
||||
@@ -1864,7 +1866,7 @@ namespace GHelper
|
||||
labelGammaTitle.Location = new Point(43, 0);
|
||||
labelGammaTitle.Margin = new Padding(4, 0, 4, 0);
|
||||
labelGammaTitle.Name = "labelGammaTitle";
|
||||
labelGammaTitle.Size = new Size(507, 32);
|
||||
labelGammaTitle.Size = new Size(540, 32);
|
||||
labelGammaTitle.TabIndex = 37;
|
||||
labelGammaTitle.Text = "Flicker-free Dimming";
|
||||
//
|
||||
@@ -1874,7 +1876,7 @@ namespace GHelper
|
||||
AutoScaleMode = AutoScaleMode.Dpi;
|
||||
AutoSize = true;
|
||||
AutoSizeMode = AutoSizeMode.GrowAndShrink;
|
||||
ClientSize = new Size(849, 1559);
|
||||
ClientSize = new Size(849, 2045);
|
||||
Controls.Add(panelFooter);
|
||||
Controls.Add(panelVersion);
|
||||
Controls.Add(panelBattery);
|
||||
|
||||
@@ -138,9 +138,9 @@ namespace GHelper
|
||||
buttonOptimized.BorderColor = colorEco;
|
||||
buttonXGM.BorderColor = colorTurbo;
|
||||
|
||||
button60Hz.BorderColor = SystemColors.ActiveBorder;
|
||||
button120Hz.BorderColor = SystemColors.ActiveBorder;
|
||||
buttonScreenAuto.BorderColor = SystemColors.ActiveBorder;
|
||||
button60Hz.BorderColor = colorGray;
|
||||
button120Hz.BorderColor = colorGray;
|
||||
buttonScreenAuto.BorderColor = colorGray;
|
||||
buttonMiniled.BorderColor = colorTurbo;
|
||||
|
||||
buttonSilent.Click += ButtonSilent_Click;
|
||||
@@ -256,10 +256,23 @@ namespace GHelper
|
||||
VisualiseFnLock();
|
||||
buttonFnLock.Click += ButtonFnLock_Click;
|
||||
|
||||
labelVisual.Click += LabelVisual_Click;
|
||||
labelCharge.Click += LabelCharge_Click;
|
||||
|
||||
panelPerformance.Focus();
|
||||
InitVisual();
|
||||
}
|
||||
|
||||
private void LabelCharge_Click(object? sender, EventArgs e)
|
||||
{
|
||||
BatteryControl.BatteryReport();
|
||||
}
|
||||
|
||||
private void LabelVisual_Click(object? sender, EventArgs e)
|
||||
{
|
||||
labelVisual.Visible = false;
|
||||
VisualControl.forceVisual = true;
|
||||
}
|
||||
|
||||
public void InitVisual()
|
||||
{
|
||||
@@ -1664,7 +1677,7 @@ namespace GHelper
|
||||
sliderBattery.Value = limit;
|
||||
|
||||
sliderBattery.AccessibleName = Properties.Strings.BatteryChargeLimit + ": " + limit.ToString() + "%";
|
||||
sliderBattery.AccessibilityObject.Select(AccessibleSelection.TakeFocus);
|
||||
//sliderBattery.AccessibilityObject.Select(AccessibleSelection.TakeFocus);
|
||||
|
||||
VisualiseBatteryFull();
|
||||
}
|
||||
|
||||
@@ -10,6 +10,7 @@ namespace GHelper.UI
|
||||
public static Color colorStandard = Color.FromArgb(255, 58, 174, 239);
|
||||
public static Color colorTurbo = Color.FromArgb(255, 255, 32, 32);
|
||||
public static Color colorCustom = Color.FromArgb(255, 255, 128, 0);
|
||||
public static Color colorGray = Color.FromArgb(255, 168, 168, 168);
|
||||
|
||||
|
||||
public static Color buttonMain;
|
||||
|
||||
@@ -438,8 +438,8 @@ namespace GHelper.USB
|
||||
105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 139, 121, 122, 123, 124, 125,
|
||||
/* LCTL LFNC LWIN LALT SPC RALT RFNC RCTL ARWL ARWD ARWR PRT15 NM0 NMPD NMER */
|
||||
126, 127, 128, 129, 131, 135, 136, 137, 159, 160, 161, 142, 144, 145, 146,
|
||||
/* LB1 LB2 LB3 LB4 LB5 LB6 */
|
||||
174, 173, 172, 171, 170, 169,
|
||||
/* LB1 LB2 LB3 ARW? ARWL? ARWD? ARWR? LB4 LB5 LB6 */
|
||||
174, 173, 172, 120, 140, 141, 143, 171, 170, 169,
|
||||
/* KSTN LOGO LIDL LIDR */
|
||||
0, 167, 176, 177,
|
||||
|
||||
@@ -462,8 +462,8 @@ namespace GHelper.USB
|
||||
0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3,
|
||||
/* LCTL LFNC LWIN LALT SPC RALT RFNC RCTL ARWL ARWD ARWR PRT15 NM0 NMPD NMER */
|
||||
0, 0, 0, 0, 1, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3,
|
||||
/* LB1 LB1 LB3 LB4 LB5 LB6 */
|
||||
5, 5, 4, 6, 7, 7,
|
||||
/* LB1 LB1 LB3 ARW? ARW? ARW? ARW? LB4 LB5 LB6 */
|
||||
5, 5, 4, 3, 3, 3, 3, 6, 7, 7,
|
||||
/* KSTN LOGO LIDL LIDR */
|
||||
3, 0, 0, 3,
|
||||
|
||||
@@ -486,8 +486,8 @@ namespace GHelper.USB
|
||||
0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3,
|
||||
/* LCTL LFNC LWIN LALT SPC RALT RFNC RCTL ARWL ARWD ARWR PRT15 NM0 NMPD NMER */
|
||||
0, 0, 0, 0, 1, 1, 2, 2, 2, 2, 2, 3, 3, 3, 3,
|
||||
/* LB1 LB1 LB3 LB4 LB5 LB6 */
|
||||
5, 5, 4, 6, 7, 7,
|
||||
/* LB1 LB1 LB3 ARW? ARW? ARW? ARW? LB4 LB5 LB6 */
|
||||
5, 5, 4, 2, 2, 2, 3, 6, 7, 7,
|
||||
/* KSTN LOGO LIDL LIDR */
|
||||
3, 0, 0, 3,
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
# G-Helper - Lightweight control tool for Asus laptops
|
||||
[](https://u24.gov.ua/)
|
||||
[](https://GitHub.com/seerge/g-helper/releases/)
|
||||
[](https://GitHub.com/seerge/g-helper/releases/) [](https://GitHub.com/seerge/g-helper/stargazers/)
|
||||
[](https://GitHub.com/seerge/g-helper/releases/) [](https://GitHub.com/seerge/g-helper/stargazers/) <sup>[中文版点这里](https://github.com/seerge/g-helper/blob/main/docs/README.zh-CN.md)</sup>
|
||||
|
||||
Small and lightweight Armoury Crate alternative for Asus laptops offering almost same functionality without extra load and unnecessary services.
|
||||
Works with all popular models, such as ROG Zephyrus G14, G15, G16, M16, Flow X13, Flow X16, Flow Z13, TUF Series, Strix / Scar Series, ProArt, Vivobook, Zenbook, ROG Ally and many more!
|
||||
|
||||
Reference in New Issue
Block a user