mirror of
https://github.com/jkocon/g-helper.git
synced 2026-02-23 13:00:52 +01:00
Compare commits
30 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 |
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -47,7 +47,7 @@ namespace GHelper.Display
|
||||
info.monitorFriendlyDeviceName == internalName)
|
||||
{
|
||||
if (log) Logger.WriteLine(info.monitorFriendlyDeviceName + " HDR: " + colorInfo.advancedColorEnabled + " " + colorInfo.bitsPerColorChannel + " " + colorInfo.value + " " + colorInfo.wideColorEnforced);
|
||||
return colorInfo.advancedColorEnabled && colorInfo.bitsPerColorChannel > 8;
|
||||
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,
|
||||
@@ -52,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;
|
||||
}
|
||||
@@ -87,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"},
|
||||
@@ -114,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;
|
||||
@@ -136,7 +179,24 @@ namespace GHelper.Display
|
||||
|
||||
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.164</AssemblyVersion>
|
||||
<AssemblyVersion>0.165</AssemblyVersion>
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
|
||||
|
||||
@@ -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();
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -506,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>
|
||||
|
||||
@@ -506,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>
|
||||
|
||||
@@ -506,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>
|
||||
|
||||
@@ -506,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>
|
||||
|
||||
@@ -506,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>
|
||||
|
||||
@@ -506,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>
|
||||
|
||||
@@ -506,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>
|
||||
|
||||
@@ -506,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>
|
||||
|
||||
@@ -495,7 +495,7 @@ Nadal chcesz kontynuować?</value>
|
||||
<value>Ekran laptopa</value>
|
||||
</data>
|
||||
<data name="LEDStatusIndicators" xml:space="preserve">
|
||||
<value>LED Status Indicators</value>
|
||||
<value>Wskaźniki stanu</value>
|
||||
</data>
|
||||
<data name="Lid" xml:space="preserve">
|
||||
<value>Pokrywa</value>
|
||||
@@ -506,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>
|
||||
@@ -771,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>
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -506,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>
|
||||
|
||||
@@ -506,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>
|
||||
|
||||
@@ -506,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>
|
||||
|
||||
@@ -495,7 +495,7 @@
|
||||
<value>Дисплей</value>
|
||||
</data>
|
||||
<data name="LEDStatusIndicators" xml:space="preserve">
|
||||
<value>LED Status Indicators</value>
|
||||
<value>LED-Індикатори стану</value>
|
||||
</data>
|
||||
<data name="Lid" xml:space="preserve">
|
||||
<value>Кришка</value>
|
||||
@@ -506,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>
|
||||
@@ -771,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>
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -506,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>
|
||||
|
||||
@@ -506,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>
|
||||
|
||||
4
app/Settings.Designer.cs
generated
4
app/Settings.Designer.cs
generated
@@ -1712,7 +1712,7 @@ namespace GHelper
|
||||
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;
|
||||
@@ -1866,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";
|
||||
//
|
||||
|
||||
@@ -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;
|
||||
@@ -265,9 +265,7 @@ namespace GHelper
|
||||
|
||||
private void LabelCharge_Click(object? sender, EventArgs e)
|
||||
{
|
||||
var report = Environment.GetFolderPath(Environment.SpecialFolder.UserProfile) + "\\battery-report.html";
|
||||
ProcessHelper.RunCMD("powershell", $"powercfg /batteryreport /output \"{report}\"");
|
||||
ProcessHelper.RunCMD("explorer", $"\"{report}\"");
|
||||
BatteryControl.BatteryReport();
|
||||
}
|
||||
|
||||
private void LabelVisual_Click(object? sender, EventArgs e)
|
||||
@@ -1679,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,
|
||||
|
||||
|
||||
Reference in New Issue
Block a user