mirror of
https://github.com/jkocon/g-helper.git
synced 2026-02-23 13:00:52 +01:00
Compare commits
26 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f4d066d407 | ||
|
|
cc96ca9946 | ||
|
|
fb95d9abb2 | ||
|
|
15112cb5c8 | ||
|
|
2632a1b46d | ||
|
|
66a2a1d083 | ||
|
|
aad708d686 | ||
|
|
dba6dae254 | ||
|
|
b26ceccc42 | ||
|
|
4ad0857ec6 | ||
|
|
d49136a542 | ||
|
|
4bbd5da4af | ||
|
|
023d7388bd | ||
|
|
e782467585 | ||
|
|
870ca664c8 | ||
|
|
dd4e89cc97 | ||
|
|
d20aaf9410 | ||
|
|
811ea03ad5 | ||
|
|
414167f008 | ||
|
|
7683f2472b | ||
|
|
6fdffecfb9 | ||
|
|
2ba9a0b114 | ||
|
|
f1af8b87b3 | ||
|
|
13b02b6c2e | ||
|
|
d5416e4304 | ||
|
|
6e2968e37d |
@@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<OutputType>WinExe</OutputType>
|
<OutputType>WinExe</OutputType>
|
||||||
<TargetFramework>net6.0-windows8.0</TargetFramework>
|
<TargetFramework>net7.0-windows</TargetFramework>
|
||||||
<Nullable>enable</Nullable>
|
<Nullable>enable</Nullable>
|
||||||
<UseWindowsForms>True</UseWindowsForms>
|
<UseWindowsForms>True</UseWindowsForms>
|
||||||
<ImplicitUsings>enable</ImplicitUsings>
|
<ImplicitUsings>enable</ImplicitUsings>
|
||||||
@@ -10,7 +10,6 @@
|
|||||||
<ApplicationManifest>app.manifest</ApplicationManifest>
|
<ApplicationManifest>app.manifest</ApplicationManifest>
|
||||||
<StartupObject>GHelper.Program</StartupObject>
|
<StartupObject>GHelper.Program</StartupObject>
|
||||||
<ApplicationIcon>Resources\standard.ico</ApplicationIcon>
|
<ApplicationIcon>Resources\standard.ico</ApplicationIcon>
|
||||||
<SupportedOSPlatformVersion>8.0</SupportedOSPlatformVersion>
|
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
@@ -31,7 +30,7 @@
|
|||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="Newtonsoft.Json" Version="13.0.2" />
|
<PackageReference Include="hidlibrary" Version="3.3.40" />
|
||||||
<PackageReference Include="System.Management" Version="7.0.0" />
|
<PackageReference Include="System.Management" Version="7.0.0" />
|
||||||
<PackageReference Include="TaskScheduler" Version="2.10.1" />
|
<PackageReference Include="TaskScheduler" Version="2.10.1" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|||||||
342
Program.cs
342
Program.cs
@@ -1,9 +1,9 @@
|
|||||||
using Microsoft.Win32.TaskScheduler;
|
using Microsoft.Win32.TaskScheduler;
|
||||||
using Newtonsoft.Json;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Diagnostics;
|
using System.Diagnostics;
|
||||||
using System.Management;
|
using System.Management;
|
||||||
using System.Reflection.Metadata.Ecma335;
|
using System.Runtime.InteropServices;
|
||||||
|
using HidLibrary;
|
||||||
|
using System.Text.Json;
|
||||||
|
|
||||||
public class ASUSWmi
|
public class ASUSWmi
|
||||||
{
|
{
|
||||||
@@ -19,6 +19,7 @@ public class ASUSWmi
|
|||||||
public const int GPUMux = 0x00090016;
|
public const int GPUMux = 0x00090016;
|
||||||
|
|
||||||
public const int BatteryLimit = 0x00120057;
|
public const int BatteryLimit = 0x00120057;
|
||||||
|
public const int ScreenOverdrive = 0x00050019;
|
||||||
|
|
||||||
public const int PerformanceBalanced = 0;
|
public const int PerformanceBalanced = 0;
|
||||||
public const int PerformanceTurbo = 1;
|
public const int PerformanceTurbo = 1;
|
||||||
@@ -49,8 +50,31 @@ public class ASUSWmi
|
|||||||
ManagementBaseObject outParams = this.mo.InvokeMethod(MethodName, inParams, null);
|
ManagementBaseObject outParams = this.mo.InvokeMethod(MethodName, inParams, null);
|
||||||
foreach (PropertyData property in outParams.Properties)
|
foreach (PropertyData property in outParams.Properties)
|
||||||
{
|
{
|
||||||
if (property.Name == "device_status") return int.Parse(property.Value.ToString()) - 65536;
|
if (property.Name == "device_status")
|
||||||
if (property.Name == "result") return int.Parse(property.Value.ToString());
|
{
|
||||||
|
int status;
|
||||||
|
try
|
||||||
|
{
|
||||||
|
status = int.Parse(property.Value.ToString());
|
||||||
|
status -= 65536;
|
||||||
|
return status;
|
||||||
|
}
|
||||||
|
catch
|
||||||
|
{
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (property.Name == "result")
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
return int.Parse(property.Value.ToString());
|
||||||
|
}
|
||||||
|
catch
|
||||||
|
{
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return -1;
|
return -1;
|
||||||
@@ -147,9 +171,14 @@ public class AppConfig
|
|||||||
if (File.Exists(configFile))
|
if (File.Exists(configFile))
|
||||||
{
|
{
|
||||||
string text = File.ReadAllText(configFile);
|
string text = File.ReadAllText(configFile);
|
||||||
config = JsonConvert.DeserializeObject<Dictionary<string, object>>(text);
|
try
|
||||||
if (config is null)
|
{
|
||||||
|
config = JsonSerializer.Deserialize<Dictionary<string, object>>(text);
|
||||||
|
}
|
||||||
|
catch
|
||||||
|
{
|
||||||
initConfig();
|
initConfig();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -162,13 +191,13 @@ public class AppConfig
|
|||||||
{
|
{
|
||||||
config = new Dictionary<string, object>();
|
config = new Dictionary<string, object>();
|
||||||
config["performance_mode"] = 0;
|
config["performance_mode"] = 0;
|
||||||
string jsonString = JsonConvert.SerializeObject(config);
|
string jsonString = JsonSerializer.Serialize(config);
|
||||||
File.WriteAllText(configFile, jsonString);
|
File.WriteAllText(configFile, jsonString);
|
||||||
}
|
}
|
||||||
|
|
||||||
public int getConfig(string name)
|
public int getConfig(string name)
|
||||||
{
|
{
|
||||||
if (config.ContainsKey(name))
|
if (config.ContainsKey(name))
|
||||||
return int.Parse(config[name].ToString());
|
return int.Parse(config[name].ToString());
|
||||||
else return -1;
|
else return -1;
|
||||||
}
|
}
|
||||||
@@ -176,7 +205,7 @@ public class AppConfig
|
|||||||
public void setConfig(string name, int value)
|
public void setConfig(string name, int value)
|
||||||
{
|
{
|
||||||
config[name] = value;
|
config[name] = value;
|
||||||
string jsonString = JsonConvert.SerializeObject(config);
|
string jsonString = JsonSerializer.Serialize(config);
|
||||||
File.WriteAllText(configFile, jsonString);
|
File.WriteAllText(configFile, jsonString);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -184,6 +213,282 @@ public class AppConfig
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public class NativeMethods
|
||||||
|
{
|
||||||
|
|
||||||
|
[DllImport("PowrProf.dll", CharSet = CharSet.Unicode)]
|
||||||
|
static extern UInt32 PowerWriteDCValueIndex(IntPtr RootPowerKey,
|
||||||
|
[MarshalAs(UnmanagedType.LPStruct)] Guid SchemeGuid,
|
||||||
|
[MarshalAs(UnmanagedType.LPStruct)] Guid SubGroupOfPowerSettingsGuid,
|
||||||
|
[MarshalAs(UnmanagedType.LPStruct)] Guid PowerSettingGuid,
|
||||||
|
int AcValueIndex);
|
||||||
|
|
||||||
|
[DllImport("PowrProf.dll", CharSet = CharSet.Unicode)]
|
||||||
|
static extern UInt32 PowerReadACValueIndex(IntPtr RootPowerKey,
|
||||||
|
[MarshalAs(UnmanagedType.LPStruct)] Guid SchemeGuid,
|
||||||
|
[MarshalAs(UnmanagedType.LPStruct)] Guid SubGroupOfPowerSettingsGuid,
|
||||||
|
[MarshalAs(UnmanagedType.LPStruct)] Guid PowerSettingGuid,
|
||||||
|
out IntPtr AcValueIndex
|
||||||
|
);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
[DllImport("PowrProf.dll", CharSet = CharSet.Unicode)]
|
||||||
|
static extern UInt32 PowerWriteACValueIndex(IntPtr RootPowerKey,
|
||||||
|
[MarshalAs(UnmanagedType.LPStruct)] Guid SchemeGuid,
|
||||||
|
[MarshalAs(UnmanagedType.LPStruct)] Guid SubGroupOfPowerSettingsGuid,
|
||||||
|
[MarshalAs(UnmanagedType.LPStruct)] Guid PowerSettingGuid,
|
||||||
|
int AcValueIndex);
|
||||||
|
|
||||||
|
[DllImport("PowrProf.dll", CharSet = CharSet.Unicode)]
|
||||||
|
static extern UInt32 PowerSetActiveScheme(IntPtr RootPowerKey,
|
||||||
|
[MarshalAs(UnmanagedType.LPStruct)] Guid SchemeGuid);
|
||||||
|
|
||||||
|
[DllImport("PowrProf.dll", CharSet = CharSet.Unicode)]
|
||||||
|
static extern UInt32 PowerGetActiveScheme(IntPtr UserPowerKey, out IntPtr ActivePolicyGuid);
|
||||||
|
|
||||||
|
static readonly Guid GUID_CPU = new Guid("54533251-82be-4824-96c1-47b60b740d00");
|
||||||
|
static readonly Guid GUID_BOOST = new Guid("be337238-0d82-4146-a960-4f3749d470c7");
|
||||||
|
|
||||||
|
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Ansi)]
|
||||||
|
public struct DEVMODE
|
||||||
|
{
|
||||||
|
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 32)]
|
||||||
|
public string dmDeviceName;
|
||||||
|
|
||||||
|
public short dmSpecVersion;
|
||||||
|
public short dmDriverVersion;
|
||||||
|
public short dmSize;
|
||||||
|
public short dmDriverExtra;
|
||||||
|
public int dmFields;
|
||||||
|
public int dmPositionX;
|
||||||
|
public int dmPositionY;
|
||||||
|
public int dmDisplayOrientation;
|
||||||
|
public int dmDisplayFixedOutput;
|
||||||
|
public short dmColor;
|
||||||
|
public short dmDuplex;
|
||||||
|
public short dmYResolution;
|
||||||
|
public short dmTTOption;
|
||||||
|
public short dmCollate;
|
||||||
|
|
||||||
|
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 32)]
|
||||||
|
public string dmFormName;
|
||||||
|
|
||||||
|
public short dmLogPixels;
|
||||||
|
public short dmBitsPerPel;
|
||||||
|
public int dmPelsWidth;
|
||||||
|
public int dmPelsHeight;
|
||||||
|
public int dmDisplayFlags;
|
||||||
|
public int dmDisplayFrequency;
|
||||||
|
public int dmICMMethod;
|
||||||
|
public int dmICMIntent;
|
||||||
|
public int dmMediaType;
|
||||||
|
public int dmDitherType;
|
||||||
|
public int dmReserved1;
|
||||||
|
public int dmReserved2;
|
||||||
|
public int dmPanningWidth;
|
||||||
|
public int dmPanningHeight;
|
||||||
|
};
|
||||||
|
|
||||||
|
[Flags()]
|
||||||
|
public enum DisplaySettingsFlags : int
|
||||||
|
{
|
||||||
|
CDS_UPDATEREGISTRY = 1,
|
||||||
|
CDS_TEST = 2,
|
||||||
|
CDS_FULLSCREEN = 4,
|
||||||
|
CDS_GLOBAL = 8,
|
||||||
|
CDS_SET_PRIMARY = 0x10,
|
||||||
|
CDS_RESET = 0x40000000,
|
||||||
|
CDS_NORESET = 0x10000000
|
||||||
|
}
|
||||||
|
|
||||||
|
// PInvoke declaration for EnumDisplaySettings Win32 API
|
||||||
|
[DllImport("user32.dll")]
|
||||||
|
public static extern int EnumDisplaySettingsEx(
|
||||||
|
string lpszDeviceName,
|
||||||
|
int iModeNum,
|
||||||
|
ref DEVMODE lpDevMode);
|
||||||
|
|
||||||
|
// PInvoke declaration for ChangeDisplaySettings Win32 API
|
||||||
|
[DllImport("user32.dll")]
|
||||||
|
public static extern int ChangeDisplaySettingsEx(
|
||||||
|
string lpszDeviceName, ref DEVMODE lpDevMode, IntPtr hwnd,
|
||||||
|
DisplaySettingsFlags dwflags, IntPtr lParam);
|
||||||
|
|
||||||
|
|
||||||
|
public const int ENUM_CURRENT_SETTINGS = -1;
|
||||||
|
|
||||||
|
public const string laptopScreenName = "\\\\.\\DISPLAY1";
|
||||||
|
|
||||||
|
public static DEVMODE CreateDevmode()
|
||||||
|
{
|
||||||
|
DEVMODE dm = new DEVMODE();
|
||||||
|
dm.dmDeviceName = new String(new char[32]);
|
||||||
|
dm.dmFormName = new String(new char[32]);
|
||||||
|
dm.dmSize = (short)Marshal.SizeOf(dm);
|
||||||
|
return dm;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static Screen FindLaptopScreen()
|
||||||
|
{
|
||||||
|
var screens = Screen.AllScreens;
|
||||||
|
Screen laptopScreen = null;
|
||||||
|
|
||||||
|
foreach (var screen in screens)
|
||||||
|
{
|
||||||
|
if (screen.DeviceName == laptopScreenName)
|
||||||
|
{
|
||||||
|
laptopScreen = screen;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (laptopScreen is null) return null;
|
||||||
|
else return laptopScreen;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static int GetRefreshRate()
|
||||||
|
{
|
||||||
|
DEVMODE dm = CreateDevmode();
|
||||||
|
|
||||||
|
Screen laptopScreen = FindLaptopScreen();
|
||||||
|
int frequency = -1;
|
||||||
|
|
||||||
|
if (laptopScreen is null)
|
||||||
|
return -1;
|
||||||
|
|
||||||
|
if (0 != NativeMethods.EnumDisplaySettingsEx(laptopScreen.DeviceName, NativeMethods.ENUM_CURRENT_SETTINGS, ref dm))
|
||||||
|
{
|
||||||
|
frequency = dm.dmDisplayFrequency;
|
||||||
|
}
|
||||||
|
|
||||||
|
return frequency;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static int SetRefreshRate(int frequency = 120)
|
||||||
|
{
|
||||||
|
DEVMODE dm = CreateDevmode();
|
||||||
|
Screen laptopScreen = FindLaptopScreen();
|
||||||
|
|
||||||
|
if (laptopScreen is null)
|
||||||
|
return -1;
|
||||||
|
|
||||||
|
if (0 != NativeMethods.EnumDisplaySettingsEx(laptopScreen.DeviceName, NativeMethods.ENUM_CURRENT_SETTINGS, ref dm))
|
||||||
|
{
|
||||||
|
dm.dmDisplayFrequency = frequency;
|
||||||
|
int iRet = NativeMethods.ChangeDisplaySettingsEx(laptopScreen.DeviceName, ref dm, IntPtr.Zero, DisplaySettingsFlags.CDS_UPDATEREGISTRY, IntPtr.Zero);
|
||||||
|
return iRet;
|
||||||
|
}
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
static Guid GetActiveScheme()
|
||||||
|
{
|
||||||
|
IntPtr pActiveSchemeGuid;
|
||||||
|
var hr = PowerGetActiveScheme(IntPtr.Zero, out pActiveSchemeGuid);
|
||||||
|
Guid activeSchemeGuid = (Guid)Marshal.PtrToStructure(pActiveSchemeGuid, typeof(Guid));
|
||||||
|
return activeSchemeGuid;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static int GetCPUBoost()
|
||||||
|
{
|
||||||
|
IntPtr AcValueIndex;
|
||||||
|
Guid activeSchemeGuid = GetActiveScheme();
|
||||||
|
|
||||||
|
UInt32 value = PowerReadACValueIndex(IntPtr.Zero,
|
||||||
|
activeSchemeGuid,
|
||||||
|
GUID_CPU,
|
||||||
|
GUID_BOOST, out AcValueIndex);
|
||||||
|
|
||||||
|
return AcValueIndex.ToInt32();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void SetCPUBoost(int boost = 0)
|
||||||
|
{
|
||||||
|
Guid activeSchemeGuid = GetActiveScheme();
|
||||||
|
|
||||||
|
var hr = PowerWriteACValueIndex(
|
||||||
|
IntPtr.Zero,
|
||||||
|
activeSchemeGuid,
|
||||||
|
GUID_CPU,
|
||||||
|
GUID_BOOST,
|
||||||
|
boost);
|
||||||
|
|
||||||
|
PowerSetActiveScheme(IntPtr.Zero, activeSchemeGuid);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public class Aura
|
||||||
|
{
|
||||||
|
|
||||||
|
static byte[] MESSAGE_SET = { 0x5d, 0xb5 };
|
||||||
|
static byte[] MESSAGE_APPLY = { 0x5d, 0xb4 };
|
||||||
|
|
||||||
|
public const int Static = 0;
|
||||||
|
public const int Breathe = 1;
|
||||||
|
public const int Strobe = 2;
|
||||||
|
public const int Rainbow = 3;
|
||||||
|
|
||||||
|
public const int SpeedSlow = 0;
|
||||||
|
public const int SpeedMedium = 1;
|
||||||
|
public const int SpeedHigh = 2;
|
||||||
|
|
||||||
|
public static int Mode = Static;
|
||||||
|
public static Color Color1 = Color.White;
|
||||||
|
public static Color Color2 = Color.Black;
|
||||||
|
public static int Speed = SpeedSlow;
|
||||||
|
|
||||||
|
public static byte[] AuraMessage(int mode, Color color, Color color2, int speed)
|
||||||
|
{
|
||||||
|
byte[] msg = new byte[17];
|
||||||
|
msg[0] = 0x5d;
|
||||||
|
msg[1] = 0xb3;
|
||||||
|
msg[2] = 0x00; // Zone
|
||||||
|
msg[3] = (byte)mode; // Aura Mode
|
||||||
|
msg[4] = (byte)(color.R); // R
|
||||||
|
msg[5] = (byte)(color.G); // G
|
||||||
|
msg[6] = (byte)(color.B); // B
|
||||||
|
msg[7] = (byte)speed; // aura.speed as u8;
|
||||||
|
msg[8] = 0; // aura.direction as u8;
|
||||||
|
msg[10] = (byte)(color2.R); // R
|
||||||
|
msg[11] = (byte)(color2.G); // G
|
||||||
|
msg[12] = (byte)(color2.B); // B
|
||||||
|
return msg;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void ApplyAura()
|
||||||
|
{
|
||||||
|
|
||||||
|
HidDevice[] HidDeviceList;
|
||||||
|
int[] deviceIds = { 0x1854, 0x1869, 0x1866, 0x19b6 };
|
||||||
|
|
||||||
|
HidDeviceList = HidDevices.Enumerate(0x0b05, deviceIds).ToArray();
|
||||||
|
|
||||||
|
foreach (HidDevice device in HidDeviceList)
|
||||||
|
{
|
||||||
|
if (device.IsConnected)
|
||||||
|
{
|
||||||
|
if (device.Description.IndexOf("HID") >= 0)
|
||||||
|
{
|
||||||
|
device.OpenDevice();
|
||||||
|
byte[] msg = AuraMessage(Mode, Color1, Color2, Speed);
|
||||||
|
device.Write(msg);
|
||||||
|
device.Write(MESSAGE_SET);
|
||||||
|
device.Write(MESSAGE_APPLY);
|
||||||
|
device.CloseDevice();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
namespace GHelper
|
namespace GHelper
|
||||||
{
|
{
|
||||||
static class Program
|
static class Program
|
||||||
@@ -218,11 +523,15 @@ namespace GHelper
|
|||||||
settingsForm = new SettingsForm();
|
settingsForm = new SettingsForm();
|
||||||
|
|
||||||
settingsForm.InitGPUMode();
|
settingsForm.InitGPUMode();
|
||||||
|
settingsForm.InitBoost();
|
||||||
|
settingsForm.InitAura();
|
||||||
|
|
||||||
settingsForm.SetPerformanceMode(config.getConfig("performance_mode"));
|
settingsForm.SetPerformanceMode(config.getConfig("performance_mode"));
|
||||||
settingsForm.SetBatteryChargeLimit(config.getConfig("charge_limit"));
|
settingsForm.SetBatteryChargeLimit(config.getConfig("charge_limit"));
|
||||||
|
|
||||||
settingsForm.VisualiseGPUAuto(config.getConfig("gpu_auto"));
|
settingsForm.VisualiseGPUAuto(config.getConfig("gpu_auto"));
|
||||||
|
settingsForm.VisualiseScreenAuto(config.getConfig("screen_auto"));
|
||||||
|
|
||||||
settingsForm.SetStartupCheck(scheduler.IsScheduled());
|
settingsForm.SetStartupCheck(scheduler.IsScheduled());
|
||||||
|
|
||||||
Application.Run();
|
Application.Run();
|
||||||
@@ -233,6 +542,9 @@ namespace GHelper
|
|||||||
static void WatcherEventArrived(object sender, EventArrivedEventArgs e)
|
static void WatcherEventArrived(object sender, EventArrivedEventArgs e)
|
||||||
{
|
{
|
||||||
var collection = (ManagementEventWatcher)sender;
|
var collection = (ManagementEventWatcher)sender;
|
||||||
|
|
||||||
|
if (e.NewEvent is null) return;
|
||||||
|
|
||||||
int EventID = int.Parse(e.NewEvent["EventID"].ToString());
|
int EventID = int.Parse(e.NewEvent["EventID"].ToString());
|
||||||
|
|
||||||
Debug.WriteLine(EventID);
|
Debug.WriteLine(EventID);
|
||||||
@@ -246,10 +558,17 @@ namespace GHelper
|
|||||||
settingsForm.CyclePerformanceMode();
|
settingsForm.CyclePerformanceMode();
|
||||||
});
|
});
|
||||||
return;
|
return;
|
||||||
|
case 179: // FN+F4
|
||||||
|
settingsForm.BeginInvoke(delegate
|
||||||
|
{
|
||||||
|
settingsForm.CycleAuraMode();
|
||||||
|
});
|
||||||
|
return;
|
||||||
case 87: // Battery
|
case 87: // Battery
|
||||||
settingsForm.BeginInvoke(delegate
|
settingsForm.BeginInvoke(delegate
|
||||||
{
|
{
|
||||||
settingsForm.AutoGPUMode(0);
|
settingsForm.AutoGPUMode(0);
|
||||||
|
settingsForm.AutoScreen(0);
|
||||||
});
|
});
|
||||||
return;
|
return;
|
||||||
case 88: // Plugged
|
case 88: // Plugged
|
||||||
@@ -257,6 +576,7 @@ namespace GHelper
|
|||||||
settingsForm.BeginInvoke(delegate
|
settingsForm.BeginInvoke(delegate
|
||||||
{
|
{
|
||||||
settingsForm.AutoGPUMode(1);
|
settingsForm.AutoGPUMode(1);
|
||||||
|
settingsForm.AutoScreen(1);
|
||||||
});
|
});
|
||||||
return;
|
return;
|
||||||
|
|
||||||
@@ -276,6 +596,8 @@ namespace GHelper
|
|||||||
settingsForm.Show();
|
settingsForm.Show();
|
||||||
settingsForm.Activate();
|
settingsForm.Activate();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
trayIcon.Icon = trayIcon.Icon; // refreshing icon as it get's blurred when screen resolution changes
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
20
Properties/Resources.Designer.cs
generated
20
Properties/Resources.Designer.cs
generated
@@ -80,6 +80,26 @@ namespace GHelper.Properties {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
||||||
|
/// </summary>
|
||||||
|
internal static System.Drawing.Bitmap icons8_keyboard_48 {
|
||||||
|
get {
|
||||||
|
object obj = ResourceManager.GetObject("icons8-keyboard-48", resourceCulture);
|
||||||
|
return ((System.Drawing.Bitmap)(obj));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
||||||
|
/// </summary>
|
||||||
|
internal static System.Drawing.Bitmap icons8_laptop_48 {
|
||||||
|
get {
|
||||||
|
object obj = ResourceManager.GetObject("icons8-laptop-48", resourceCulture);
|
||||||
|
return ((System.Drawing.Bitmap)(obj));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|||||||
@@ -118,22 +118,28 @@
|
|||||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
</resheader>
|
</resheader>
|
||||||
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
|
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
|
||||||
<data name="icons8-charging-battery-48" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
|
||||||
<value>..\Resources\icons8-charging-battery-48.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
|
||||||
</data>
|
|
||||||
<data name="eco" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
<data name="eco" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||||
<value>..\Resources\eco.ico;System.Drawing.Icon, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
<value>..\Resources\eco.ico;System.Drawing.Icon, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="standard" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
<data name="icons8-keyboard-48" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||||
<value>..\Resources\standard.ico;System.Drawing.Icon, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
<value>..\Resources\icons8-keyboard-48.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="ultimate" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
<data name="ultimate" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||||
<value>..\Resources\ultimate.ico;System.Drawing.Icon, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
<value>..\Resources\ultimate.ico;System.Drawing.Icon, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="icons8-video-card-48" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
<data name="standard" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||||
<value>..\Resources\icons8-video-card-48.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
<value>..\Resources\standard.ico;System.Drawing.Icon, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="icons8-speed-48" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
<data name="icons8-speed-48" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||||
<value>..\Resources\icons8-speed-48.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
<value>..\Resources\icons8-speed-48.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||||
</data>
|
</data>
|
||||||
|
<data name="icons8-video-card-48" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||||
|
<value>..\Resources\icons8-video-card-48.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||||
|
</data>
|
||||||
|
<data name="icons8-charging-battery-48" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||||
|
<value>..\Resources\icons8-charging-battery-48.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||||
|
</data>
|
||||||
|
<data name="icons8-laptop-48" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||||
|
<value>..\Resources\icons8-laptop-48.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||||
|
</data>
|
||||||
</root>
|
</root>
|
||||||
23
README.md
23
README.md
@@ -1,8 +1,10 @@
|
|||||||
# G14-Helper
|
# G14-Helper
|
||||||
|
|
||||||
|
A tiny system tray utility that allows you set performance and GPU profiles for your laptop. Same as ASUS Armory Crate does but without it completely!.
|
||||||
|
|
||||||
Designed for Asus Zephyrus G14 2022 (with AMD Radeon iGPU and dGPU). But could and should potentially work for G14 of 2021 and 2020, G15, X FLOW, and other ROG models.
|
Designed for Asus Zephyrus G14 2022 (with AMD Radeon iGPU and dGPU). But could and should potentially work for G14 of 2021 and 2020, G15, X FLOW, and other ROG models.
|
||||||
|
|
||||||
A tiny system tray utility that allows you set performance and GPU profiles for your laptop. Same as ASUS Armory Crate does but without it completely!.
|

|
||||||
|
|
||||||
## Performance Profile switching
|
## Performance Profile switching
|
||||||
|
|
||||||
@@ -20,11 +22,18 @@ Profiles are **same** as in Armory Crate, including default fan curves
|
|||||||
|
|
||||||
## Extras
|
## Extras
|
||||||
|
|
||||||
1. **Maximum battery charge rate** limit (60% / 80% / 100%) to preserve your battery
|
1. Keyboard backlight control (basic aura modes and colors)
|
||||||
2. CPU and GPU relative fan speed monitoring
|
2. **Maximum battery charge rate** limit (60% / 80% / 100%) to preserve your battery
|
||||||
3. Automatic switching of Standard/Eco GPU modes when laptop is plugged / unplugged!
|
3. CPU and GPU relative fan speed monitoring
|
||||||
4. Start with windows (optional)
|
4. Automatic switching of Standard/Eco GPU modes when laptop is plugged / unplugged!
|
||||||
|
5. FN+F5 an M4 (Rog) keys cycle through Performance modes
|
||||||
|
6. Screen resolution and display overdrive switching
|
||||||
|
7. Run on startup (optional)
|
||||||
|
|
||||||
|
## Things still missing
|
||||||
|
|
||||||
|
1. Custom fan profiles
|
||||||
|
2. Anime matrix control
|
||||||
|
|
||||||
## How to install
|
## How to install
|
||||||
|
|
||||||
@@ -39,9 +48,7 @@ I don`t have Microsoft certificate to sign app yet, so if you set a warning from
|
|||||||
|
|
||||||
Alternatively you can comile and run project by yourself :)
|
Alternatively you can comile and run project by yourself :)
|
||||||
|
|
||||||

|
Settings file is storer at %AppData%\GHelper
|
||||||
|
|
||||||
Settings are located in APPDATA\ROAMING
|
|
||||||
|
|
||||||
P.S.: It's not recommended to use app in combination with Armory Crate, cause they adjust same settings.
|
P.S.: It's not recommended to use app in combination with Armory Crate, cause they adjust same settings.
|
||||||
Please keep in mind, that if you also run MyASUS app periodically it will also try to adjust same battery charge settings
|
Please keep in mind, that if you also run MyASUS app periodically it will also try to adjust same battery charge settings
|
||||||
|
|||||||
BIN
Resources/icons8-keyboard-48.png
Normal file
BIN
Resources/icons8-keyboard-48.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 515 B |
320
Settings.Designer.cs
generated
320
Settings.Designer.cs
generated
@@ -28,6 +28,7 @@
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
private void InitializeComponent()
|
private void InitializeComponent()
|
||||||
{
|
{
|
||||||
|
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(SettingsForm));
|
||||||
this.checkStartup = new System.Windows.Forms.CheckBox();
|
this.checkStartup = new System.Windows.Forms.CheckBox();
|
||||||
this.trackBattery = new System.Windows.Forms.TrackBar();
|
this.trackBattery = new System.Windows.Forms.TrackBar();
|
||||||
this.labelBattery = new System.Windows.Forms.Label();
|
this.labelBattery = new System.Windows.Forms.Label();
|
||||||
@@ -49,19 +50,36 @@
|
|||||||
this.labelPerf = new System.Windows.Forms.Label();
|
this.labelPerf = new System.Windows.Forms.Label();
|
||||||
this.checkGPU = new System.Windows.Forms.CheckBox();
|
this.checkGPU = new System.Windows.Forms.CheckBox();
|
||||||
this.buttonQuit = new System.Windows.Forms.Button();
|
this.buttonQuit = new System.Windows.Forms.Button();
|
||||||
|
this.pictureScreen = new System.Windows.Forms.PictureBox();
|
||||||
|
this.labelSreen = new System.Windows.Forms.Label();
|
||||||
|
this.tableScreen = new System.Windows.Forms.TableLayoutPanel();
|
||||||
|
this.button120Hz = new System.Windows.Forms.Button();
|
||||||
|
this.button60Hz = new System.Windows.Forms.Button();
|
||||||
|
this.checkScreen = new System.Windows.Forms.CheckBox();
|
||||||
|
this.checkBoost = new System.Windows.Forms.CheckBox();
|
||||||
|
this.pictureBox1 = new System.Windows.Forms.PictureBox();
|
||||||
|
this.label1 = new System.Windows.Forms.Label();
|
||||||
|
this.comboKeyboard = new System.Windows.Forms.ComboBox();
|
||||||
|
this.buttonKeyboardColor = new System.Windows.Forms.Button();
|
||||||
|
this.pictureBox2 = new System.Windows.Forms.PictureBox();
|
||||||
((System.ComponentModel.ISupportInitialize)(this.trackBattery)).BeginInit();
|
((System.ComponentModel.ISupportInitialize)(this.trackBattery)).BeginInit();
|
||||||
((System.ComponentModel.ISupportInitialize)(this.pictureBattery)).BeginInit();
|
((System.ComponentModel.ISupportInitialize)(this.pictureBattery)).BeginInit();
|
||||||
this.tableGPU.SuspendLayout();
|
this.tableGPU.SuspendLayout();
|
||||||
((System.ComponentModel.ISupportInitialize)(this.pictureGPU)).BeginInit();
|
((System.ComponentModel.ISupportInitialize)(this.pictureGPU)).BeginInit();
|
||||||
this.tablePerf.SuspendLayout();
|
this.tablePerf.SuspendLayout();
|
||||||
((System.ComponentModel.ISupportInitialize)(this.picturePerf)).BeginInit();
|
((System.ComponentModel.ISupportInitialize)(this.picturePerf)).BeginInit();
|
||||||
|
((System.ComponentModel.ISupportInitialize)(this.pictureScreen)).BeginInit();
|
||||||
|
this.tableScreen.SuspendLayout();
|
||||||
|
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit();
|
||||||
|
((System.ComponentModel.ISupportInitialize)(this.pictureBox2)).BeginInit();
|
||||||
this.SuspendLayout();
|
this.SuspendLayout();
|
||||||
//
|
//
|
||||||
// checkStartup
|
// checkStartup
|
||||||
//
|
//
|
||||||
this.checkStartup.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
|
this.checkStartup.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
|
||||||
this.checkStartup.AutoSize = true;
|
this.checkStartup.AutoSize = true;
|
||||||
this.checkStartup.Location = new System.Drawing.Point(34, 640);
|
this.checkStartup.Location = new System.Drawing.Point(31, 1022);
|
||||||
|
this.checkStartup.Margin = new System.Windows.Forms.Padding(4, 2, 4, 2);
|
||||||
this.checkStartup.Name = "checkStartup";
|
this.checkStartup.Name = "checkStartup";
|
||||||
this.checkStartup.Size = new System.Drawing.Size(206, 36);
|
this.checkStartup.Size = new System.Drawing.Size(206, 36);
|
||||||
this.checkStartup.TabIndex = 2;
|
this.checkStartup.TabIndex = 2;
|
||||||
@@ -74,11 +92,12 @@
|
|||||||
this.trackBattery.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
|
this.trackBattery.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
|
||||||
| System.Windows.Forms.AnchorStyles.Right)));
|
| System.Windows.Forms.AnchorStyles.Right)));
|
||||||
this.trackBattery.LargeChange = 20;
|
this.trackBattery.LargeChange = 20;
|
||||||
this.trackBattery.Location = new System.Drawing.Point(23, 532);
|
this.trackBattery.Location = new System.Drawing.Point(20, 919);
|
||||||
|
this.trackBattery.Margin = new System.Windows.Forms.Padding(4, 2, 4, 2);
|
||||||
this.trackBattery.Maximum = 100;
|
this.trackBattery.Maximum = 100;
|
||||||
this.trackBattery.Minimum = 50;
|
this.trackBattery.Minimum = 50;
|
||||||
this.trackBattery.Name = "trackBattery";
|
this.trackBattery.Name = "trackBattery";
|
||||||
this.trackBattery.Size = new System.Drawing.Size(702, 90);
|
this.trackBattery.Size = new System.Drawing.Size(690, 90);
|
||||||
this.trackBattery.SmallChange = 10;
|
this.trackBattery.SmallChange = 10;
|
||||||
this.trackBattery.TabIndex = 3;
|
this.trackBattery.TabIndex = 3;
|
||||||
this.trackBattery.TickFrequency = 10;
|
this.trackBattery.TickFrequency = 10;
|
||||||
@@ -89,7 +108,8 @@
|
|||||||
//
|
//
|
||||||
this.labelBattery.AutoSize = true;
|
this.labelBattery.AutoSize = true;
|
||||||
this.labelBattery.Font = new System.Drawing.Font("Segoe UI", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point);
|
this.labelBattery.Font = new System.Drawing.Font("Segoe UI", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point);
|
||||||
this.labelBattery.Location = new System.Drawing.Point(83, 486);
|
this.labelBattery.Location = new System.Drawing.Point(82, 876);
|
||||||
|
this.labelBattery.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
|
||||||
this.labelBattery.Name = "labelBattery";
|
this.labelBattery.Name = "labelBattery";
|
||||||
this.labelBattery.Size = new System.Drawing.Size(248, 32);
|
this.labelBattery.Size = new System.Drawing.Size(248, 32);
|
||||||
this.labelBattery.TabIndex = 4;
|
this.labelBattery.TabIndex = 4;
|
||||||
@@ -99,7 +119,8 @@
|
|||||||
//
|
//
|
||||||
this.labelBatteryLimit.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
|
this.labelBatteryLimit.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
|
||||||
this.labelBatteryLimit.AutoSize = true;
|
this.labelBatteryLimit.AutoSize = true;
|
||||||
this.labelBatteryLimit.Location = new System.Drawing.Point(647, 484);
|
this.labelBatteryLimit.Location = new System.Drawing.Point(633, 874);
|
||||||
|
this.labelBatteryLimit.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
|
||||||
this.labelBatteryLimit.Name = "labelBatteryLimit";
|
this.labelBatteryLimit.Name = "labelBatteryLimit";
|
||||||
this.labelBatteryLimit.Size = new System.Drawing.Size(73, 32);
|
this.labelBatteryLimit.Size = new System.Drawing.Size(73, 32);
|
||||||
this.labelBatteryLimit.TabIndex = 5;
|
this.labelBatteryLimit.TabIndex = 5;
|
||||||
@@ -107,10 +128,12 @@
|
|||||||
//
|
//
|
||||||
// pictureBattery
|
// pictureBattery
|
||||||
//
|
//
|
||||||
this.pictureBattery.Image = global::GHelper.Properties.Resources.icons8_charging_battery_48;
|
this.pictureBattery.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("pictureBattery.BackgroundImage")));
|
||||||
this.pictureBattery.Location = new System.Drawing.Point(32, 478);
|
this.pictureBattery.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Zoom;
|
||||||
|
this.pictureBattery.Location = new System.Drawing.Point(30, 868);
|
||||||
|
this.pictureBattery.Margin = new System.Windows.Forms.Padding(4, 2, 4, 2);
|
||||||
this.pictureBattery.Name = "pictureBattery";
|
this.pictureBattery.Name = "pictureBattery";
|
||||||
this.pictureBattery.Size = new System.Drawing.Size(48, 48);
|
this.pictureBattery.Size = new System.Drawing.Size(48, 47);
|
||||||
this.pictureBattery.TabIndex = 6;
|
this.pictureBattery.TabIndex = 6;
|
||||||
this.pictureBattery.TabStop = false;
|
this.pictureBattery.TabStop = false;
|
||||||
//
|
//
|
||||||
@@ -118,7 +141,8 @@
|
|||||||
//
|
//
|
||||||
this.labelGPUFan.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
|
this.labelGPUFan.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
|
||||||
this.labelGPUFan.AutoSize = true;
|
this.labelGPUFan.AutoSize = true;
|
||||||
this.labelGPUFan.Location = new System.Drawing.Point(566, 242);
|
this.labelGPUFan.Location = new System.Drawing.Point(546, 262);
|
||||||
|
this.labelGPUFan.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
|
||||||
this.labelGPUFan.Name = "labelGPUFan";
|
this.labelGPUFan.Name = "labelGPUFan";
|
||||||
this.labelGPUFan.Size = new System.Drawing.Size(155, 32);
|
this.labelGPUFan.Size = new System.Drawing.Size(155, 32);
|
||||||
this.labelGPUFan.TabIndex = 8;
|
this.labelGPUFan.TabIndex = 8;
|
||||||
@@ -135,11 +159,12 @@
|
|||||||
this.tableGPU.Controls.Add(this.buttonUltimate, 2, 0);
|
this.tableGPU.Controls.Add(this.buttonUltimate, 2, 0);
|
||||||
this.tableGPU.Controls.Add(this.buttonStandard, 1, 0);
|
this.tableGPU.Controls.Add(this.buttonStandard, 1, 0);
|
||||||
this.tableGPU.Controls.Add(this.buttonEco, 0, 0);
|
this.tableGPU.Controls.Add(this.buttonEco, 0, 0);
|
||||||
this.tableGPU.Location = new System.Drawing.Point(23, 289);
|
this.tableGPU.Location = new System.Drawing.Point(22, 303);
|
||||||
|
this.tableGPU.Margin = new System.Windows.Forms.Padding(4, 2, 4, 2);
|
||||||
this.tableGPU.Name = "tableGPU";
|
this.tableGPU.Name = "tableGPU";
|
||||||
this.tableGPU.RowCount = 1;
|
this.tableGPU.RowCount = 1;
|
||||||
this.tableGPU.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 106F));
|
this.tableGPU.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 107F));
|
||||||
this.tableGPU.Size = new System.Drawing.Size(702, 106);
|
this.tableGPU.Size = new System.Drawing.Size(690, 107);
|
||||||
this.tableGPU.TabIndex = 7;
|
this.tableGPU.TabIndex = 7;
|
||||||
//
|
//
|
||||||
// buttonUltimate
|
// buttonUltimate
|
||||||
@@ -148,10 +173,10 @@
|
|||||||
this.buttonUltimate.Dock = System.Windows.Forms.DockStyle.Fill;
|
this.buttonUltimate.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||||
this.buttonUltimate.FlatAppearance.BorderSize = 0;
|
this.buttonUltimate.FlatAppearance.BorderSize = 0;
|
||||||
this.buttonUltimate.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
|
this.buttonUltimate.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
|
||||||
this.buttonUltimate.Location = new System.Drawing.Point(478, 10);
|
this.buttonUltimate.Location = new System.Drawing.Point(469, 11);
|
||||||
this.buttonUltimate.Margin = new System.Windows.Forms.Padding(10);
|
this.buttonUltimate.Margin = new System.Windows.Forms.Padding(9, 11, 9, 11);
|
||||||
this.buttonUltimate.Name = "buttonUltimate";
|
this.buttonUltimate.Name = "buttonUltimate";
|
||||||
this.buttonUltimate.Size = new System.Drawing.Size(214, 86);
|
this.buttonUltimate.Size = new System.Drawing.Size(212, 85);
|
||||||
this.buttonUltimate.TabIndex = 2;
|
this.buttonUltimate.TabIndex = 2;
|
||||||
this.buttonUltimate.Text = "Ultimate";
|
this.buttonUltimate.Text = "Ultimate";
|
||||||
this.buttonUltimate.UseVisualStyleBackColor = false;
|
this.buttonUltimate.UseVisualStyleBackColor = false;
|
||||||
@@ -162,10 +187,10 @@
|
|||||||
this.buttonStandard.Dock = System.Windows.Forms.DockStyle.Fill;
|
this.buttonStandard.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||||
this.buttonStandard.FlatAppearance.BorderSize = 0;
|
this.buttonStandard.FlatAppearance.BorderSize = 0;
|
||||||
this.buttonStandard.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
|
this.buttonStandard.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
|
||||||
this.buttonStandard.Location = new System.Drawing.Point(244, 10);
|
this.buttonStandard.Location = new System.Drawing.Point(239, 11);
|
||||||
this.buttonStandard.Margin = new System.Windows.Forms.Padding(10);
|
this.buttonStandard.Margin = new System.Windows.Forms.Padding(9, 11, 9, 11);
|
||||||
this.buttonStandard.Name = "buttonStandard";
|
this.buttonStandard.Name = "buttonStandard";
|
||||||
this.buttonStandard.Size = new System.Drawing.Size(214, 86);
|
this.buttonStandard.Size = new System.Drawing.Size(212, 85);
|
||||||
this.buttonStandard.TabIndex = 1;
|
this.buttonStandard.TabIndex = 1;
|
||||||
this.buttonStandard.Text = "Standard";
|
this.buttonStandard.Text = "Standard";
|
||||||
this.buttonStandard.UseVisualStyleBackColor = false;
|
this.buttonStandard.UseVisualStyleBackColor = false;
|
||||||
@@ -177,10 +202,10 @@
|
|||||||
this.buttonEco.Dock = System.Windows.Forms.DockStyle.Fill;
|
this.buttonEco.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||||
this.buttonEco.FlatAppearance.BorderSize = 0;
|
this.buttonEco.FlatAppearance.BorderSize = 0;
|
||||||
this.buttonEco.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
|
this.buttonEco.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
|
||||||
this.buttonEco.Location = new System.Drawing.Point(10, 10);
|
this.buttonEco.Location = new System.Drawing.Point(9, 11);
|
||||||
this.buttonEco.Margin = new System.Windows.Forms.Padding(10);
|
this.buttonEco.Margin = new System.Windows.Forms.Padding(9, 11, 9, 11);
|
||||||
this.buttonEco.Name = "buttonEco";
|
this.buttonEco.Name = "buttonEco";
|
||||||
this.buttonEco.Size = new System.Drawing.Size(214, 86);
|
this.buttonEco.Size = new System.Drawing.Size(212, 85);
|
||||||
this.buttonEco.TabIndex = 0;
|
this.buttonEco.TabIndex = 0;
|
||||||
this.buttonEco.Text = "Eco";
|
this.buttonEco.Text = "Eco";
|
||||||
this.buttonEco.UseVisualStyleBackColor = false;
|
this.buttonEco.UseVisualStyleBackColor = false;
|
||||||
@@ -189,7 +214,8 @@
|
|||||||
//
|
//
|
||||||
this.labelGPU.AutoSize = true;
|
this.labelGPU.AutoSize = true;
|
||||||
this.labelGPU.Font = new System.Drawing.Font("Segoe UI", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point);
|
this.labelGPU.Font = new System.Drawing.Font("Segoe UI", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point);
|
||||||
this.labelGPU.Location = new System.Drawing.Point(82, 242);
|
this.labelGPU.Location = new System.Drawing.Point(84, 265);
|
||||||
|
this.labelGPU.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
|
||||||
this.labelGPU.Name = "labelGPU";
|
this.labelGPU.Name = "labelGPU";
|
||||||
this.labelGPU.Size = new System.Drawing.Size(136, 32);
|
this.labelGPU.Size = new System.Drawing.Size(136, 32);
|
||||||
this.labelGPU.TabIndex = 9;
|
this.labelGPU.TabIndex = 9;
|
||||||
@@ -197,10 +223,12 @@
|
|||||||
//
|
//
|
||||||
// pictureGPU
|
// pictureGPU
|
||||||
//
|
//
|
||||||
this.pictureGPU.Image = global::GHelper.Properties.Resources.icons8_video_card_48;
|
this.pictureGPU.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("pictureGPU.BackgroundImage")));
|
||||||
this.pictureGPU.Location = new System.Drawing.Point(29, 234);
|
this.pictureGPU.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Zoom;
|
||||||
|
this.pictureGPU.Location = new System.Drawing.Point(32, 256);
|
||||||
|
this.pictureGPU.Margin = new System.Windows.Forms.Padding(4, 2, 4, 2);
|
||||||
this.pictureGPU.Name = "pictureGPU";
|
this.pictureGPU.Name = "pictureGPU";
|
||||||
this.pictureGPU.Size = new System.Drawing.Size(48, 48);
|
this.pictureGPU.Size = new System.Drawing.Size(48, 47);
|
||||||
this.pictureGPU.TabIndex = 10;
|
this.pictureGPU.TabIndex = 10;
|
||||||
this.pictureGPU.TabStop = false;
|
this.pictureGPU.TabStop = false;
|
||||||
//
|
//
|
||||||
@@ -208,7 +236,8 @@
|
|||||||
//
|
//
|
||||||
this.labelCPUFan.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
|
this.labelCPUFan.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
|
||||||
this.labelCPUFan.AutoSize = true;
|
this.labelCPUFan.AutoSize = true;
|
||||||
this.labelCPUFan.Location = new System.Drawing.Point(568, 39);
|
this.labelCPUFan.Location = new System.Drawing.Point(546, 38);
|
||||||
|
this.labelCPUFan.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
|
||||||
this.labelCPUFan.Name = "labelCPUFan";
|
this.labelCPUFan.Name = "labelCPUFan";
|
||||||
this.labelCPUFan.Size = new System.Drawing.Size(154, 32);
|
this.labelCPUFan.Size = new System.Drawing.Size(154, 32);
|
||||||
this.labelCPUFan.TabIndex = 12;
|
this.labelCPUFan.TabIndex = 12;
|
||||||
@@ -225,11 +254,12 @@
|
|||||||
this.tablePerf.Controls.Add(this.buttonTurbo, 2, 0);
|
this.tablePerf.Controls.Add(this.buttonTurbo, 2, 0);
|
||||||
this.tablePerf.Controls.Add(this.buttonBalanced, 1, 0);
|
this.tablePerf.Controls.Add(this.buttonBalanced, 1, 0);
|
||||||
this.tablePerf.Controls.Add(this.buttonSilent, 0, 0);
|
this.tablePerf.Controls.Add(this.buttonSilent, 0, 0);
|
||||||
this.tablePerf.Location = new System.Drawing.Point(23, 90);
|
this.tablePerf.Location = new System.Drawing.Point(22, 79);
|
||||||
|
this.tablePerf.Margin = new System.Windows.Forms.Padding(4, 2, 4, 2);
|
||||||
this.tablePerf.Name = "tablePerf";
|
this.tablePerf.Name = "tablePerf";
|
||||||
this.tablePerf.RowCount = 1;
|
this.tablePerf.RowCount = 1;
|
||||||
this.tablePerf.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 106F));
|
this.tablePerf.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 107F));
|
||||||
this.tablePerf.Size = new System.Drawing.Size(702, 106);
|
this.tablePerf.Size = new System.Drawing.Size(690, 107);
|
||||||
this.tablePerf.TabIndex = 11;
|
this.tablePerf.TabIndex = 11;
|
||||||
//
|
//
|
||||||
// buttonTurbo
|
// buttonTurbo
|
||||||
@@ -239,10 +269,10 @@
|
|||||||
this.buttonTurbo.FlatAppearance.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(192)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))));
|
this.buttonTurbo.FlatAppearance.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(192)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))));
|
||||||
this.buttonTurbo.FlatAppearance.BorderSize = 0;
|
this.buttonTurbo.FlatAppearance.BorderSize = 0;
|
||||||
this.buttonTurbo.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
|
this.buttonTurbo.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
|
||||||
this.buttonTurbo.Location = new System.Drawing.Point(478, 10);
|
this.buttonTurbo.Location = new System.Drawing.Point(469, 11);
|
||||||
this.buttonTurbo.Margin = new System.Windows.Forms.Padding(10);
|
this.buttonTurbo.Margin = new System.Windows.Forms.Padding(9, 11, 9, 11);
|
||||||
this.buttonTurbo.Name = "buttonTurbo";
|
this.buttonTurbo.Name = "buttonTurbo";
|
||||||
this.buttonTurbo.Size = new System.Drawing.Size(214, 86);
|
this.buttonTurbo.Size = new System.Drawing.Size(212, 85);
|
||||||
this.buttonTurbo.TabIndex = 2;
|
this.buttonTurbo.TabIndex = 2;
|
||||||
this.buttonTurbo.Text = "Turbo";
|
this.buttonTurbo.Text = "Turbo";
|
||||||
this.buttonTurbo.UseVisualStyleBackColor = false;
|
this.buttonTurbo.UseVisualStyleBackColor = false;
|
||||||
@@ -254,10 +284,10 @@
|
|||||||
this.buttonBalanced.FlatAppearance.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(192)))));
|
this.buttonBalanced.FlatAppearance.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(192)))));
|
||||||
this.buttonBalanced.FlatAppearance.BorderSize = 0;
|
this.buttonBalanced.FlatAppearance.BorderSize = 0;
|
||||||
this.buttonBalanced.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
|
this.buttonBalanced.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
|
||||||
this.buttonBalanced.Location = new System.Drawing.Point(244, 10);
|
this.buttonBalanced.Location = new System.Drawing.Point(239, 11);
|
||||||
this.buttonBalanced.Margin = new System.Windows.Forms.Padding(10);
|
this.buttonBalanced.Margin = new System.Windows.Forms.Padding(9, 11, 9, 11);
|
||||||
this.buttonBalanced.Name = "buttonBalanced";
|
this.buttonBalanced.Name = "buttonBalanced";
|
||||||
this.buttonBalanced.Size = new System.Drawing.Size(214, 86);
|
this.buttonBalanced.Size = new System.Drawing.Size(212, 85);
|
||||||
this.buttonBalanced.TabIndex = 1;
|
this.buttonBalanced.TabIndex = 1;
|
||||||
this.buttonBalanced.Text = "Balanced";
|
this.buttonBalanced.Text = "Balanced";
|
||||||
this.buttonBalanced.UseVisualStyleBackColor = false;
|
this.buttonBalanced.UseVisualStyleBackColor = false;
|
||||||
@@ -270,20 +300,23 @@
|
|||||||
this.buttonSilent.FlatAppearance.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(192)))), ((int)(((byte)(192)))));
|
this.buttonSilent.FlatAppearance.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(192)))), ((int)(((byte)(192)))));
|
||||||
this.buttonSilent.FlatAppearance.BorderSize = 0;
|
this.buttonSilent.FlatAppearance.BorderSize = 0;
|
||||||
this.buttonSilent.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
|
this.buttonSilent.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
|
||||||
this.buttonSilent.Location = new System.Drawing.Point(10, 10);
|
this.buttonSilent.Location = new System.Drawing.Point(9, 11);
|
||||||
this.buttonSilent.Margin = new System.Windows.Forms.Padding(10);
|
this.buttonSilent.Margin = new System.Windows.Forms.Padding(9, 11, 9, 11);
|
||||||
this.buttonSilent.Name = "buttonSilent";
|
this.buttonSilent.Name = "buttonSilent";
|
||||||
this.buttonSilent.Size = new System.Drawing.Size(214, 86);
|
this.buttonSilent.Size = new System.Drawing.Size(212, 85);
|
||||||
this.buttonSilent.TabIndex = 0;
|
this.buttonSilent.TabIndex = 0;
|
||||||
this.buttonSilent.Text = "Silent";
|
this.buttonSilent.Text = "Silent";
|
||||||
this.buttonSilent.UseVisualStyleBackColor = false;
|
this.buttonSilent.UseVisualStyleBackColor = false;
|
||||||
//
|
//
|
||||||
// picturePerf
|
// picturePerf
|
||||||
//
|
//
|
||||||
this.picturePerf.Image = global::GHelper.Properties.Resources.icons8_speed_48;
|
this.picturePerf.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("picturePerf.BackgroundImage")));
|
||||||
this.picturePerf.Location = new System.Drawing.Point(30, 29);
|
this.picturePerf.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Zoom;
|
||||||
|
this.picturePerf.InitialImage = null;
|
||||||
|
this.picturePerf.Location = new System.Drawing.Point(32, 32);
|
||||||
|
this.picturePerf.Margin = new System.Windows.Forms.Padding(4, 2, 4, 2);
|
||||||
this.picturePerf.Name = "picturePerf";
|
this.picturePerf.Name = "picturePerf";
|
||||||
this.picturePerf.Size = new System.Drawing.Size(48, 48);
|
this.picturePerf.Size = new System.Drawing.Size(48, 47);
|
||||||
this.picturePerf.TabIndex = 14;
|
this.picturePerf.TabIndex = 14;
|
||||||
this.picturePerf.TabStop = false;
|
this.picturePerf.TabStop = false;
|
||||||
//
|
//
|
||||||
@@ -291,7 +324,8 @@
|
|||||||
//
|
//
|
||||||
this.labelPerf.AutoSize = true;
|
this.labelPerf.AutoSize = true;
|
||||||
this.labelPerf.Font = new System.Drawing.Font("Segoe UI", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point);
|
this.labelPerf.Font = new System.Drawing.Font("Segoe UI", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point);
|
||||||
this.labelPerf.Location = new System.Drawing.Point(83, 37);
|
this.labelPerf.Location = new System.Drawing.Point(84, 41);
|
||||||
|
this.labelPerf.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
|
||||||
this.labelPerf.Name = "labelPerf";
|
this.labelPerf.Name = "labelPerf";
|
||||||
this.labelPerf.Size = new System.Drawing.Size(234, 32);
|
this.labelPerf.Size = new System.Drawing.Size(234, 32);
|
||||||
this.labelPerf.TabIndex = 13;
|
this.labelPerf.TabIndex = 13;
|
||||||
@@ -300,11 +334,13 @@
|
|||||||
// checkGPU
|
// checkGPU
|
||||||
//
|
//
|
||||||
this.checkGPU.AutoSize = true;
|
this.checkGPU.AutoSize = true;
|
||||||
this.checkGPU.Location = new System.Drawing.Point(34, 400);
|
this.checkGPU.ForeColor = System.Drawing.SystemColors.GrayText;
|
||||||
|
this.checkGPU.Location = new System.Drawing.Point(33, 410);
|
||||||
|
this.checkGPU.Margin = new System.Windows.Forms.Padding(4, 2, 4, 2);
|
||||||
this.checkGPU.Name = "checkGPU";
|
this.checkGPU.Name = "checkGPU";
|
||||||
this.checkGPU.Size = new System.Drawing.Size(614, 36);
|
this.checkGPU.Size = new System.Drawing.Size(550, 36);
|
||||||
this.checkGPU.TabIndex = 15;
|
this.checkGPU.TabIndex = 15;
|
||||||
this.checkGPU.Text = "Switch to Eco on battery and Standard when plugged";
|
this.checkGPU.Text = "Set Eco on battery and Standard when plugged";
|
||||||
this.checkGPU.UseVisualStyleBackColor = true;
|
this.checkGPU.UseVisualStyleBackColor = true;
|
||||||
this.checkGPU.CheckedChanged += new System.EventHandler(this.checkGPU_CheckedChanged);
|
this.checkGPU.CheckedChanged += new System.EventHandler(this.checkGPU_CheckedChanged);
|
||||||
//
|
//
|
||||||
@@ -312,18 +348,186 @@
|
|||||||
//
|
//
|
||||||
this.buttonQuit.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
|
this.buttonQuit.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
|
||||||
this.buttonQuit.BackColor = System.Drawing.SystemColors.ButtonFace;
|
this.buttonQuit.BackColor = System.Drawing.SystemColors.ButtonFace;
|
||||||
this.buttonQuit.Location = new System.Drawing.Point(602, 634);
|
this.buttonQuit.Location = new System.Drawing.Point(591, 1011);
|
||||||
|
this.buttonQuit.Margin = new System.Windows.Forms.Padding(4, 2, 4, 2);
|
||||||
this.buttonQuit.Name = "buttonQuit";
|
this.buttonQuit.Name = "buttonQuit";
|
||||||
this.buttonQuit.Size = new System.Drawing.Size(120, 46);
|
this.buttonQuit.Size = new System.Drawing.Size(121, 47);
|
||||||
this.buttonQuit.TabIndex = 16;
|
this.buttonQuit.TabIndex = 16;
|
||||||
this.buttonQuit.Text = "Quit";
|
this.buttonQuit.Text = "Quit";
|
||||||
this.buttonQuit.UseVisualStyleBackColor = false;
|
this.buttonQuit.UseVisualStyleBackColor = false;
|
||||||
//
|
//
|
||||||
|
// pictureScreen
|
||||||
|
//
|
||||||
|
this.pictureScreen.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("pictureScreen.BackgroundImage")));
|
||||||
|
this.pictureScreen.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Zoom;
|
||||||
|
this.pictureScreen.Location = new System.Drawing.Point(32, 489);
|
||||||
|
this.pictureScreen.Margin = new System.Windows.Forms.Padding(4, 2, 4, 2);
|
||||||
|
this.pictureScreen.Name = "pictureScreen";
|
||||||
|
this.pictureScreen.Size = new System.Drawing.Size(48, 47);
|
||||||
|
this.pictureScreen.TabIndex = 18;
|
||||||
|
this.pictureScreen.TabStop = false;
|
||||||
|
//
|
||||||
|
// labelSreen
|
||||||
|
//
|
||||||
|
this.labelSreen.AutoSize = true;
|
||||||
|
this.labelSreen.Font = new System.Drawing.Font("Segoe UI", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point);
|
||||||
|
this.labelSreen.Location = new System.Drawing.Point(84, 497);
|
||||||
|
this.labelSreen.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
|
||||||
|
this.labelSreen.Name = "labelSreen";
|
||||||
|
this.labelSreen.Size = new System.Drawing.Size(176, 32);
|
||||||
|
this.labelSreen.TabIndex = 17;
|
||||||
|
this.labelSreen.Text = "Laptop Screen";
|
||||||
|
//
|
||||||
|
// tableScreen
|
||||||
|
//
|
||||||
|
this.tableScreen.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
|
||||||
|
| System.Windows.Forms.AnchorStyles.Right)));
|
||||||
|
this.tableScreen.ColumnCount = 3;
|
||||||
|
this.tableScreen.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 33.33333F));
|
||||||
|
this.tableScreen.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 33.33333F));
|
||||||
|
this.tableScreen.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 33.33333F));
|
||||||
|
this.tableScreen.Controls.Add(this.button120Hz, 1, 0);
|
||||||
|
this.tableScreen.Controls.Add(this.button60Hz, 0, 0);
|
||||||
|
this.tableScreen.Location = new System.Drawing.Point(22, 535);
|
||||||
|
this.tableScreen.Margin = new System.Windows.Forms.Padding(4, 2, 4, 2);
|
||||||
|
this.tableScreen.Name = "tableScreen";
|
||||||
|
this.tableScreen.RowCount = 1;
|
||||||
|
this.tableScreen.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 107F));
|
||||||
|
this.tableScreen.Size = new System.Drawing.Size(690, 102);
|
||||||
|
this.tableScreen.TabIndex = 19;
|
||||||
|
//
|
||||||
|
// button120Hz
|
||||||
|
//
|
||||||
|
this.button120Hz.BackColor = System.Drawing.SystemColors.ControlLightLight;
|
||||||
|
this.button120Hz.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||||
|
this.button120Hz.FlatAppearance.BorderColor = System.Drawing.SystemColors.ActiveBorder;
|
||||||
|
this.button120Hz.FlatAppearance.BorderSize = 0;
|
||||||
|
this.button120Hz.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
|
||||||
|
this.button120Hz.Location = new System.Drawing.Point(239, 11);
|
||||||
|
this.button120Hz.Margin = new System.Windows.Forms.Padding(9, 11, 9, 11);
|
||||||
|
this.button120Hz.Name = "button120Hz";
|
||||||
|
this.button120Hz.Size = new System.Drawing.Size(212, 85);
|
||||||
|
this.button120Hz.TabIndex = 1;
|
||||||
|
this.button120Hz.Text = "120Hz + OD";
|
||||||
|
this.button120Hz.UseVisualStyleBackColor = false;
|
||||||
|
//
|
||||||
|
// button60Hz
|
||||||
|
//
|
||||||
|
this.button60Hz.BackColor = System.Drawing.SystemColors.ControlLightLight;
|
||||||
|
this.button60Hz.CausesValidation = false;
|
||||||
|
this.button60Hz.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||||
|
this.button60Hz.FlatAppearance.BorderColor = System.Drawing.SystemColors.ActiveBorder;
|
||||||
|
this.button60Hz.FlatAppearance.BorderSize = 0;
|
||||||
|
this.button60Hz.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
|
||||||
|
this.button60Hz.ForeColor = System.Drawing.SystemColors.ControlText;
|
||||||
|
this.button60Hz.Location = new System.Drawing.Point(9, 11);
|
||||||
|
this.button60Hz.Margin = new System.Windows.Forms.Padding(9, 11, 9, 11);
|
||||||
|
this.button60Hz.Name = "button60Hz";
|
||||||
|
this.button60Hz.Size = new System.Drawing.Size(212, 85);
|
||||||
|
this.button60Hz.TabIndex = 0;
|
||||||
|
this.button60Hz.Text = "60Hz";
|
||||||
|
this.button60Hz.UseVisualStyleBackColor = false;
|
||||||
|
//
|
||||||
|
// checkScreen
|
||||||
|
//
|
||||||
|
this.checkScreen.AutoSize = true;
|
||||||
|
this.checkScreen.ForeColor = System.Drawing.SystemColors.GrayText;
|
||||||
|
this.checkScreen.Location = new System.Drawing.Point(33, 638);
|
||||||
|
this.checkScreen.Margin = new System.Windows.Forms.Padding(4, 2, 4, 2);
|
||||||
|
this.checkScreen.Name = "checkScreen";
|
||||||
|
this.checkScreen.Size = new System.Drawing.Size(527, 36);
|
||||||
|
this.checkScreen.TabIndex = 20;
|
||||||
|
this.checkScreen.Text = "Set 60Hz on battery, and back when plugged";
|
||||||
|
this.checkScreen.UseVisualStyleBackColor = true;
|
||||||
|
//
|
||||||
|
// checkBoost
|
||||||
|
//
|
||||||
|
this.checkBoost.AutoSize = true;
|
||||||
|
this.checkBoost.ForeColor = System.Drawing.SystemColors.GrayText;
|
||||||
|
this.checkBoost.Location = new System.Drawing.Point(33, 186);
|
||||||
|
this.checkBoost.Margin = new System.Windows.Forms.Padding(4, 2, 4, 2);
|
||||||
|
this.checkBoost.Name = "checkBoost";
|
||||||
|
this.checkBoost.Size = new System.Drawing.Size(250, 36);
|
||||||
|
this.checkBoost.TabIndex = 21;
|
||||||
|
this.checkBoost.Text = "CPU Boost enabled";
|
||||||
|
this.checkBoost.UseVisualStyleBackColor = true;
|
||||||
|
//
|
||||||
|
// pictureBox1
|
||||||
|
//
|
||||||
|
this.pictureBox1.BackgroundImage = global::GHelper.Properties.Resources.icons8_keyboard_48;
|
||||||
|
this.pictureBox1.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Zoom;
|
||||||
|
this.pictureBox1.Location = new System.Drawing.Point(33, 720);
|
||||||
|
this.pictureBox1.Margin = new System.Windows.Forms.Padding(4, 2, 4, 2);
|
||||||
|
this.pictureBox1.Name = "pictureBox1";
|
||||||
|
this.pictureBox1.Size = new System.Drawing.Size(42, 42);
|
||||||
|
this.pictureBox1.TabIndex = 23;
|
||||||
|
this.pictureBox1.TabStop = false;
|
||||||
|
//
|
||||||
|
// label1
|
||||||
|
//
|
||||||
|
this.label1.AutoSize = true;
|
||||||
|
this.label1.Font = new System.Drawing.Font("Segoe UI", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point);
|
||||||
|
this.label1.Location = new System.Drawing.Point(84, 723);
|
||||||
|
this.label1.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
|
||||||
|
this.label1.Name = "label1";
|
||||||
|
this.label1.Size = new System.Drawing.Size(210, 32);
|
||||||
|
this.label1.TabIndex = 22;
|
||||||
|
this.label1.Text = "Laptop Keyboard";
|
||||||
|
//
|
||||||
|
// comboKeyboard
|
||||||
|
//
|
||||||
|
this.comboKeyboard.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
|
||||||
|
this.comboKeyboard.FormattingEnabled = true;
|
||||||
|
this.comboKeyboard.ItemHeight = 32;
|
||||||
|
this.comboKeyboard.Items.AddRange(new object[] {
|
||||||
|
"Static",
|
||||||
|
"Breathe",
|
||||||
|
"Strobe",
|
||||||
|
"Rainbow"});
|
||||||
|
this.comboKeyboard.Location = new System.Drawing.Point(40, 778);
|
||||||
|
this.comboKeyboard.Name = "comboKeyboard";
|
||||||
|
this.comboKeyboard.Size = new System.Drawing.Size(198, 40);
|
||||||
|
this.comboKeyboard.TabIndex = 24;
|
||||||
|
this.comboKeyboard.TabStop = false;
|
||||||
|
//
|
||||||
|
// buttonKeyboardColor
|
||||||
|
//
|
||||||
|
this.buttonKeyboardColor.BackColor = System.Drawing.SystemColors.ButtonHighlight;
|
||||||
|
this.buttonKeyboardColor.FlatAppearance.BorderColor = System.Drawing.Color.Red;
|
||||||
|
this.buttonKeyboardColor.FlatAppearance.BorderSize = 4;
|
||||||
|
this.buttonKeyboardColor.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
|
||||||
|
this.buttonKeyboardColor.ForeColor = System.Drawing.SystemColors.ControlText;
|
||||||
|
this.buttonKeyboardColor.Location = new System.Drawing.Point(261, 773);
|
||||||
|
this.buttonKeyboardColor.Margin = new System.Windows.Forms.Padding(0);
|
||||||
|
this.buttonKeyboardColor.Name = "buttonKeyboardColor";
|
||||||
|
this.buttonKeyboardColor.Size = new System.Drawing.Size(212, 50);
|
||||||
|
this.buttonKeyboardColor.TabIndex = 25;
|
||||||
|
this.buttonKeyboardColor.Text = "Color";
|
||||||
|
this.buttonKeyboardColor.UseVisualStyleBackColor = false;
|
||||||
|
//
|
||||||
|
// pictureBox2
|
||||||
|
//
|
||||||
|
this.pictureBox2.BackColor = System.Drawing.SystemColors.ControlLightLight;
|
||||||
|
this.pictureBox2.Location = new System.Drawing.Point(32, 773);
|
||||||
|
this.pictureBox2.Name = "pictureBox2";
|
||||||
|
this.pictureBox2.Size = new System.Drawing.Size(212, 50);
|
||||||
|
this.pictureBox2.TabIndex = 26;
|
||||||
|
this.pictureBox2.TabStop = false;
|
||||||
|
//
|
||||||
// SettingsForm
|
// SettingsForm
|
||||||
//
|
//
|
||||||
this.AutoScaleDimensions = new System.Drawing.SizeF(13F, 32F);
|
this.AutoScaleDimensions = new System.Drawing.SizeF(13F, 32F);
|
||||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||||
this.ClientSize = new System.Drawing.Size(756, 704);
|
this.ClientSize = new System.Drawing.Size(744, 1085);
|
||||||
|
this.Controls.Add(this.buttonKeyboardColor);
|
||||||
|
this.Controls.Add(this.comboKeyboard);
|
||||||
|
this.Controls.Add(this.pictureBox1);
|
||||||
|
this.Controls.Add(this.label1);
|
||||||
|
this.Controls.Add(this.checkBoost);
|
||||||
|
this.Controls.Add(this.checkScreen);
|
||||||
|
this.Controls.Add(this.tableScreen);
|
||||||
|
this.Controls.Add(this.pictureScreen);
|
||||||
|
this.Controls.Add(this.labelSreen);
|
||||||
this.Controls.Add(this.buttonQuit);
|
this.Controls.Add(this.buttonQuit);
|
||||||
this.Controls.Add(this.checkGPU);
|
this.Controls.Add(this.checkGPU);
|
||||||
this.Controls.Add(this.picturePerf);
|
this.Controls.Add(this.picturePerf);
|
||||||
@@ -339,12 +543,14 @@
|
|||||||
this.Controls.Add(this.labelBattery);
|
this.Controls.Add(this.labelBattery);
|
||||||
this.Controls.Add(this.trackBattery);
|
this.Controls.Add(this.trackBattery);
|
||||||
this.Controls.Add(this.checkStartup);
|
this.Controls.Add(this.checkStartup);
|
||||||
|
this.Controls.Add(this.pictureBox2);
|
||||||
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
|
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
|
||||||
|
this.Margin = new System.Windows.Forms.Padding(4, 2, 4, 2);
|
||||||
this.MaximizeBox = false;
|
this.MaximizeBox = false;
|
||||||
this.MdiChildrenMinimizedAnchorBottom = false;
|
this.MdiChildrenMinimizedAnchorBottom = false;
|
||||||
this.MinimizeBox = false;
|
this.MinimizeBox = false;
|
||||||
this.Name = "SettingsForm";
|
this.Name = "SettingsForm";
|
||||||
this.Padding = new System.Windows.Forms.Padding(10);
|
this.Padding = new System.Windows.Forms.Padding(9, 11, 9, 11);
|
||||||
this.ShowIcon = false;
|
this.ShowIcon = false;
|
||||||
this.ShowInTaskbar = false;
|
this.ShowInTaskbar = false;
|
||||||
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
|
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
|
||||||
@@ -356,6 +562,10 @@
|
|||||||
((System.ComponentModel.ISupportInitialize)(this.pictureGPU)).EndInit();
|
((System.ComponentModel.ISupportInitialize)(this.pictureGPU)).EndInit();
|
||||||
this.tablePerf.ResumeLayout(false);
|
this.tablePerf.ResumeLayout(false);
|
||||||
((System.ComponentModel.ISupportInitialize)(this.picturePerf)).EndInit();
|
((System.ComponentModel.ISupportInitialize)(this.picturePerf)).EndInit();
|
||||||
|
((System.ComponentModel.ISupportInitialize)(this.pictureScreen)).EndInit();
|
||||||
|
this.tableScreen.ResumeLayout(false);
|
||||||
|
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit();
|
||||||
|
((System.ComponentModel.ISupportInitialize)(this.pictureBox2)).EndInit();
|
||||||
this.ResumeLayout(false);
|
this.ResumeLayout(false);
|
||||||
this.PerformLayout();
|
this.PerformLayout();
|
||||||
|
|
||||||
@@ -383,5 +593,17 @@
|
|||||||
private Label labelPerf;
|
private Label labelPerf;
|
||||||
private CheckBox checkGPU;
|
private CheckBox checkGPU;
|
||||||
private Button buttonQuit;
|
private Button buttonQuit;
|
||||||
|
private PictureBox pictureScreen;
|
||||||
|
private Label labelSreen;
|
||||||
|
private TableLayoutPanel tableScreen;
|
||||||
|
private Button button120Hz;
|
||||||
|
private Button button60Hz;
|
||||||
|
private CheckBox checkScreen;
|
||||||
|
private CheckBox checkBoost;
|
||||||
|
private PictureBox pictureBox1;
|
||||||
|
private Label label1;
|
||||||
|
private ComboBox comboKeyboard;
|
||||||
|
private Button buttonKeyboardColor;
|
||||||
|
private PictureBox pictureBox2;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
273
Settings.cs
273
Settings.cs
@@ -1,6 +1,8 @@
|
|||||||
using System.Collections.Generic;
|
using Microsoft.VisualBasic.ApplicationServices;
|
||||||
using System.Diagnostics;
|
using System.Diagnostics;
|
||||||
|
using System.Management;
|
||||||
using System.Timers;
|
using System.Timers;
|
||||||
|
using System.Windows.Forms;
|
||||||
|
|
||||||
namespace GHelper
|
namespace GHelper
|
||||||
{
|
{
|
||||||
@@ -43,11 +45,201 @@ namespace GHelper
|
|||||||
|
|
||||||
trackBattery.Scroll += trackBatteryChange;
|
trackBattery.Scroll += trackBatteryChange;
|
||||||
|
|
||||||
|
button60Hz.Click += Button60Hz_Click;
|
||||||
|
button120Hz.Click += Button120Hz_Click;
|
||||||
|
|
||||||
buttonQuit.Click += ButtonQuit_Click;
|
buttonQuit.Click += ButtonQuit_Click;
|
||||||
|
|
||||||
|
checkBoost.Click += CheckBoost_Click;
|
||||||
|
|
||||||
|
checkScreen.CheckedChanged += checkScreen_CheckedChanged;
|
||||||
|
|
||||||
|
comboKeyboard.DropDownStyle = ComboBoxStyle.DropDownList;
|
||||||
|
comboKeyboard.SelectedIndex = 0;
|
||||||
|
|
||||||
|
comboKeyboard.SelectedValueChanged += ComboKeyboard_SelectedValueChanged;
|
||||||
|
|
||||||
|
buttonKeyboardColor.Click += ButtonKeyboardColor_Click;
|
||||||
|
|
||||||
SetTimer();
|
SetTimer();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
private void ButtonKeyboardColor_Click(object? sender, EventArgs e)
|
||||||
|
{
|
||||||
|
|
||||||
|
Button but = (Button)sender;
|
||||||
|
|
||||||
|
ColorDialog colorDlg = new ColorDialog();
|
||||||
|
colorDlg.AllowFullOpen = false;
|
||||||
|
colorDlg.Color = but.FlatAppearance.BorderColor;
|
||||||
|
|
||||||
|
if (colorDlg.ShowDialog() == DialogResult.OK)
|
||||||
|
{
|
||||||
|
SetAuraColor(colorDlg.Color);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public void InitAura()
|
||||||
|
{
|
||||||
|
int mode = Program.config.getConfig("aura_mode");
|
||||||
|
int colorCode = Program.config.getConfig("aura_color");
|
||||||
|
int speed = Program.config.getConfig("aura_speed");
|
||||||
|
|
||||||
|
Color color = Color.FromArgb(255, 255, 255);
|
||||||
|
|
||||||
|
if (mode == -1)
|
||||||
|
mode = 0;
|
||||||
|
|
||||||
|
if (colorCode != -1)
|
||||||
|
color = Color.FromArgb(colorCode);
|
||||||
|
|
||||||
|
|
||||||
|
SetAuraColor(color, false);
|
||||||
|
SetAuraMode(mode, false);
|
||||||
|
|
||||||
|
Aura.Mode = mode;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public void SetAuraColor(Color color, bool apply = true)
|
||||||
|
{
|
||||||
|
Aura.Color1 = color;
|
||||||
|
Program.config.setConfig("aura_color", color.ToArgb());
|
||||||
|
|
||||||
|
if (apply)
|
||||||
|
Aura.ApplyAura();
|
||||||
|
|
||||||
|
buttonKeyboardColor.FlatAppearance.BorderColor = color;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void SetAuraMode (int mode = 0, bool apply = true)
|
||||||
|
{
|
||||||
|
|
||||||
|
if (mode > 3) mode = 0;
|
||||||
|
|
||||||
|
if (Aura.Mode == mode) return; // same mode
|
||||||
|
|
||||||
|
Aura.Mode = mode;
|
||||||
|
Program.config.setConfig("aura_mode", mode);
|
||||||
|
|
||||||
|
if (apply)
|
||||||
|
Aura.ApplyAura();
|
||||||
|
else
|
||||||
|
comboKeyboard.SelectedIndex = mode;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void CycleAuraMode ()
|
||||||
|
{
|
||||||
|
SetAuraMode(Program.config.getConfig("aura_mode") + 1);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void ComboKeyboard_SelectedValueChanged(object? sender, EventArgs e)
|
||||||
|
{
|
||||||
|
ComboBox cmb = (ComboBox)sender;
|
||||||
|
SetAuraMode(cmb.SelectedIndex);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
private void CheckBoost_Click(object? sender, EventArgs e)
|
||||||
|
{
|
||||||
|
CheckBox chk = (CheckBox)sender;
|
||||||
|
if (chk.Checked)
|
||||||
|
NativeMethods.SetCPUBoost(3);
|
||||||
|
else
|
||||||
|
NativeMethods.SetCPUBoost(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void Button120Hz_Click(object? sender, EventArgs e)
|
||||||
|
{
|
||||||
|
SetScreen(1000, 1);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void Button60Hz_Click(object? sender, EventArgs e)
|
||||||
|
{
|
||||||
|
SetScreen(60, 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public void SetScreen(int frequency = -1, int overdrive = -1)
|
||||||
|
{
|
||||||
|
|
||||||
|
int currentFrequency = NativeMethods.GetRefreshRate();
|
||||||
|
if (currentFrequency < 0) // Laptop screen not detected or has unknown refresh rate
|
||||||
|
return;
|
||||||
|
|
||||||
|
if (frequency >= 1000)
|
||||||
|
{
|
||||||
|
frequency = Program.config.getConfig("max_frequency");
|
||||||
|
if (frequency <= 60)
|
||||||
|
frequency = 120;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (frequency > 0)
|
||||||
|
NativeMethods.SetRefreshRate(frequency);
|
||||||
|
|
||||||
|
if (overdrive > 0)
|
||||||
|
Program.wmi.DeviceSet(ASUSWmi.ScreenOverdrive, overdrive);
|
||||||
|
|
||||||
|
InitScreen();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public void InitBoost()
|
||||||
|
{
|
||||||
|
int boost = NativeMethods.GetCPUBoost();
|
||||||
|
checkBoost.Checked = (boost > 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void InitScreen()
|
||||||
|
{
|
||||||
|
|
||||||
|
int frequency = NativeMethods.GetRefreshRate();
|
||||||
|
int maxFrequency = Program.config.getConfig("max_frequency");
|
||||||
|
|
||||||
|
if (frequency < 0)
|
||||||
|
{
|
||||||
|
button60Hz.Enabled = false;
|
||||||
|
button120Hz.Enabled = false;
|
||||||
|
labelSreen.Text = "Laptop Screen: Turned off";
|
||||||
|
button60Hz.BackColor = SystemColors.ControlLight;
|
||||||
|
button120Hz.BackColor = SystemColors.ControlLight;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
button60Hz.Enabled = true;
|
||||||
|
button120Hz.Enabled = true;
|
||||||
|
button60Hz.BackColor = SystemColors.ControlLightLight;
|
||||||
|
button120Hz.BackColor = SystemColors.ControlLightLight;
|
||||||
|
labelSreen.Text = "Laptop Screen";
|
||||||
|
}
|
||||||
|
|
||||||
|
int overdrive = Program.wmi.DeviceGet(ASUSWmi.ScreenOverdrive);
|
||||||
|
|
||||||
|
button60Hz.FlatAppearance.BorderSize = buttonInactive;
|
||||||
|
button120Hz.FlatAppearance.BorderSize = buttonInactive;
|
||||||
|
|
||||||
|
if (frequency == 60)
|
||||||
|
{
|
||||||
|
button60Hz.FlatAppearance.BorderSize = buttonActive;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if (frequency > 60)
|
||||||
|
maxFrequency = frequency;
|
||||||
|
|
||||||
|
Program.config.setConfig("max_frequency", maxFrequency);
|
||||||
|
button120Hz.FlatAppearance.BorderSize = buttonActive;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (maxFrequency > 60)
|
||||||
|
{
|
||||||
|
button120Hz.Text = maxFrequency.ToString() + "Hz + OD";
|
||||||
|
}
|
||||||
|
|
||||||
|
Program.config.setConfig("frequency", frequency);
|
||||||
|
Program.config.setConfig("overdrive", overdrive);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void ButtonQuit_Click(object? sender, EventArgs e)
|
private void ButtonQuit_Click(object? sender, EventArgs e)
|
||||||
@@ -105,8 +297,10 @@ namespace GHelper
|
|||||||
{
|
{
|
||||||
if (this.Visible)
|
if (this.Visible)
|
||||||
{
|
{
|
||||||
|
InitScreen();
|
||||||
|
|
||||||
this.Left = Screen.FromControl(this).Bounds.Width - 10 - this.Width;
|
this.Left = Screen.FromControl(this).Bounds.Width - 10 - this.Width;
|
||||||
this.Top = Screen.FromControl(this).Bounds.Height - 100 - this.Height;
|
this.Top = Screen.FromControl(this).WorkingArea.Height - 10 - this.Height;
|
||||||
this.Activate();
|
this.Activate();
|
||||||
aTimer.Enabled = true;
|
aTimer.Enabled = true;
|
||||||
}
|
}
|
||||||
@@ -127,22 +321,28 @@ namespace GHelper
|
|||||||
{
|
{
|
||||||
case ASUSWmi.PerformanceSilent:
|
case ASUSWmi.PerformanceSilent:
|
||||||
buttonSilent.FlatAppearance.BorderSize = buttonActive;
|
buttonSilent.FlatAppearance.BorderSize = buttonActive;
|
||||||
labelPerf.Text = "Peformance Mode: Silent";
|
labelPerf.Text = "Performance Mode: Silent";
|
||||||
break;
|
break;
|
||||||
case ASUSWmi.PerformanceTurbo:
|
case ASUSWmi.PerformanceTurbo:
|
||||||
buttonTurbo.FlatAppearance.BorderSize = buttonActive;
|
buttonTurbo.FlatAppearance.BorderSize = buttonActive;
|
||||||
labelPerf.Text = "Peformance Mode: Turbo";
|
labelPerf.Text = "Performance Mode: Turbo";
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
buttonBalanced.FlatAppearance.BorderSize = buttonActive;
|
buttonBalanced.FlatAppearance.BorderSize = buttonActive;
|
||||||
labelPerf.Text = "Peformance Mode: Balanced";
|
labelPerf.Text = "Performance Mode: Balanced";
|
||||||
PerformanceMode = ASUSWmi.PerformanceBalanced;
|
PerformanceMode = ASUSWmi.PerformanceBalanced;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
Program.config.setConfig("performance_mode", PerformanceMode);
|
Program.config.setConfig("performance_mode", PerformanceMode);
|
||||||
Program.wmi.DeviceSet(ASUSWmi.PerformanceMode, PerformanceMode);
|
try
|
||||||
|
{
|
||||||
|
Program.wmi.DeviceSet(ASUSWmi.PerformanceMode, PerformanceMode);
|
||||||
|
} catch
|
||||||
|
{
|
||||||
|
labelPerf.Text = "Performance Mode: not supported";
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -152,6 +352,18 @@ namespace GHelper
|
|||||||
SetPerformanceMode(Program.config.getConfig("performance_mode") + 1);
|
SetPerformanceMode(Program.config.getConfig("performance_mode") + 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void AutoScreen(int Plugged = 1)
|
||||||
|
{
|
||||||
|
int ScreenAuto = Program.config.getConfig("screen_auto");
|
||||||
|
if (ScreenAuto != 1) return;
|
||||||
|
|
||||||
|
if (Plugged == 1)
|
||||||
|
SetScreen(1000, 1);
|
||||||
|
else
|
||||||
|
SetScreen(60, 0);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
public void AutoGPUMode(int Plugged = 1)
|
public void AutoGPUMode(int Plugged = 1)
|
||||||
{
|
{
|
||||||
|
|
||||||
@@ -169,25 +381,24 @@ namespace GHelper
|
|||||||
{
|
{
|
||||||
if (eco == 1 && Plugged == 1) // Eco going Standard on plugged
|
if (eco == 1 && Plugged == 1) // Eco going Standard on plugged
|
||||||
{
|
{
|
||||||
|
Program.wmi.DeviceSet(ASUSWmi.GPUEco, 0);
|
||||||
|
|
||||||
GPUMode = ASUSWmi.GPUModeStandard;
|
GPUMode = ASUSWmi.GPUModeStandard;
|
||||||
VisualiseGPUMode(GPUMode);
|
VisualiseGPUMode(GPUMode);
|
||||||
Program.wmi.DeviceSet(ASUSWmi.GPUEco, 0);
|
|
||||||
Program.config.setConfig("gpu_mode", GPUMode);
|
Program.config.setConfig("gpu_mode", GPUMode);
|
||||||
}
|
}
|
||||||
else if (eco == 0 && Plugged == 0) // Standard going Eco on plugged
|
else if (eco == 0 && Plugged == 0) // Standard going Eco on plugged
|
||||||
{
|
{
|
||||||
|
Program.wmi.DeviceSet(ASUSWmi.GPUEco, 1);
|
||||||
|
|
||||||
GPUMode = ASUSWmi.GPUModeEco;
|
GPUMode = ASUSWmi.GPUModeEco;
|
||||||
VisualiseGPUMode(GPUMode);
|
VisualiseGPUMode(GPUMode);
|
||||||
Program.wmi.DeviceSet(ASUSWmi.GPUEco, 1);
|
|
||||||
Program.config.setConfig("gpu_mode", GPUMode);
|
Program.config.setConfig("gpu_mode", GPUMode);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public int InitGPUMode()
|
public int InitGPUMode()
|
||||||
{
|
{
|
||||||
|
|
||||||
@@ -273,11 +484,16 @@ namespace GHelper
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public void VisualiseGPUAuto(int GPUAuto)
|
public void VisualiseGPUAuto(int GPUAuto)
|
||||||
{
|
{
|
||||||
checkGPU.Checked = (GPUAuto == 1);
|
checkGPU.Checked = (GPUAuto == 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void VisualiseScreenAuto(int ScreenAuto)
|
||||||
|
{
|
||||||
|
checkScreen.Checked = (ScreenAuto == 1);
|
||||||
|
}
|
||||||
|
|
||||||
public void VisualiseGPUMode(int GPUMode)
|
public void VisualiseGPUMode(int GPUMode)
|
||||||
{
|
{
|
||||||
|
|
||||||
@@ -289,25 +505,23 @@ namespace GHelper
|
|||||||
{
|
{
|
||||||
case ASUSWmi.GPUModeEco:
|
case ASUSWmi.GPUModeEco:
|
||||||
buttonEco.FlatAppearance.BorderSize = buttonActive;
|
buttonEco.FlatAppearance.BorderSize = buttonActive;
|
||||||
labelGPU.Text = "GPU Mode: Eco (iGPU only)";
|
labelGPU.Text = "GPU Mode: iGPU only";
|
||||||
Program.trayIcon.Icon = GHelper.Properties.Resources.eco;
|
Program.trayIcon.Icon = GHelper.Properties.Resources.eco;
|
||||||
break;
|
break;
|
||||||
case ASUSWmi.GPUModeUltimate:
|
case ASUSWmi.GPUModeUltimate:
|
||||||
buttonUltimate.FlatAppearance.BorderSize = buttonActive;
|
buttonUltimate.FlatAppearance.BorderSize = buttonActive;
|
||||||
labelGPU.Text = "GPU Mode: Ultimate (dGPU exclusive)";
|
labelGPU.Text = "GPU Mode: dGPU exclusive";
|
||||||
Program.trayIcon.Icon = GHelper.Properties.Resources.ultimate;
|
Program.trayIcon.Icon = GHelper.Properties.Resources.ultimate;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
buttonStandard.FlatAppearance.BorderSize = buttonActive;
|
buttonStandard.FlatAppearance.BorderSize = buttonActive;
|
||||||
labelGPU.Text = "GPU Mode: Eco (iGPU and dGPU)";
|
labelGPU.Text = "GPU Mode: iGPU and dGPU";
|
||||||
Program.trayIcon.Icon = GHelper.Properties.Resources.standard;
|
Program.trayIcon.Icon = GHelper.Properties.Resources.standard;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
private void ButtonSilent_Click(object? sender, EventArgs e)
|
private void ButtonSilent_Click(object? sender, EventArgs e)
|
||||||
{
|
{
|
||||||
SetPerformanceMode(ASUSWmi.PerformanceSilent);
|
SetPerformanceMode(ASUSWmi.PerformanceSilent);
|
||||||
@@ -331,6 +545,7 @@ namespace GHelper
|
|||||||
public void Disable_Ultimate()
|
public void Disable_Ultimate()
|
||||||
{
|
{
|
||||||
buttonUltimate.Enabled = false;
|
buttonUltimate.Enabled = false;
|
||||||
|
buttonUltimate.BackColor = SystemColors.ControlLight;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void SetStartupCheck(bool status)
|
public void SetStartupCheck(bool status)
|
||||||
@@ -350,14 +565,20 @@ namespace GHelper
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void SetBatteryChargeLimit (int limit = 100)
|
public void SetBatteryChargeLimit(int limit = 100)
|
||||||
{
|
{
|
||||||
|
|
||||||
if (limit < 50 || limit > 100) limit = 100;
|
if (limit < 50 || limit > 100) limit = 100;
|
||||||
|
|
||||||
labelBatteryLimit.Text = limit.ToString() + "%";
|
labelBatteryLimit.Text = limit.ToString() + "%";
|
||||||
trackBattery.Value = limit;
|
trackBattery.Value = limit;
|
||||||
Program.wmi.DeviceSet(ASUSWmi.BatteryLimit, limit);
|
try
|
||||||
|
{
|
||||||
|
Program.wmi.DeviceSet(ASUSWmi.BatteryLimit, limit);
|
||||||
|
} catch
|
||||||
|
{
|
||||||
|
Debug.WriteLine("Can't set battery charge limit");
|
||||||
|
}
|
||||||
Program.config.setConfig("charge_limit", limit);
|
Program.config.setConfig("charge_limit", limit);
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -372,13 +593,19 @@ namespace GHelper
|
|||||||
{
|
{
|
||||||
CheckBox chk = (CheckBox)sender;
|
CheckBox chk = (CheckBox)sender;
|
||||||
if (chk.Checked)
|
if (chk.Checked)
|
||||||
{
|
|
||||||
Program.config.setConfig("gpu_auto", 1);
|
Program.config.setConfig("gpu_auto", 1);
|
||||||
}
|
|
||||||
else
|
else
|
||||||
{
|
|
||||||
Program.config.setConfig("gpu_auto", 0);
|
Program.config.setConfig("gpu_auto", 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
private void checkScreen_CheckedChanged(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
CheckBox chk = (CheckBox)sender;
|
||||||
|
if (chk.Checked)
|
||||||
|
Program.config.setConfig("screen_auto", 1);
|
||||||
|
else
|
||||||
|
Program.config.setConfig("screen_auto", 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -57,4 +57,62 @@
|
|||||||
<resheader name="writer">
|
<resheader name="writer">
|
||||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
</resheader>
|
</resheader>
|
||||||
|
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||||
|
<data name="pictureBattery.BackgroundImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||||
|
<value>
|
||||||
|
iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAL
|
||||||
|
DAAACwwBP0AiyAAAAY1JREFUaEPtlz1OAzEQhVdIFFyCH0EFDQ1wAhDcgxPACYCOA/BzGTo6aKGKFOAE
|
||||||
|
0FCABO9FsbSK3uI8J9kFMZ/0FdmMZ+xovLGrIAiCIAiCQLIMr+EL/IRfM5Y1WOsKsvZE7ME3qAq1IWvv
|
||||||
|
wiJWYJeTT77CJWjDtlEJu/AS2rAPVbIufII2bWzYceVcbFQix1V4CKe1j2xUEscEN+ANVDGONiqJY505
|
||||||
|
eATfoYp15N48gFnUYEfFOryDKt7xGWZRA0flhHbgOewNnyWbmIcn8APW412zqEGj8u9+ASY24Rl8GHz6
|
||||||
|
mS34CFXeccyiBik5iW2Yg4vi4rjIBBfPH0HlzZlFDWqS7XAK2R5N1OPZbmw7tt/G8JlrFjUo5z3khBQq
|
||||||
|
vtSpbWIlX5XHkK/OOiq2RE5+H2ZRgx1v4RpMqBhHG5XElccIHie4EPW9o82fP8yx11SyLuxDm9L38yy8
|
||||||
|
gDa8UP+WK+UiLIIXaiZQiduQtYsv9Qme53kn5bWujY3NGqzFtin+5YMgCIIgCP4PVfUNWXMTLz5Z0sYA
|
||||||
|
AAAASUVORK5CYII=
|
||||||
|
</value>
|
||||||
|
</data>
|
||||||
|
<data name="pictureGPU.BackgroundImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||||
|
<value>
|
||||||
|
iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAL
|
||||||
|
DAAACwwBP0AiyAAAAZVJREFUaEPtmTtOxDAURYcGGtgAsCJo6PisACE2ALTAvvgVsB0KQBRwT2HJGl3y
|
||||||
|
EtloHPCRjiKNfJ/sOLGV8aLT6XSa4Fa+ya/MD3kjm2dNvsq888l3OQu408szkJwlfQCr5k8NoAVZEV/k
|
||||||
|
vhyFK9KKBzLEBVvxWYa4YCuO2ptcsCVDXKim9/JQbst1uSOP5IN07ZcNcaEafspTOcSZpJ3LJ0NcCC8k
|
||||||
|
d8zB75fS5ZJR5xMMwuWTIS6Em3KILelyeCen8ChdHQxxIeQOD83AlXQ55JmfwrF0dTDEhUrlhZ0CL7ar
|
||||||
|
gyEuVOpPM/cTG9LVwRAXKnXqDOxKVwdDXAhLViHW+SmcSFcHQ1wIS1YhNqmx8Jn7JF0dDHEhLFmFkPV9
|
||||||
|
DOfS5ZMhLlRDdthoEHT+13biWrJJsc7zojJzXHnmhx6b3BAXaskQF2rF2X8PzP6LbE+GuOAq5V8J7vyo
|
||||||
|
zkMeniX/ZgB5u5oWM7ZY3q6mxYwtxsuVt61hlTOJdFbAdQjOFWoOglrXshg6xqnNLI6YOp1OZ1UsFt/W
|
||||||
|
cWCm8IATjAAAAABJRU5ErkJggg==
|
||||||
|
</value>
|
||||||
|
</data>
|
||||||
|
<data name="picturePerf.BackgroundImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||||
|
<value>
|
||||||
|
iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAL
|
||||||
|
DAAACwwBP0AiyAAAA31JREFUaEPt2NnrTkEcx/HHmj37hTWJP0BCSe5ESSnklivJUsiuXFiSIlsS98qW
|
||||||
|
CLmTP0FKUkqkrNn37f2p39T07fucmfM85/eQzqdexW/mzJlzzpyZeU6jTp06df6L9MQsbMdF3MVrfOui
|
||||||
|
f+tvF7ANM6Fj/nrGYT+e4HdJj7EPY9HxjMBJfIXXuTK+4ASGoyNZjpfwOtOOF1iGbktv6K57J6/Scehc
|
||||||
|
laY/rsI7YfADt7EReqFHow8GYCJmYzNu4ju8NoIr0Dkrie5GUec/4QDU4dzMh9dWTBdRyZMoGjbnMR5l
|
||||||
|
oxfWa886hraiF9Zr+Cc05/dAHF3MGtzAPXzARzzCNWzAAmit8Nr1LEFL0VTpzTbqvC4sjuby09B7YOsX
|
||||||
|
UVvrMBA7u/5mPccwlE6zoaM7H2cR3sGrW0SdX4mQIfDqSemhpBXWW6Q05uNhsxbqiK2XYjuvrIdXV7TY
|
||||||
|
jUF2tD2wjWi2iV9Y3fmqOq//p9rai6z0gre30VQZojFfxbBRcjovmgiyNoBahOzBejnjef4MbJ2UnM6f
|
||||||
|
w1BonfAWuxlIRi+pPVArbIiGUSuzTc6dn4cQrdhxmWxBMpdgD9T8HaIX15YX+YVViNNs2MTn2Qpbrkkk
|
||||||
|
Gf3wsAdqWIVchy23NINp36OZYxDiNOu8aMsSor2TLb+DZF7BHjgKIfdhy61mj7qo8/IQIZNgy7XlTsab
|
||||||
|
//siJGf28ebswSjqvGjrEaLV2ZZrPUhGleyB8TB4D1tueRegqderG9PNCdEF2/KsC9Dewx44BSEPYMst
|
||||||
|
bwh5L6Wl4RkyFbb8GZLxXuI5CNFO05ZbGoa6CD0J0b9zfj9rxxoyF7Y86yXWYmIP3ISQstNoGasRoou2
|
||||||
|
5WeRzA7YA28hZAJSPwlboTbjvZYWT1tH35SSmQ57oBofiRDt/W2ddp1CiLYt3mo/Dclow/QU9uB4M6ft
|
||||||
|
9lvYOq16g/gD10HYOvoQZn8BNs0e2AY+I37E2nCV3RN5tDYsRIguRFt3W283sqOO6pumbUTfNuO7oEZt
|
||||||
|
nbLijqltby+mGSx+Qlk5AtuQ6LdryGR4dcrQliFkF7w6h1E6emm9fZEe+QpopVTDtrysQ1BbzfZJ2v+0
|
||||||
|
/N10MWyDnbYUbUVfjr2GO+Eo2o5+I5f5EFWVyj4tKvrQehneibqDZqJ+qDR6EnrhcjZlrVLbOofOVadO
|
||||||
|
nTr/fBqNP4sju3bXhjy/AAAAAElFTkSuQmCC
|
||||||
|
</value>
|
||||||
|
</data>
|
||||||
|
<data name="pictureScreen.BackgroundImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||||
|
<value>
|
||||||
|
iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAL
|
||||||
|
DAAACwwBP0AiyAAAANBJREFUaEPt2DESAUEUhOF1PQQuxd1wHAGi1U8galU9ktej+qv6M71myyZriYiI
|
||||||
|
+Fd7dEFPtDZV311n2KEhdXh2wc4OSHZF7CKdnZGs87H51gPJ2AUckrGxQzI2dkjGxg7J2NghGRs7JGNj
|
||||||
|
h2Rs7JCMjR2SsbFDMjZ2SMbGDsnY2CEZGzskY2OHZGzskIyNHZKxsUOy6V8pp3+pr/9h2EU626IhdRN1
|
||||||
|
191/bNUZhg8fMeiE7og9h47VWY/obYNuiH3QuTrzR93NtL9ARET8aFleMDJURjd/4/oAAAAASUVORK5C
|
||||||
|
YII=
|
||||||
|
</value>
|
||||||
|
</data>
|
||||||
</root>
|
</root>
|
||||||
BIN
screenshot.png
BIN
screenshot.png
Binary file not shown.
|
Before Width: | Height: | Size: 490 KiB After Width: | Height: | Size: 813 KiB |
Reference in New Issue
Block a user