Compare commits

...

32 Commits

Author SHA1 Message Date
seerge
bc1f3ab530 Merge pull request #14 from Albert24GG/notification-feature
Send notification on performance mode cycling
2023-02-21 23:13:49 +01:00
seerge
3cd62bc9e1 Merge branch 'main' into notification-feature 2023-02-21 23:12:55 +01:00
seerge
16f6f3f934 Merge branch 'main' of https://github.com/seerge/g14-helper 2023-02-21 21:54:16 +01:00
seerge
1f4afedc1d Sensor refresh timers 2023-02-21 21:54:13 +01:00
Albert24GG
c705ce2b5b Send notification on performance mode cycling 2023-02-21 22:51:52 +02:00
seerge
75942ebdb2 Update README.md 2023-02-21 20:07:49 +01:00
seerge
6d142213c8 Minor fix 2023-02-21 19:40:16 +01:00
seerge
bfcb97b158 Update README.md 2023-02-21 19:35:18 +01:00
seerge
f97765c5c2 Performance fix 2023-02-21 19:24:43 +01:00
seerge
19a8b0dc22 Update README.md 2023-02-21 19:15:43 +01:00
seerge
f209f211b5 Added CPU / GPU temps monitoring and Charge/discharge rates in Watts 2023-02-21 19:11:50 +01:00
seerge
81a0019b42 Assure gpu mode and refresh rate are set at startup 2023-02-20 17:24:24 +01:00
seerge
3778c255bc Merge branch 'main' of https://github.com/seerge/g14-helper 2023-02-20 16:51:51 +01:00
seerge
a6b597affe Text adjustments 2023-02-20 16:51:49 +01:00
seerge
4aaba5cee7 Update README.md 2023-02-19 22:40:27 +01:00
seerge
cbbe944c2b New screenshot 2023-02-19 22:21:16 +01:00
seerge
f4d066d407 Merge branch 'main' of https://github.com/seerge/g14-helper 2023-02-19 21:52:04 +01:00
seerge
cc96ca9946 Supressed crash on failed battery charge limit setting 2023-02-19 21:52:01 +01:00
seerge
fb95d9abb2 Update README.md 2023-02-19 21:06:22 +01:00
seerge
15112cb5c8 Added cycling through aura modes by FN+F4 2023-02-19 19:40:49 +01:00
seerge
2632a1b46d Merge branch 'main' of https://github.com/seerge/g14-helper 2023-02-19 18:59:42 +01:00
seerge
66a2a1d083 Added basic aura control, animation modes and colors 2023-02-19 18:59:38 +01:00
seerge
aad708d686 Update README.md 2023-02-19 11:55:24 +01:00
seerge
dba6dae254 New screenshot 2023-02-19 11:51:48 +01:00
seerge
b26ceccc42 Merge pull request #4 from astronaut701/gui-edits
Fix minor misspelled text in UI
2023-02-19 11:48:01 +01:00
seerge
4ad0857ec6 Performance mode trycatch wrap 2023-02-19 11:47:20 +01:00
Astronaut701
d49136a542 Fix text 2023-02-19 03:17:58 +00:00
seerge
4bbd5da4af Another attempt to fix icon sizing 2023-02-19 00:04:30 +01:00
seerge
023d7388bd Added CPU boost control 2023-02-18 21:08:22 +01:00
seerge
e782467585 Merge branch 'master' of https://github.com/seerge/GHelper 2023-02-18 15:33:00 +01:00
seerge
870ca664c8 Max refresh rate fix 2023-02-18 15:32:13 +01:00
seerge
dd4e89cc97 Max refresh rate fix 2023-02-18 15:31:37 +01:00
16 changed files with 1079 additions and 171 deletions

View File

@@ -2,14 +2,15 @@
<PropertyGroup>
<OutputType>WinExe</OutputType>
<TargetFramework>net6.0-windows8.0</TargetFramework>
<TargetFramework>net7.0-windows10.0.17763.0</TargetFramework>
<Nullable>enable</Nullable>
<UseWindowsForms>True</UseWindowsForms>
<ImplicitUsings>enable</ImplicitUsings>
<IsPublishable>True</IsPublishable>
<ApplicationManifest>app.manifest</ApplicationManifest>
<StartupObject>GHelper.Program</StartupObject>
<ApplicationIcon>Resources\standard.ico</ApplicationIcon>
<ApplicationIcon>favicon.ico</ApplicationIcon>
<Platforms>AnyCPU;x64</Platforms>
<SupportedOSPlatformVersion>8.0</SupportedOSPlatformVersion>
</PropertyGroup>
@@ -25,12 +26,15 @@
<ItemGroup>
<Content Include="Resources\standard.ico">
<Content Include="favicon.ico">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>
</ItemGroup>
<ItemGroup>
<PackageReference Include="hidlibrary" Version="3.3.40" />
<PackageReference Include="Microsoft.Toolkit.Uwp.Notifications" Version="7.1.3" />
<PackageReference Include="LibreHardwareMonitorLib" Version="0.9.1" />
<PackageReference Include="System.Management" Version="7.0.0" />
<PackageReference Include="TaskScheduler" Version="2.10.1" />
</ItemGroup>

View File

@@ -3,7 +3,7 @@ Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 17
VisualStudioVersion = 17.4.33403.182
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "GHelper", "GHelper.csproj", "{D6138BB1-8FDB-4835-87EF-2FE41A3DD604}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "GHelper", "GHelper.csproj", "{D6138BB1-8FDB-4835-87EF-2FE41A3DD604}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{B6E44CC6-5D28-4CB9-8EE2-BE9D6238E2D6}"
ProjectSection(SolutionItems) = preProject
@@ -13,13 +13,19 @@ EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Debug|x64 = Debug|x64
Release|Any CPU = Release|Any CPU
Release|x64 = Release|x64
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{D6138BB1-8FDB-4835-87EF-2FE41A3DD604}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{D6138BB1-8FDB-4835-87EF-2FE41A3DD604}.Debug|Any CPU.Build.0 = Debug|Any CPU
{D6138BB1-8FDB-4835-87EF-2FE41A3DD604}.Debug|x64.ActiveCfg = Release|x64
{D6138BB1-8FDB-4835-87EF-2FE41A3DD604}.Debug|x64.Build.0 = Release|x64
{D6138BB1-8FDB-4835-87EF-2FE41A3DD604}.Release|Any CPU.ActiveCfg = Release|Any CPU
{D6138BB1-8FDB-4835-87EF-2FE41A3DD604}.Release|Any CPU.Build.0 = Release|Any CPU
{D6138BB1-8FDB-4835-87EF-2FE41A3DD604}.Release|x64.ActiveCfg = Release|x64
{D6138BB1-8FDB-4835-87EF-2FE41A3DD604}.Release|x64.Build.0 = Release|x64
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE

View File

@@ -1,12 +1,11 @@
using HidLibrary;
using LibreHardwareMonitor.Hardware;
using Microsoft.Win32.TaskScheduler;
using System.Collections.Generic;
using System.Diagnostics;
using System.Management;
using System.Reflection.Metadata.Ecma335;
using System.Runtime.InteropServices;
using System.Text.Json;
using System.Text.Json.Serialization;
public class ASUSWmi
{
private ManagementObject mo;
@@ -60,7 +59,8 @@ public class ASUSWmi
status = int.Parse(property.Value.ToString());
status -= 65536;
return status;
} catch
}
catch
{
return -1;
}
@@ -70,7 +70,8 @@ public class ASUSWmi
try
{
return int.Parse(property.Value.ToString());
} catch
}
catch
{
return -1;
}
@@ -197,7 +198,7 @@ public class AppConfig
public int getConfig(string name)
{
if (config.ContainsKey(name))
if (config.ContainsKey(name))
return int.Parse(config[name].ToString());
else return -1;
}
@@ -217,6 +218,48 @@ 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 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 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 PowerReadDCValueIndex(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 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
{
@@ -350,8 +393,223 @@ public class NativeMethods
}
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 hrAC = PowerWriteACValueIndex(
IntPtr.Zero,
activeSchemeGuid,
GUID_CPU,
GUID_BOOST,
boost);
PowerSetActiveScheme(IntPtr.Zero, activeSchemeGuid);
var hrDC = PowerWriteDCValueIndex(
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 Dingding = 10;
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();
}
}
}
}
}
public class UpdateVisitor : IVisitor
{
public void VisitComputer(IComputer computer)
{
computer.Traverse(this);
}
public void VisitHardware(IHardware hardware)
{
hardware.Update();
foreach (IHardware subHardware in hardware.SubHardware) subHardware.Accept(this);
}
public void VisitSensor(ISensor sensor) { }
public void VisitParameter(IParameter parameter) { }
}
public class HardwareMonitor
{
Computer computer;
public float? cpuTemp = -1;
public float? gpuTemp = -1;
public float? batteryDischarge = -1;
public float? batteryCharge = -1;
public HardwareMonitor()
{
computer = new Computer
{
IsCpuEnabled = true,
IsGpuEnabled = true,
IsBatteryEnabled = true,
};
}
public void ReadSensors()
{
computer.Open();
computer.Accept(new UpdateVisitor());
cpuTemp = -1;
gpuTemp = -1;
batteryDischarge = -1;
batteryCharge = -1;
foreach (IHardware hardware in computer.Hardware)
{
//Debug.WriteLine("Hardware: {0}", hardware.Name);
//Debug.WriteLine("Hardware: {0}", hardware.HardwareType);
foreach (ISensor sensor in hardware.Sensors)
{
if (sensor.SensorType == SensorType.Temperature)
{
if (hardware.HardwareType.ToString().Contains("Cpu") && sensor.Name.Contains("Core"))
{
cpuTemp = sensor.Value;
//Debug.WriteLine("\tSensor: {0}, value: {1}", sensor.Name, sensor.Value);
}
if (hardware.HardwareType.ToString().Contains("Gpu") && sensor.Name.Contains("Core"))
{
gpuTemp = sensor.Value;
}
//Debug.WriteLine("\tSensor: {0}, value: {1}", sensor.Name, sensor.Value);
}
else if (sensor.SensorType == SensorType.Power)
{
if (sensor.Name.Contains("Discharge"))
{
batteryDischarge = sensor.Value;
}
if (sensor.Name.Contains("Charge"))
{
batteryCharge = sensor.Value;
}
}
}
}
}
public void StopReading()
{
computer.Close();
}
}
namespace GHelper
{
static class Program
@@ -362,14 +620,17 @@ namespace GHelper
public static AppConfig config;
public static SettingsForm settingsForm;
public static ToastForm toastForm;
public static Startup scheduler;
public static HardwareMonitor hwmonitor;
// The main entry point for the application
public static void Main()
{
trayIcon = new NotifyIcon
{
Text = "G14 Helper",
Text = "G-Helper",
Icon = GHelper.Properties.Resources.standard,
Visible = true
};
@@ -386,6 +647,8 @@ namespace GHelper
settingsForm = new SettingsForm();
settingsForm.InitGPUMode();
settingsForm.InitBoost();
settingsForm.InitAura();
settingsForm.SetPerformanceMode(config.getConfig("performance_mode"));
settingsForm.SetBatteryChargeLimit(config.getConfig("charge_limit"));
@@ -395,6 +658,13 @@ namespace GHelper
settingsForm.SetStartupCheck(scheduler.IsScheduled());
bool isPlugged = (System.Windows.Forms.SystemInformation.PowerStatus.PowerLineStatus == PowerLineStatus.Online);
settingsForm.AutoGPUMode(isPlugged ? 1 : 0);
settingsForm.AutoScreen(isPlugged ? 1 : 0);
hwmonitor = new HardwareMonitor();
IntPtr dummy = settingsForm.Handle;
Application.Run();
}
@@ -414,10 +684,18 @@ namespace GHelper
{
case 56: // Rog button
case 174: // FN+F5
settingsForm.BeginInvoke(delegate
{
settingsForm.CyclePerformanceMode();
});
return;
case 179: // FN+F4
settingsForm.BeginInvoke(delegate
{
settingsForm.CycleAuraMode();
});
return;
case 87: // Battery
settingsForm.BeginInvoke(delegate
@@ -451,6 +729,8 @@ namespace GHelper
settingsForm.Show();
settingsForm.Activate();
}
trayIcon.Icon = trayIcon.Icon; // refreshing icon as it get's blurred when screen resolution changes
}
}

View File

@@ -80,6 +80,16 @@ 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>
@@ -100,6 +110,16 @@ namespace GHelper.Properties {
}
}
/// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>
internal static System.Drawing.Bitmap icons8_speed_96 {
get {
object obj = ResourceManager.GetObject("icons8-speed-96", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>

View File

@@ -121,6 +121,9 @@
<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>
</data>
<data name="icons8-keyboard-48" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\icons8-keyboard-48.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<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>
</data>
@@ -139,4 +142,7 @@
<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>
<data name="icons8-speed-96" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\icons8-speed-96.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
</root>

View File

@@ -1,4 +1,4 @@
# G14-Helper
# G-Helper (For G14, G15, ROG FLOW, and others)
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!.
@@ -10,8 +10,8 @@ Designed for Asus Zephyrus G14 2022 (with AMD Radeon iGPU and dGPU). But could a
Profiles are **same** as in Armory Crate, including default fan curves
1. Silent (minimal or no fans, 45W PPT to CPU)
2. Balanced (balanced fans, up to 45W PPT to CPU)
1. Silent (minimal or no fans, 70W PPT total, up to 45W PPT to CPU)
2. Balanced (balanced fans, 100W PPT total, up to 45W PPT to CPU)
3. Turbo (intense fans, 125W PPT total, up to 80W PPT to CPU)
## GPU Mode switching
@@ -22,12 +22,19 @@ Profiles are **same** as in Armory Crate, including default fan curves
## Extras
1. **Maximum battery charge rate** limit (60% / 80% / 100%) to preserve your battery
2. CPU and GPU relative fan speed monitoring
3. Automatic switching of Standard/Eco GPU modes when laptop is plugged / unplugged!
4. FN+F5 an M4 (Rog) keys cycle through Performance modes
5. Screen resolution and display overdrive switching
6. Run on startup (optional)
1. Keyboard backlight control (basic aura modes and colors)
2. **Maximum battery charge rate** limit (60% / 80% / 100%) to preserve your battery
3. CPU and GPU relative fan speed monitoring
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. CPU turbo boost switching
8. CPU & dGPU temperature monitoring in Celsius, battery charge / discharge rates in Watts
## Things still missing
1. Custom fan profiles
2. Anime matrix control
## How to install

Binary file not shown.

After

Width:  |  Height:  |  Size: 515 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

312
Settings.Designer.cs generated
View File

@@ -28,10 +28,10 @@
/// </summary>
private void InitializeComponent()
{
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(SettingsForm));
this.checkStartup = new System.Windows.Forms.CheckBox();
this.trackBattery = new System.Windows.Forms.TrackBar();
this.labelBattery = new System.Windows.Forms.Label();
this.labelBatteryLimit = new System.Windows.Forms.Label();
this.labelBatteryTitle = new System.Windows.Forms.Label();
this.pictureBattery = new System.Windows.Forms.PictureBox();
this.labelGPUFan = new System.Windows.Forms.Label();
this.tableGPU = new System.Windows.Forms.TableLayoutPanel();
@@ -55,6 +55,13 @@
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();
this.labelBattery = new System.Windows.Forms.Label();
((System.ComponentModel.ISupportInitialize)(this.trackBattery)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.pictureBattery)).BeginInit();
this.tableGPU.SuspendLayout();
@@ -63,13 +70,15 @@
((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();
//
// checkStartup
//
this.checkStartup.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.checkStartup.AutoSize = true;
this.checkStartup.Location = new System.Drawing.Point(34, 836);
this.checkStartup.Location = new System.Drawing.Point(40, 1007);
this.checkStartup.Margin = new System.Windows.Forms.Padding(4, 2, 4, 2);
this.checkStartup.Name = "checkStartup";
this.checkStartup.Size = new System.Drawing.Size(206, 36);
this.checkStartup.TabIndex = 2;
@@ -82,55 +91,50 @@
this.trackBattery.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.trackBattery.LargeChange = 20;
this.trackBattery.Location = new System.Drawing.Point(23, 744);
this.trackBattery.Location = new System.Drawing.Point(20, 908);
this.trackBattery.Margin = new System.Windows.Forms.Padding(4, 2, 4, 2);
this.trackBattery.Maximum = 100;
this.trackBattery.Minimum = 50;
this.trackBattery.Name = "trackBattery";
this.trackBattery.Size = new System.Drawing.Size(651, 90);
this.trackBattery.Size = new System.Drawing.Size(690, 90);
this.trackBattery.SmallChange = 10;
this.trackBattery.TabIndex = 3;
this.trackBattery.TickFrequency = 10;
this.trackBattery.TickStyle = System.Windows.Forms.TickStyle.TopLeft;
this.trackBattery.Value = 100;
//
// labelBattery
// labelBatteryTitle
//
this.labelBattery.AutoSize = true;
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, 701);
this.labelBattery.Name = "labelBattery";
this.labelBattery.Size = new System.Drawing.Size(248, 32);
this.labelBattery.TabIndex = 4;
this.labelBattery.Text = "Battery Charge Limit";
//
// labelBatteryLimit
//
this.labelBatteryLimit.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.labelBatteryLimit.AutoSize = true;
this.labelBatteryLimit.Location = new System.Drawing.Point(596, 699);
this.labelBatteryLimit.Name = "labelBatteryLimit";
this.labelBatteryLimit.Size = new System.Drawing.Size(73, 32);
this.labelBatteryLimit.TabIndex = 5;
this.labelBatteryLimit.Text = "100%";
this.labelBatteryTitle.AutoSize = true;
this.labelBatteryTitle.Font = new System.Drawing.Font("Segoe UI", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point);
this.labelBatteryTitle.Location = new System.Drawing.Point(77, 871);
this.labelBatteryTitle.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
this.labelBatteryTitle.Name = "labelBatteryTitle";
this.labelBatteryTitle.Size = new System.Drawing.Size(248, 32);
this.labelBatteryTitle.TabIndex = 4;
this.labelBatteryTitle.Text = "Battery Charge Limit";
//
// pictureBattery
//
this.pictureBattery.Image = global::GHelper.Properties.Resources.icons8_charging_battery_48;
this.pictureBattery.Location = new System.Drawing.Point(32, 693);
this.pictureBattery.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("pictureBattery.BackgroundImage")));
this.pictureBattery.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Zoom;
this.pictureBattery.Location = new System.Drawing.Point(33, 868);
this.pictureBattery.Margin = new System.Windows.Forms.Padding(4, 2, 4, 2);
this.pictureBattery.Name = "pictureBattery";
this.pictureBattery.Size = new System.Drawing.Size(48, 48);
this.pictureBattery.Size = new System.Drawing.Size(38, 38);
this.pictureBattery.TabIndex = 6;
this.pictureBattery.TabStop = false;
//
// labelGPUFan
//
this.labelGPUFan.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.labelGPUFan.AutoSize = true;
this.labelGPUFan.Location = new System.Drawing.Point(515, 234);
this.labelGPUFan.Location = new System.Drawing.Point(425, 262);
this.labelGPUFan.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
this.labelGPUFan.Name = "labelGPUFan";
this.labelGPUFan.Size = new System.Drawing.Size(155, 32);
this.labelGPUFan.Size = new System.Drawing.Size(277, 32);
this.labelGPUFan.TabIndex = 8;
this.labelGPUFan.Text = "GPU Fan : 0%";
this.labelGPUFan.TextAlign = System.Drawing.ContentAlignment.TopRight;
//
// tableGPU
//
@@ -143,11 +147,12 @@
this.tableGPU.Controls.Add(this.buttonUltimate, 2, 0);
this.tableGPU.Controls.Add(this.buttonStandard, 1, 0);
this.tableGPU.Controls.Add(this.buttonEco, 0, 0);
this.tableGPU.Location = new System.Drawing.Point(23, 276);
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.RowCount = 1;
this.tableGPU.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 106F));
this.tableGPU.Size = new System.Drawing.Size(651, 106);
this.tableGPU.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 107F));
this.tableGPU.Size = new System.Drawing.Size(690, 107);
this.tableGPU.TabIndex = 7;
//
// buttonUltimate
@@ -156,10 +161,10 @@
this.buttonUltimate.Dock = System.Windows.Forms.DockStyle.Fill;
this.buttonUltimate.FlatAppearance.BorderSize = 0;
this.buttonUltimate.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.buttonUltimate.Location = new System.Drawing.Point(444, 10);
this.buttonUltimate.Margin = new System.Windows.Forms.Padding(10);
this.buttonUltimate.Location = new System.Drawing.Point(469, 11);
this.buttonUltimate.Margin = new System.Windows.Forms.Padding(9, 11, 9, 11);
this.buttonUltimate.Name = "buttonUltimate";
this.buttonUltimate.Size = new System.Drawing.Size(197, 86);
this.buttonUltimate.Size = new System.Drawing.Size(212, 85);
this.buttonUltimate.TabIndex = 2;
this.buttonUltimate.Text = "Ultimate";
this.buttonUltimate.UseVisualStyleBackColor = false;
@@ -170,10 +175,10 @@
this.buttonStandard.Dock = System.Windows.Forms.DockStyle.Fill;
this.buttonStandard.FlatAppearance.BorderSize = 0;
this.buttonStandard.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.buttonStandard.Location = new System.Drawing.Point(227, 10);
this.buttonStandard.Margin = new System.Windows.Forms.Padding(10);
this.buttonStandard.Location = new System.Drawing.Point(239, 11);
this.buttonStandard.Margin = new System.Windows.Forms.Padding(9, 11, 9, 11);
this.buttonStandard.Name = "buttonStandard";
this.buttonStandard.Size = new System.Drawing.Size(197, 86);
this.buttonStandard.Size = new System.Drawing.Size(212, 85);
this.buttonStandard.TabIndex = 1;
this.buttonStandard.Text = "Standard";
this.buttonStandard.UseVisualStyleBackColor = false;
@@ -185,10 +190,10 @@
this.buttonEco.Dock = System.Windows.Forms.DockStyle.Fill;
this.buttonEco.FlatAppearance.BorderSize = 0;
this.buttonEco.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.buttonEco.Location = new System.Drawing.Point(10, 10);
this.buttonEco.Margin = new System.Windows.Forms.Padding(10);
this.buttonEco.Location = new System.Drawing.Point(9, 11);
this.buttonEco.Margin = new System.Windows.Forms.Padding(9, 11, 9, 11);
this.buttonEco.Name = "buttonEco";
this.buttonEco.Size = new System.Drawing.Size(197, 86);
this.buttonEco.Size = new System.Drawing.Size(212, 85);
this.buttonEco.TabIndex = 0;
this.buttonEco.Text = "Eco";
this.buttonEco.UseVisualStyleBackColor = false;
@@ -197,7 +202,8 @@
//
this.labelGPU.AutoSize = true;
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, 234);
this.labelGPU.Location = new System.Drawing.Point(77, 265);
this.labelGPU.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
this.labelGPU.Name = "labelGPU";
this.labelGPU.Size = new System.Drawing.Size(136, 32);
this.labelGPU.TabIndex = 9;
@@ -205,22 +211,25 @@
//
// pictureGPU
//
this.pictureGPU.Image = global::GHelper.Properties.Resources.icons8_video_card_48;
this.pictureGPU.Location = new System.Drawing.Point(32, 226);
this.pictureGPU.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("pictureGPU.BackgroundImage")));
this.pictureGPU.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Zoom;
this.pictureGPU.Location = new System.Drawing.Point(33, 263);
this.pictureGPU.Margin = new System.Windows.Forms.Padding(4, 2, 4, 2);
this.pictureGPU.Name = "pictureGPU";
this.pictureGPU.Size = new System.Drawing.Size(48, 48);
this.pictureGPU.Size = new System.Drawing.Size(38, 38);
this.pictureGPU.TabIndex = 10;
this.pictureGPU.TabStop = false;
//
// labelCPUFan
//
this.labelCPUFan.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.labelCPUFan.AutoSize = true;
this.labelCPUFan.Location = new System.Drawing.Point(517, 39);
this.labelCPUFan.Location = new System.Drawing.Point(425, 38);
this.labelCPUFan.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
this.labelCPUFan.Name = "labelCPUFan";
this.labelCPUFan.Size = new System.Drawing.Size(154, 32);
this.labelCPUFan.Size = new System.Drawing.Size(277, 32);
this.labelCPUFan.TabIndex = 12;
this.labelCPUFan.Text = "CPU Fan : 0%";
this.labelCPUFan.TextAlign = System.Drawing.ContentAlignment.TopRight;
//
// tablePerf
//
@@ -233,11 +242,12 @@
this.tablePerf.Controls.Add(this.buttonTurbo, 2, 0);
this.tablePerf.Controls.Add(this.buttonBalanced, 1, 0);
this.tablePerf.Controls.Add(this.buttonSilent, 0, 0);
this.tablePerf.Location = new System.Drawing.Point(23, 79);
this.tablePerf.Location = new System.Drawing.Point(22, 76);
this.tablePerf.Margin = new System.Windows.Forms.Padding(4, 2, 4, 2);
this.tablePerf.Name = "tablePerf";
this.tablePerf.RowCount = 1;
this.tablePerf.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 106F));
this.tablePerf.Size = new System.Drawing.Size(651, 106);
this.tablePerf.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 107F));
this.tablePerf.Size = new System.Drawing.Size(690, 107);
this.tablePerf.TabIndex = 11;
//
// buttonTurbo
@@ -247,10 +257,10 @@
this.buttonTurbo.FlatAppearance.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(192)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))));
this.buttonTurbo.FlatAppearance.BorderSize = 0;
this.buttonTurbo.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.buttonTurbo.Location = new System.Drawing.Point(444, 10);
this.buttonTurbo.Margin = new System.Windows.Forms.Padding(10);
this.buttonTurbo.Location = new System.Drawing.Point(469, 11);
this.buttonTurbo.Margin = new System.Windows.Forms.Padding(9, 11, 9, 11);
this.buttonTurbo.Name = "buttonTurbo";
this.buttonTurbo.Size = new System.Drawing.Size(197, 86);
this.buttonTurbo.Size = new System.Drawing.Size(212, 85);
this.buttonTurbo.TabIndex = 2;
this.buttonTurbo.Text = "Turbo";
this.buttonTurbo.UseVisualStyleBackColor = false;
@@ -262,10 +272,10 @@
this.buttonBalanced.FlatAppearance.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(192)))));
this.buttonBalanced.FlatAppearance.BorderSize = 0;
this.buttonBalanced.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.buttonBalanced.Location = new System.Drawing.Point(227, 10);
this.buttonBalanced.Margin = new System.Windows.Forms.Padding(10);
this.buttonBalanced.Location = new System.Drawing.Point(239, 11);
this.buttonBalanced.Margin = new System.Windows.Forms.Padding(9, 11, 9, 11);
this.buttonBalanced.Name = "buttonBalanced";
this.buttonBalanced.Size = new System.Drawing.Size(197, 86);
this.buttonBalanced.Size = new System.Drawing.Size(212, 85);
this.buttonBalanced.TabIndex = 1;
this.buttonBalanced.Text = "Balanced";
this.buttonBalanced.UseVisualStyleBackColor = false;
@@ -278,20 +288,23 @@
this.buttonSilent.FlatAppearance.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(192)))), ((int)(((byte)(192)))));
this.buttonSilent.FlatAppearance.BorderSize = 0;
this.buttonSilent.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.buttonSilent.Location = new System.Drawing.Point(10, 10);
this.buttonSilent.Margin = new System.Windows.Forms.Padding(10);
this.buttonSilent.Location = new System.Drawing.Point(9, 11);
this.buttonSilent.Margin = new System.Windows.Forms.Padding(9, 11, 9, 11);
this.buttonSilent.Name = "buttonSilent";
this.buttonSilent.Size = new System.Drawing.Size(197, 86);
this.buttonSilent.Size = new System.Drawing.Size(212, 85);
this.buttonSilent.TabIndex = 0;
this.buttonSilent.Text = "Silent";
this.buttonSilent.UseVisualStyleBackColor = false;
//
// picturePerf
//
this.picturePerf.Image = global::GHelper.Properties.Resources.icons8_speed_48;
this.picturePerf.Location = new System.Drawing.Point(32, 29);
this.picturePerf.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("picturePerf.BackgroundImage")));
this.picturePerf.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Zoom;
this.picturePerf.InitialImage = null;
this.picturePerf.Location = new System.Drawing.Point(33, 36);
this.picturePerf.Margin = new System.Windows.Forms.Padding(4, 2, 4, 2);
this.picturePerf.Name = "picturePerf";
this.picturePerf.Size = new System.Drawing.Size(48, 48);
this.picturePerf.Size = new System.Drawing.Size(38, 38);
this.picturePerf.TabIndex = 14;
this.picturePerf.TabStop = false;
//
@@ -299,7 +312,8 @@
//
this.labelPerf.AutoSize = true;
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(77, 38);
this.labelPerf.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
this.labelPerf.Name = "labelPerf";
this.labelPerf.Size = new System.Drawing.Size(234, 32);
this.labelPerf.TabIndex = 13;
@@ -308,31 +322,36 @@
// checkGPU
//
this.checkGPU.AutoSize = true;
this.checkGPU.Location = new System.Drawing.Point(34, 385);
this.checkGPU.ForeColor = System.Drawing.SystemColors.GrayText;
this.checkGPU.Location = new System.Drawing.Point(33, 411);
this.checkGPU.Margin = new System.Windows.Forms.Padding(4, 2, 4, 2);
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.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.CheckedChanged += new System.EventHandler(this.checkGPU_CheckedChanged);
//
// buttonQuit
//
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.Top | System.Windows.Forms.AnchorStyles.Right)));
this.buttonQuit.BackColor = System.Drawing.SystemColors.ButtonFace;
this.buttonQuit.Location = new System.Drawing.Point(551, 830);
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.Size = new System.Drawing.Size(120, 46);
this.buttonQuit.Size = new System.Drawing.Size(121, 47);
this.buttonQuit.TabIndex = 16;
this.buttonQuit.Text = "Quit";
this.buttonQuit.UseVisualStyleBackColor = false;
//
// pictureScreen
//
this.pictureScreen.Image = global::GHelper.Properties.Resources.icons8_laptop_48;
this.pictureScreen.Location = new System.Drawing.Point(32, 463);
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(33, 496);
this.pictureScreen.Margin = new System.Windows.Forms.Padding(4, 2, 4, 2);
this.pictureScreen.Name = "pictureScreen";
this.pictureScreen.Size = new System.Drawing.Size(48, 48);
this.pictureScreen.Size = new System.Drawing.Size(38, 38);
this.pictureScreen.TabIndex = 18;
this.pictureScreen.TabStop = false;
//
@@ -340,7 +359,8 @@
//
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(82, 471);
this.labelSreen.Location = new System.Drawing.Point(77, 496);
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;
@@ -356,11 +376,12 @@
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(23, 513);
this.tableScreen.Location = new System.Drawing.Point(22, 536);
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, 106F));
this.tableScreen.Size = new System.Drawing.Size(651, 103);
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
@@ -370,10 +391,10 @@
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(227, 10);
this.button120Hz.Margin = new System.Windows.Forms.Padding(10);
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(197, 86);
this.button120Hz.Size = new System.Drawing.Size(212, 85);
this.button120Hz.TabIndex = 1;
this.button120Hz.Text = "120Hz + OD";
this.button120Hz.UseVisualStyleBackColor = false;
@@ -387,10 +408,10 @@
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(10, 10);
this.button60Hz.Margin = new System.Windows.Forms.Padding(10);
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(197, 86);
this.button60Hz.Size = new System.Drawing.Size(212, 85);
this.button60Hz.TabIndex = 0;
this.button60Hz.Text = "60Hz";
this.button60Hz.UseVisualStyleBackColor = false;
@@ -398,18 +419,112 @@
// checkScreen
//
this.checkScreen.AutoSize = true;
this.checkScreen.Location = new System.Drawing.Point(34, 622);
this.checkScreen.ForeColor = System.Drawing.SystemColors.GrayText;
this.checkScreen.Location = new System.Drawing.Point(33, 639);
this.checkScreen.Margin = new System.Windows.Forms.Padding(4, 2, 4, 2);
this.checkScreen.Name = "checkScreen";
this.checkScreen.Size = new System.Drawing.Size(562, 36);
this.checkScreen.Size = new System.Drawing.Size(527, 36);
this.checkScreen.TabIndex = 20;
this.checkScreen.Text = "Switch 60Hz on battery, and back when plugged";
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, 184);
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, 725);
this.pictureBox1.Margin = new System.Windows.Forms.Padding(4, 2, 4, 2);
this.pictureBox1.Name = "pictureBox1";
this.pictureBox1.Size = new System.Drawing.Size(36, 36);
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(77, 726);
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(38, 778);
this.comboKeyboard.Margin = new System.Windows.Forms.Padding(0);
this.comboKeyboard.Name = "comboKeyboard";
this.comboKeyboard.Size = new System.Drawing.Size(200, 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 = 3;
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;
//
// labelBattery
//
this.labelBattery.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.labelBattery.Location = new System.Drawing.Point(491, 869);
this.labelBattery.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
this.labelBattery.Name = "labelBattery";
this.labelBattery.Size = new System.Drawing.Size(211, 32);
this.labelBattery.TabIndex = 27;
this.labelBattery.Text = " ";
this.labelBattery.TextAlign = System.Drawing.ContentAlignment.TopRight;
//
// SettingsForm
//
this.AutoScaleDimensions = new System.Drawing.SizeF(13F, 32F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(705, 900);
this.ClientSize = new System.Drawing.Size(744, 1093);
this.Controls.Add(this.labelBattery);
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);
@@ -425,20 +540,21 @@
this.Controls.Add(this.labelGPUFan);
this.Controls.Add(this.tableGPU);
this.Controls.Add(this.pictureBattery);
this.Controls.Add(this.labelBatteryLimit);
this.Controls.Add(this.labelBattery);
this.Controls.Add(this.labelBatteryTitle);
this.Controls.Add(this.trackBattery);
this.Controls.Add(this.checkStartup);
this.Controls.Add(this.pictureBox2);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
this.Margin = new System.Windows.Forms.Padding(4, 2, 4, 2);
this.MaximizeBox = false;
this.MdiChildrenMinimizedAnchorBottom = false;
this.MinimizeBox = false;
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.ShowInTaskbar = false;
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
this.Text = "G14 Helper";
this.Text = "G-Helper";
this.Load += new System.EventHandler(this.Settings_Load);
((System.ComponentModel.ISupportInitialize)(this.trackBattery)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.pictureBattery)).EndInit();
@@ -448,6 +564,8 @@
((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.PerformLayout();
@@ -456,8 +574,7 @@
#endregion
private CheckBox checkStartup;
private TrackBar trackBattery;
private Label labelBattery;
private Label labelBatteryLimit;
private Label labelBatteryTitle;
private PictureBox pictureBattery;
private Label labelGPUFan;
private TableLayoutPanel tableGPU;
@@ -481,5 +598,12 @@
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;
private Label labelBattery;
}
}

View File

@@ -1,10 +1,12 @@
using System.Collections.Generic;
using System.Diagnostics;
using System.Text.Json;
using System.Diagnostics;
using System.Timers;
using System.Windows.Forms;
using Windows.UI.Notifications;
using Microsoft.Toolkit.Uwp.Notifications;
namespace GHelper
{
public partial class SettingsForm : Form
{
@@ -49,11 +51,110 @@ namespace GHelper
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();
}
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)
{
//Debug.WriteLine(mode);
if (mode > 3) mode = 0;
if (Aura.Mode == mode) return; // same mode
Aura.Mode = mode;
Program.config.setConfig("aura_mode", mode);
comboKeyboard.SelectedValueChanged -= ComboKeyboard_SelectedValueChanged;
comboKeyboard.SelectedIndex = mode;
comboKeyboard.SelectedValueChanged += ComboKeyboard_SelectedValueChanged;
if (apply)
Aura.ApplyAura();
}
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)
@@ -81,26 +182,41 @@ namespace GHelper
frequency = 120;
}
if (frequency > 0)
if (frequency > 0)
NativeMethods.SetRefreshRate(frequency);
if (overdrive > 0)
Program.wmi.DeviceSet(ASUSWmi.ScreenOverdrive, overdrive);
try
{
if (overdrive > 0)
Program.wmi.DeviceSet(ASUSWmi.ScreenOverdrive, overdrive);
}
catch
{
Debug.WriteLine("Screen Overdrive not supported");
}
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;
if (frequency < 0)
{
button60Hz.Enabled = false;
button120Hz.Enabled = false;
labelSreen.Text = "Latop Screen: Turned off";
labelSreen.Text = "Laptop Screen: Turned off";
button60Hz.BackColor = SystemColors.ControlLight;
button120Hz.BackColor = SystemColors.ControlLight;
}
@@ -110,10 +226,18 @@ namespace GHelper
button120Hz.Enabled = true;
button60Hz.BackColor = SystemColors.ControlLightLight;
button120Hz.BackColor = SystemColors.ControlLightLight;
labelSreen.Text = "Latop Screen";
labelSreen.Text = "Laptop Screen";
}
int overdrive = Program.wmi.DeviceGet(ASUSWmi.ScreenOverdrive);
int overdrive = 0;
try
{
overdrive = Program.wmi.DeviceGet(ASUSWmi.ScreenOverdrive);
}
catch
{
Debug.WriteLine("Screen Overdrive not supported");
}
button60Hz.FlatAppearance.BorderSize = buttonInactive;
button120Hz.FlatAppearance.BorderSize = buttonInactive;
@@ -121,11 +245,12 @@ namespace GHelper
if (frequency == 60)
{
button60Hz.FlatAppearance.BorderSize = buttonActive;
} else
}
else
{
if (maxFrequency > 60)
if (frequency > 60)
maxFrequency = frequency;
Program.config.setConfig("max_frequency", maxFrequency);
button120Hz.FlatAppearance.BorderSize = buttonActive;
}
@@ -172,22 +297,54 @@ namespace GHelper
private static void SetTimer()
{
aTimer = new System.Timers.Timer(1000);
aTimer = new System.Timers.Timer(500);
aTimer.Elapsed += OnTimedEvent;
aTimer.AutoReset = true;
aTimer.Enabled = false;
}
private static void OnTimedEvent(Object source, ElapsedEventArgs e)
private static void RefreshSensors()
{
var cpuFan = Math.Round(Program.wmi.DeviceGet(ASUSWmi.CPU_Fan) / 0.6);
var gpuFan = Math.Round(Program.wmi.DeviceGet(ASUSWmi.GPU_Fan) / 0.6);
string cpuFan = " Fan: " + Math.Round(Program.wmi.DeviceGet(ASUSWmi.CPU_Fan) / 0.6).ToString() + "%";
string gpuFan = " Fan: " + Math.Round(Program.wmi.DeviceGet(ASUSWmi.GPU_Fan) / 0.6) + "%";
string cpuTemp = "";
string gpuTemp = "";
string battery = "";
try
{
Program.hwmonitor.ReadSensors();
}
catch
{
Debug.WriteLine("Failed reading sensors");
}
if (Program.hwmonitor.cpuTemp > 0)
cpuTemp = ": " + Math.Round((decimal)Program.hwmonitor.cpuTemp).ToString() + "°C - ";
if (Program.hwmonitor.gpuTemp > 0)
gpuTemp = ": " + Math.Round((decimal)Program.hwmonitor.gpuTemp).ToString() + "°C - ";
if (Program.hwmonitor.batteryDischarge > 0)
battery = "Discharging: " + Math.Round((decimal)Program.hwmonitor.batteryDischarge, 1).ToString() + "W";
if (Program.hwmonitor.batteryCharge > 0)
battery = "Charging: " + Math.Round((decimal)Program.hwmonitor.batteryCharge, 1).ToString() + "W";
Program.settingsForm.BeginInvoke(delegate
{
Program.settingsForm.labelCPUFan.Text = "CPU Fan: " + cpuFan.ToString() + "%";
Program.settingsForm.labelGPUFan.Text = "GPU Fan: " + gpuFan.ToString() + "%";
Program.settingsForm.labelCPUFan.Text = "CPU" + cpuTemp + cpuFan;
Program.settingsForm.labelGPUFan.Text = "GPU" + gpuTemp + gpuFan;
Program.settingsForm.labelBattery.Text = battery;
});
}
private static void OnTimedEvent(Object? source, ElapsedEventArgs? e)
{
RefreshSensors();
aTimer.Interval = 2000;
}
private void SettingsForm_VisibleChanged(object? sender, EventArgs e)
@@ -197,62 +354,103 @@ namespace GHelper
InitScreen();
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();
aTimer.Interval = 500;
aTimer.Enabled = true;
}
else
{
aTimer.Enabled = false;
Program.hwmonitor.StopReading();
}
}
public void SetPerformanceMode(int PerformanceMode = ASUSWmi.PerformanceBalanced)
public void SetPerformanceMode(int PerformanceMode = ASUSWmi.PerformanceBalanced, bool notify = false)
{
string perfName;
buttonSilent.FlatAppearance.BorderSize = buttonInactive;
buttonBalanced.FlatAppearance.BorderSize = buttonInactive;
buttonTurbo.FlatAppearance.BorderSize = buttonInactive;
string[] mode = new string[]{
"Balanced",
"Turbo",
"Silent"
};
switch (PerformanceMode)
{
case ASUSWmi.PerformanceSilent:
buttonSilent.FlatAppearance.BorderSize = buttonActive;
labelPerf.Text = "Peformance Mode: Silent";
perfName = "Silent";
break;
case ASUSWmi.PerformanceTurbo:
buttonTurbo.FlatAppearance.BorderSize = buttonActive;
labelPerf.Text = "Peformance Mode: Turbo";
perfName = "Turbo";
break;
default:
buttonBalanced.FlatAppearance.BorderSize = buttonActive;
labelPerf.Text = "Peformance Mode: Balanced";
PerformanceMode = ASUSWmi.PerformanceBalanced;
perfName = "Balanced";
break;
}
string notifTitle = "Performance Mode Changed";
string notifBody = "Switched to: " + 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";
}
if(notify)
sendNotification(notifTitle, notifBody);
}
public void CyclePerformanceMode()
{
SetPerformanceMode(Program.config.getConfig("performance_mode") + 1);
SetPerformanceMode(Program.config.getConfig("performance_mode") + 1, true);
}
public void AutoScreen (int Plugged = 1)
public void sendNotification(string title, string message)
{
var content = new ToastContentBuilder()
.AddText(title)
.AddText(message)
.SetToastDuration(ToastDuration.Short)
.GetToastContent();
var notification = new ToastNotification(content.GetXml())
{
Priority = ToastNotificationPriority.High
};
ToastNotificationManagerCompat.CreateToastNotifier().Show(notification);
}
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);
InitScreen();
}
public void AutoGPUMode(int Plugged = 1)
@@ -273,18 +471,12 @@ namespace GHelper
if (eco == 1 && Plugged == 1) // Eco going Standard on plugged
{
Program.wmi.DeviceSet(ASUSWmi.GPUEco, 0);
GPUMode = ASUSWmi.GPUModeStandard;
VisualiseGPUMode(GPUMode);
Program.config.setConfig("gpu_mode", GPUMode);
InitGPUMode();
}
else if (eco == 0 && Plugged == 0) // Standard going Eco on plugged
{
Program.wmi.DeviceSet(ASUSWmi.GPUEco, 1);
GPUMode = ASUSWmi.GPUModeEco;
VisualiseGPUMode(GPUMode);
Program.config.setConfig("gpu_mode", GPUMode);
InitGPUMode();
}
}
@@ -375,7 +567,7 @@ namespace GHelper
}
public void VisualiseGPUAuto(int GPUAuto)
public void VisualiseGPUAuto(int GPUAuto)
{
checkGPU.Checked = (GPUAuto == 1);
}
@@ -396,25 +588,23 @@ namespace GHelper
{
case ASUSWmi.GPUModeEco:
buttonEco.FlatAppearance.BorderSize = buttonActive;
labelGPU.Text = "GPU Mode: Eco (iGPU only)";
labelGPU.Text = "GPU Mode: iGPU only";
Program.trayIcon.Icon = GHelper.Properties.Resources.eco;
break;
case ASUSWmi.GPUModeUltimate:
buttonUltimate.FlatAppearance.BorderSize = buttonActive;
labelGPU.Text = "GPU Mode: Ultimate (dGPU exclusive)";
labelGPU.Text = "GPU Mode: dGPU exclusive";
Program.trayIcon.Icon = GHelper.Properties.Resources.ultimate;
break;
default:
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;
break;
}
}
private void ButtonSilent_Click(object? sender, EventArgs e)
{
SetPerformanceMode(ASUSWmi.PerformanceSilent);
@@ -458,14 +648,21 @@ namespace GHelper
}
}
public void SetBatteryChargeLimit (int limit = 100)
public void SetBatteryChargeLimit(int limit = 100)
{
if (limit < 50 || limit > 100) limit = 100;
labelBatteryLimit.Text = limit.ToString() + "%";
labelBatteryTitle.Text = "Battery Charge Limit: " + limit.ToString() + "%";
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);
}
@@ -480,13 +677,9 @@ namespace GHelper
{
CheckBox chk = (CheckBox)sender;
if (chk.Checked)
{
Program.config.setConfig("gpu_auto", 1);
}
else
{
Program.config.setConfig("gpu_auto", 0);
}
}
@@ -494,15 +687,12 @@ namespace GHelper
{
CheckBox chk = (CheckBox)sender;
if (chk.Checked)
{
Program.config.setConfig("screen_auto", 1);
}
else
{
Program.config.setConfig("screen_auto", 0);
}
}
}

View File

@@ -57,4 +57,62 @@
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</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>

85
ToastForm.Designer.cs generated Normal file
View File

@@ -0,0 +1,85 @@
namespace GHelper
{
partial class ToastForm
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.pictureIcon = new System.Windows.Forms.PictureBox();
this.labelMode = new System.Windows.Forms.Label();
((System.ComponentModel.ISupportInitialize)(this.pictureIcon)).BeginInit();
this.SuspendLayout();
//
// pictureIcon
//
this.pictureIcon.BackgroundImage = global::GHelper.Properties.Resources.icons8_speed_96;
this.pictureIcon.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Zoom;
this.pictureIcon.Location = new System.Drawing.Point(21, 21);
this.pictureIcon.Name = "pictureIcon";
this.pictureIcon.Size = new System.Drawing.Size(82, 80);
this.pictureIcon.TabIndex = 0;
this.pictureIcon.TabStop = false;
//
// labelMode
//
this.labelMode.AutoSize = true;
this.labelMode.Font = new System.Drawing.Font("Segoe UI", 16F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point);
this.labelMode.Location = new System.Drawing.Point(127, 32);
this.labelMode.Name = "labelMode";
this.labelMode.Size = new System.Drawing.Size(195, 59);
this.labelMode.TabIndex = 1;
this.labelMode.Text = "Balanced";
this.labelMode.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
//
// ToastForm
//
this.AutoScaleDimensions = new System.Drawing.SizeF(13F, 32F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.BackColor = System.Drawing.SystemColors.ControlLightLight;
this.ClientSize = new System.Drawing.Size(356, 122);
this.Controls.Add(this.labelMode);
this.Controls.Add(this.pictureIcon);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
this.MaximizeBox = false;
this.MdiChildrenMinimizedAnchorBottom = false;
this.MinimizeBox = false;
this.Name = "ToastForm";
this.ShowIcon = false;
this.ShowInTaskbar = false;
this.Text = "ToastForm";
this.TopMost = true;
((System.ComponentModel.ISupportInitialize)(this.pictureIcon)).EndInit();
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private PictureBox pictureIcon;
private Label labelMode;
}
}

68
ToastForm.cs Normal file
View File

@@ -0,0 +1,68 @@
using System.Runtime.InteropServices;
namespace GHelper
{
public partial class ToastForm : Form
{
private System.Windows.Forms.Timer timer = default!;
private const int SW_SHOWNOACTIVATE = 4;
private const int HWND_TOPMOST = -1;
private const uint SWP_NOACTIVATE = 0x0010;
[DllImport("user32.dll", EntryPoint = "SetWindowPos")]
static extern bool SetWindowPos(
int hWnd, // Window handle
int hWndInsertAfter, // Placement-order handle
int X, // Horizontal position
int Y, // Vertical position
int cx, // Width
int cy, // Height
uint uFlags); // Window positioning flags
[DllImport("user32.dll")]
static extern bool ShowWindow(IntPtr hWnd, int nCmdShow);
static void ShowInactiveTopmost(Form frm)
{
ShowWindow(frm.Handle, SW_SHOWNOACTIVATE);
SetWindowPos(frm.Handle.ToInt32(), HWND_TOPMOST,
frm.Left, frm.Top, frm.Width, frm.Height,
SWP_NOACTIVATE);
}
public ToastForm()
{
InitializeComponent();
}
public void RunToast(string text)
{
Top = Screen.FromControl(this).WorkingArea.Height - this.Height - 100;
Left = (Screen.FromControl(this).Bounds.Width - this.Width) / 2;
ShowInactiveTopmost(this);
labelMode.Text = text;
timer = new System.Windows.Forms.Timer();
timer.Tick += new EventHandler(timer_Tick);
timer.Enabled = true;
timer.Interval = 1000;
timer.Start();
}
private void ToastForm_Show(object? sender, EventArgs e)
{
}
private void timer_Tick(object sender, EventArgs e)
{
timer.Stop();
Close();
}
}
}

60
ToastForm.resx Normal file
View File

@@ -0,0 +1,60 @@
<root>
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>

BIN
favicon.ico Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 96 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 813 KiB

After

Width:  |  Height:  |  Size: 2.3 MiB