Compare commits
42 Commits
add-licens
...
v0.30
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
845b182b55 | ||
|
|
b7cfd04560 | ||
|
|
6ffd464ec4 | ||
|
|
e7dd3ce203 | ||
|
|
d06dae9015 | ||
|
|
1b208e1a74 | ||
|
|
6befab190b | ||
|
|
5d3eaa0055 | ||
|
|
667f1a997c | ||
|
|
4542221a58 | ||
|
|
5fd7b74519 | ||
|
|
014ee635d6 | ||
|
|
1dff60d574 | ||
|
|
7395f0be69 | ||
|
|
e3019a313a | ||
|
|
9653b81cd3 | ||
|
|
9713cb6fa4 | ||
|
|
10053eda10 | ||
|
|
ef1bbc1fce | ||
|
|
3fde8c1fa9 | ||
|
|
efd6707e61 | ||
|
|
8032ea3fc7 | ||
|
|
d0a232d888 | ||
|
|
a6bd18f019 | ||
|
|
a09c252c2e | ||
|
|
99d3c61897 | ||
|
|
4a6decb0be | ||
|
|
80b9fdb8ac | ||
|
|
e3c293942c | ||
|
|
42e910e635 | ||
|
|
18b6ae07b2 | ||
|
|
fa2875fbee | ||
|
|
f2bfb24fb4 | ||
|
|
adc81721ac | ||
|
|
9da061d621 | ||
|
|
274c04bf61 | ||
|
|
2d286ca04f | ||
|
|
2c1fa01863 | ||
|
|
0370ef7bc0 | ||
|
|
2f2ef23ee4 | ||
|
|
756ed44741 | ||
|
|
efb6a087b4 |
128
.github/CODE_OF_CONDUCT.md
vendored
Normal file
@@ -0,0 +1,128 @@
|
|||||||
|
# Contributor Covenant Code of Conduct
|
||||||
|
|
||||||
|
## Our Pledge
|
||||||
|
|
||||||
|
We as members, contributors, and leaders pledge to make participation in our
|
||||||
|
community a harassment-free experience for everyone, regardless of age, body
|
||||||
|
size, visible or invisible disability, ethnicity, sex characteristics, gender
|
||||||
|
identity and expression, level of experience, education, socio-economic status,
|
||||||
|
nationality, personal appearance, race, religion, or sexual identity
|
||||||
|
and orientation.
|
||||||
|
|
||||||
|
We pledge to act and interact in ways that contribute to an open, welcoming,
|
||||||
|
diverse, inclusive, and healthy community.
|
||||||
|
|
||||||
|
## Our Standards
|
||||||
|
|
||||||
|
Examples of behavior that contributes to a positive environment for our
|
||||||
|
community include:
|
||||||
|
|
||||||
|
* Demonstrating empathy and kindness toward other people
|
||||||
|
* Being respectful of differing opinions, viewpoints, and experiences
|
||||||
|
* Giving and gracefully accepting constructive feedback
|
||||||
|
* Accepting responsibility and apologizing to those affected by our mistakes,
|
||||||
|
and learning from the experience
|
||||||
|
* Focusing on what is best not just for us as individuals, but for the
|
||||||
|
overall community
|
||||||
|
|
||||||
|
Examples of unacceptable behavior include:
|
||||||
|
|
||||||
|
* The use of sexualized language or imagery, and sexual attention or
|
||||||
|
advances of any kind
|
||||||
|
* Trolling, insulting or derogatory comments, and personal or political attacks
|
||||||
|
* Public or private harassment
|
||||||
|
* Publishing others' private information, such as a physical or email
|
||||||
|
address, without their explicit permission
|
||||||
|
* Other conduct which could reasonably be considered inappropriate in a
|
||||||
|
professional setting
|
||||||
|
|
||||||
|
## Enforcement Responsibilities
|
||||||
|
|
||||||
|
Community leaders are responsible for clarifying and enforcing our standards of
|
||||||
|
acceptable behavior and will take appropriate and fair corrective action in
|
||||||
|
response to any behavior that they deem inappropriate, threatening, offensive,
|
||||||
|
or harmful.
|
||||||
|
|
||||||
|
Community leaders have the right and responsibility to remove, edit, or reject
|
||||||
|
comments, commits, code, wiki edits, issues, and other contributions that are
|
||||||
|
not aligned to this Code of Conduct, and will communicate reasons for moderation
|
||||||
|
decisions when appropriate.
|
||||||
|
|
||||||
|
## Scope
|
||||||
|
|
||||||
|
This Code of Conduct applies within all community spaces, and also applies when
|
||||||
|
an individual is officially representing the community in public spaces.
|
||||||
|
Examples of representing our community include using an official e-mail address,
|
||||||
|
posting via an official social media account, or acting as an appointed
|
||||||
|
representative at an online or offline event.
|
||||||
|
|
||||||
|
## Enforcement
|
||||||
|
|
||||||
|
Instances of abusive, harassing, or otherwise unacceptable behavior may be
|
||||||
|
reported to the community leaders responsible for enforcement at
|
||||||
|
.
|
||||||
|
All complaints will be reviewed and investigated promptly and fairly.
|
||||||
|
|
||||||
|
All community leaders are obligated to respect the privacy and security of the
|
||||||
|
reporter of any incident.
|
||||||
|
|
||||||
|
## Enforcement Guidelines
|
||||||
|
|
||||||
|
Community leaders will follow these Community Impact Guidelines in determining
|
||||||
|
the consequences for any action they deem in violation of this Code of Conduct:
|
||||||
|
|
||||||
|
### 1. Correction
|
||||||
|
|
||||||
|
**Community Impact**: Use of inappropriate language or other behavior deemed
|
||||||
|
unprofessional or unwelcome in the community.
|
||||||
|
|
||||||
|
**Consequence**: A private, written warning from community leaders, providing
|
||||||
|
clarity around the nature of the violation and an explanation of why the
|
||||||
|
behavior was inappropriate. A public apology may be requested.
|
||||||
|
|
||||||
|
### 2. Warning
|
||||||
|
|
||||||
|
**Community Impact**: A violation through a single incident or series
|
||||||
|
of actions.
|
||||||
|
|
||||||
|
**Consequence**: A warning with consequences for continued behavior. No
|
||||||
|
interaction with the people involved, including unsolicited interaction with
|
||||||
|
those enforcing the Code of Conduct, for a specified period of time. This
|
||||||
|
includes avoiding interactions in community spaces as well as external channels
|
||||||
|
like social media. Violating these terms may lead to a temporary or
|
||||||
|
permanent ban.
|
||||||
|
|
||||||
|
### 3. Temporary Ban
|
||||||
|
|
||||||
|
**Community Impact**: A serious violation of community standards, including
|
||||||
|
sustained inappropriate behavior.
|
||||||
|
|
||||||
|
**Consequence**: A temporary ban from any sort of interaction or public
|
||||||
|
communication with the community for a specified period of time. No public or
|
||||||
|
private interaction with the people involved, including unsolicited interaction
|
||||||
|
with those enforcing the Code of Conduct, is allowed during this period.
|
||||||
|
Violating these terms may lead to a permanent ban.
|
||||||
|
|
||||||
|
### 4. Permanent Ban
|
||||||
|
|
||||||
|
**Community Impact**: Demonstrating a pattern of violation of community
|
||||||
|
standards, including sustained inappropriate behavior, harassment of an
|
||||||
|
individual, or aggression toward or disparagement of classes of individuals.
|
||||||
|
|
||||||
|
**Consequence**: A permanent ban from any sort of public interaction within
|
||||||
|
the community.
|
||||||
|
|
||||||
|
## Attribution
|
||||||
|
|
||||||
|
This Code of Conduct is adapted from the [Contributor Covenant][homepage],
|
||||||
|
version 2.0, available at
|
||||||
|
https://www.contributor-covenant.org/version/2/0/code_of_conduct.html.
|
||||||
|
|
||||||
|
Community Impact Guidelines were inspired by [Mozilla's code of conduct
|
||||||
|
enforcement ladder](https://github.com/mozilla/diversity).
|
||||||
|
|
||||||
|
[homepage]: https://www.contributor-covenant.org
|
||||||
|
|
||||||
|
For answers to common questions about this code of conduct, see the FAQ at
|
||||||
|
https://www.contributor-covenant.org/faq. Translations are available at
|
||||||
|
https://www.contributor-covenant.org/translations.
|
||||||
1
.github/CONTRIBUTING.md
vendored
Normal file
@@ -0,0 +1 @@
|
|||||||
|
Please, feel free to contribute. Especially if you own model differnt from G14 2022 and can offer extra features or support.
|
||||||
38
.github/ISSUE_TEMPLATE/bug_report.md
vendored
Normal file
@@ -0,0 +1,38 @@
|
|||||||
|
---
|
||||||
|
name: Bug report
|
||||||
|
about: Create a report to help us improve
|
||||||
|
title: ''
|
||||||
|
labels: ''
|
||||||
|
assignees: ''
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
**Describe the bug**
|
||||||
|
A clear and concise description of what the bug is.
|
||||||
|
|
||||||
|
**To Reproduce**
|
||||||
|
Steps to reproduce the behavior:
|
||||||
|
1. Go to '...'
|
||||||
|
2. Click on '....'
|
||||||
|
3. Scroll down to '....'
|
||||||
|
4. See error
|
||||||
|
|
||||||
|
**Expected behavior**
|
||||||
|
A clear and concise description of what you expected to happen.
|
||||||
|
|
||||||
|
**Screenshots**
|
||||||
|
If applicable, add screenshots to help explain your problem.
|
||||||
|
|
||||||
|
**Desktop (please complete the following information):**
|
||||||
|
- OS: [e.g. iOS]
|
||||||
|
- Browser [e.g. chrome, safari]
|
||||||
|
- Version [e.g. 22]
|
||||||
|
|
||||||
|
**Smartphone (please complete the following information):**
|
||||||
|
- Device: [e.g. iPhone6]
|
||||||
|
- OS: [e.g. iOS8.1]
|
||||||
|
- Browser [e.g. stock browser, safari]
|
||||||
|
- Version [e.g. 22]
|
||||||
|
|
||||||
|
**Additional context**
|
||||||
|
Add any other context about the problem here.
|
||||||
10
.github/ISSUE_TEMPLATE/custom.md
vendored
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
---
|
||||||
|
name: Custom issue template
|
||||||
|
about: Describe this issue template's purpose here.
|
||||||
|
title: ''
|
||||||
|
labels: ''
|
||||||
|
assignees: ''
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
|
||||||
20
.github/ISSUE_TEMPLATE/feature_request.md
vendored
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
---
|
||||||
|
name: Feature request
|
||||||
|
about: Suggest an idea for this project
|
||||||
|
title: ''
|
||||||
|
labels: ''
|
||||||
|
assignees: ''
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
**Is your feature request related to a problem? Please describe.**
|
||||||
|
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
|
||||||
|
|
||||||
|
**Describe the solution you'd like**
|
||||||
|
A clear and concise description of what you want to happen.
|
||||||
|
|
||||||
|
**Describe alternatives you've considered**
|
||||||
|
A clear and concise description of any alternative solutions or features you've considered.
|
||||||
|
|
||||||
|
**Additional context**
|
||||||
|
Add any other context or screenshots about the feature request here.
|
||||||
16
.github/SECURITY.md
vendored
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
# Security Policy
|
||||||
|
|
||||||
|
## Supported Versions
|
||||||
|
|
||||||
|
| Version | Supported |
|
||||||
|
| ------- | ------------------ |
|
||||||
|
| 0.25+ | :white_check_mark: |
|
||||||
|
| < 0.24 | :x: |
|
||||||
|
|
||||||
|
## Reporting a Vulnerability
|
||||||
|
|
||||||
|
Use this section to tell people how to report a vulnerability.
|
||||||
|
|
||||||
|
Tell them where to go, how often they can expect to get an update on a
|
||||||
|
reported vulnerability, what to expect if the vulnerability is accepted or
|
||||||
|
declined, etc.
|
||||||
@@ -1,8 +0,0 @@
|
|||||||
{
|
|
||||||
"profiles": {
|
|
||||||
"GHelper": {
|
|
||||||
"commandName": "Project",
|
|
||||||
"workingDirectory": "C:\\Users\\serge\\source\\GHelper"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,9 +1,6 @@
|
|||||||
using GHelper;
|
using System.Management;
|
||||||
using System.Diagnostics;
|
|
||||||
using System.Management;
|
|
||||||
using System.Runtime.InteropServices;
|
using System.Runtime.InteropServices;
|
||||||
|
|
||||||
|
|
||||||
public class ASUSWmi
|
public class ASUSWmi
|
||||||
{
|
{
|
||||||
|
|
||||||
@@ -187,7 +184,7 @@ public class ASUSWmi
|
|||||||
if (curve.Length != 16) return;
|
if (curve.Length != 16) return;
|
||||||
if (curve.All(singleByte => singleByte == 0)) return;
|
if (curve.All(singleByte => singleByte == 0)) return;
|
||||||
|
|
||||||
Logger.WriteLine("Fans" + ((device == 1)?"GPU":"CPU") + " " + BitConverter.ToString(curve));
|
Logger.WriteLine("Fans" + ((device == 1) ? "GPU" : "CPU") + " " + BitConverter.ToString(curve));
|
||||||
|
|
||||||
if (device == 1)
|
if (device == 1)
|
||||||
DeviceSet(DevsGPUFanCurve, curve);
|
DeviceSet(DevsGPUFanCurve, curve);
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
<?xml version="1.0" encoding="utf-8" ?>
|
<?xml version="1.0" encoding="utf-8" ?>
|
||||||
<configuration>
|
<configuration>
|
||||||
<System.Windows.Forms.ApplicationConfigurationSection>
|
<System.Windows.Forms.ApplicationConfigurationSection>
|
||||||
<add key="DpiAwareness" value="PerMonitorV2" />
|
<add key="DpiAwareness" value="System" />
|
||||||
</System.Windows.Forms.ApplicationConfigurationSection>
|
</System.Windows.Forms.ApplicationConfigurationSection>
|
||||||
<appSettings>
|
<appSettings>
|
||||||
<add key="EnableWindowsFormsHighDpiAutoResizing" value="true" />
|
<add key="EnableWindowsFormsHighDpiAutoResizing" value="true" />
|
||||||
@@ -43,7 +43,7 @@ public class Aura
|
|||||||
{
|
{
|
||||||
|
|
||||||
HidDevice[] HidDeviceList;
|
HidDevice[] HidDeviceList;
|
||||||
int[] deviceIds = { 0x1854, 0x1869, 0x1866, 0x19b6 };
|
int[] deviceIds = { 0x1854, 0x1869, 0x1866, 0x19b6, 0x1822, 0x1837, 0x1854, 0x184a, 0x183d, 0x8502, 0x1807, 0x17e0 };
|
||||||
|
|
||||||
HidDeviceList = HidDevices.Enumerate(0x0b05, deviceIds).ToArray();
|
HidDeviceList = HidDevices.Enumerate(0x0b05, deviceIds).ToArray();
|
||||||
|
|
||||||
@@ -63,18 +63,14 @@ public class Aura
|
|||||||
|
|
||||||
foreach (HidDevice device in HidDeviceList)
|
foreach (HidDevice device in HidDeviceList)
|
||||||
{
|
{
|
||||||
if (device.IsConnected)
|
if (device.IsConnected && device.Description.Contains("HID"))
|
||||||
{
|
{
|
||||||
if (device.Description.IndexOf("HID") >= 0)
|
device.OpenDevice();
|
||||||
{
|
byte[] msg = AuraMessage(Mode, Color1, Color2, Speed);
|
||||||
device.OpenDevice();
|
device.Write(msg);
|
||||||
byte[] msg = AuraMessage(Mode, Color1, Color2, Speed);
|
device.Write(MESSAGE_SET);
|
||||||
device.Write(msg);
|
device.Write(MESSAGE_APPLY);
|
||||||
device.Write(MESSAGE_SET);
|
device.CloseDevice();
|
||||||
device.Write(MESSAGE_APPLY);
|
|
||||||
device.CloseDevice();
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
0
Fans.Designer.cs → app/Fans.Designer.cs
generated
@@ -16,7 +16,7 @@
|
|||||||
<PlatformTarget>x64</PlatformTarget>
|
<PlatformTarget>x64</PlatformTarget>
|
||||||
<ProduceReferenceAssembly>False</ProduceReferenceAssembly>
|
<ProduceReferenceAssembly>False</ProduceReferenceAssembly>
|
||||||
<AllowUnsafeBlocks>True</AllowUnsafeBlocks>
|
<AllowUnsafeBlocks>True</AllowUnsafeBlocks>
|
||||||
<AssemblyVersion>0.28</AssemblyVersion>
|
<AssemblyVersion>0.29</AssemblyVersion>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
@@ -32,7 +32,7 @@
|
|||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Content Include="favicon.ico">
|
<Content Include="favicon.ico">
|
||||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
<CopyToOutputDirectory>Never</CopyToOutputDirectory>
|
||||||
</Content>
|
</Content>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
39
app/Logger.cs
Normal file
@@ -0,0 +1,39 @@
|
|||||||
|
using System.Diagnostics;
|
||||||
|
|
||||||
|
public static class Logger
|
||||||
|
{
|
||||||
|
static string appPath = Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) + "\\GHelper";
|
||||||
|
static string logFile = appPath + "\\log.txt";
|
||||||
|
|
||||||
|
public static void WriteLine(string logMessage)
|
||||||
|
{
|
||||||
|
Debug.WriteLine(logMessage);
|
||||||
|
if (!Directory.Exists(appPath)) Directory.CreateDirectory(appPath);
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
using (StreamWriter w = File.AppendText(logFile))
|
||||||
|
{
|
||||||
|
w.WriteLine($"{DateTime.Now}: {logMessage}");
|
||||||
|
w.Close();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch { }
|
||||||
|
|
||||||
|
if (new Random().Next(100) == 1) Cleanup();
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void Cleanup()
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
var file = File.ReadAllLines(logFile);
|
||||||
|
int skip = Math.Max(0, file.Count() - 500);
|
||||||
|
File.WriteAllLines(logFile, file.Skip(skip).ToArray());
|
||||||
|
}
|
||||||
|
catch { }
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -1,10 +1,7 @@
|
|||||||
using System.Collections;
|
using System.ComponentModel;
|
||||||
using System;
|
|
||||||
using System.ComponentModel;
|
|
||||||
using System.Diagnostics;
|
using System.Diagnostics;
|
||||||
using System.Runtime.InteropServices;
|
using System.Runtime.InteropServices;
|
||||||
using static Tools.ScreenInterrogatory;
|
using static Tools.ScreenInterrogatory;
|
||||||
using System.Windows.Forms;
|
|
||||||
|
|
||||||
namespace Tools
|
namespace Tools
|
||||||
{
|
{
|
||||||
@@ -2,43 +2,7 @@ using Microsoft.Win32;
|
|||||||
using System.Diagnostics;
|
using System.Diagnostics;
|
||||||
using System.Management;
|
using System.Management;
|
||||||
using System.Reflection;
|
using System.Reflection;
|
||||||
using System.Runtime.InteropServices;
|
|
||||||
using System.Text.Json;
|
using System.Text.Json;
|
||||||
public static class Logger
|
|
||||||
{
|
|
||||||
static string appPath = Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) + "\\GHelper";
|
|
||||||
static string logFile = appPath + "\\log.txt";
|
|
||||||
|
|
||||||
public static void WriteLine(string logMessage)
|
|
||||||
{
|
|
||||||
Debug.WriteLine(logMessage);
|
|
||||||
if (!Directory.Exists(appPath)) Directory.CreateDirectory(appPath);
|
|
||||||
|
|
||||||
try
|
|
||||||
{
|
|
||||||
using (StreamWriter w = File.AppendText(logFile))
|
|
||||||
{
|
|
||||||
w.WriteLine($"{DateTime.Now}: {logMessage}");
|
|
||||||
w.Close();
|
|
||||||
}
|
|
||||||
} catch { }
|
|
||||||
|
|
||||||
if (new Random().Next(100) == 1) Cleanup();
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
public static void Cleanup()
|
|
||||||
{
|
|
||||||
try
|
|
||||||
{
|
|
||||||
var file = File.ReadAllLines(logFile);
|
|
||||||
int skip = Math.Max(0, file.Count() - 500);
|
|
||||||
File.WriteAllLines(logFile, file.Skip(skip).ToArray());
|
|
||||||
} catch { }
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
namespace GHelper
|
namespace GHelper
|
||||||
{
|
{
|
||||||
7
app/Properties/launchSettings.json
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
{
|
||||||
|
"profiles": {
|
||||||
|
"GHelper": {
|
||||||
|
"commandName": "Project"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
Before Width: | Height: | Size: 9.4 KiB After Width: | Height: | Size: 9.4 KiB |
|
Before Width: | Height: | Size: 220 KiB After Width: | Height: | Size: 220 KiB |
|
Before Width: | Height: | Size: 421 B After Width: | Height: | Size: 421 B |
|
Before Width: | Height: | Size: 1.8 KiB After Width: | Height: | Size: 1.8 KiB |
|
Before Width: | Height: | Size: 515 B After Width: | Height: | Size: 515 B |
|
Before Width: | Height: | Size: 260 B After Width: | Height: | Size: 260 B |
|
Before Width: | Height: | Size: 428 B After Width: | Height: | Size: 428 B |
|
Before Width: | Height: | Size: 710 B After Width: | Height: | Size: 710 B |
|
Before Width: | Height: | Size: 885 B After Width: | Height: | Size: 885 B |
|
Before Width: | Height: | Size: 1.7 KiB After Width: | Height: | Size: 1.7 KiB |
|
Before Width: | Height: | Size: 400 B After Width: | Height: | Size: 400 B |
|
Before Width: | Height: | Size: 9.4 KiB After Width: | Height: | Size: 9.4 KiB |
|
Before Width: | Height: | Size: 9.4 KiB After Width: | Height: | Size: 9.4 KiB |
78
app/RoundedButton.cs
Normal file
@@ -0,0 +1,78 @@
|
|||||||
|
using System.ComponentModel;
|
||||||
|
using System.Drawing.Drawing2D;
|
||||||
|
|
||||||
|
namespace CustomControls
|
||||||
|
{
|
||||||
|
public class RoundedButton : Button
|
||||||
|
{
|
||||||
|
//Fields
|
||||||
|
private int borderSize = 5;
|
||||||
|
private int borderRadius = 5;
|
||||||
|
private bool activated = false;
|
||||||
|
private Color borderColor = Color.Transparent;
|
||||||
|
|
||||||
|
public Color BorderColor
|
||||||
|
{
|
||||||
|
get { return borderColor; }
|
||||||
|
set
|
||||||
|
{
|
||||||
|
borderColor = value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public bool Activated
|
||||||
|
{
|
||||||
|
get { return activated; }
|
||||||
|
set
|
||||||
|
{
|
||||||
|
if (activated != value)
|
||||||
|
this.Invalidate();
|
||||||
|
activated = value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public RoundedButton()
|
||||||
|
{
|
||||||
|
this.FlatStyle = FlatStyle.Flat;
|
||||||
|
this.FlatAppearance.BorderSize = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
private GraphicsPath GetFigurePath(Rectangle rect, int radius)
|
||||||
|
{
|
||||||
|
GraphicsPath path = new GraphicsPath();
|
||||||
|
float curveSize = radius * 2F;
|
||||||
|
|
||||||
|
path.StartFigure();
|
||||||
|
path.AddArc(rect.X, rect.Y, curveSize, curveSize, 180, 90);
|
||||||
|
path.AddArc(rect.Right - curveSize, rect.Y, curveSize, curveSize, 270, 90);
|
||||||
|
path.AddArc(rect.Right - curveSize, rect.Bottom - curveSize, curveSize, curveSize, 0, 90);
|
||||||
|
path.AddArc(rect.X, rect.Bottom - curveSize, curveSize, curveSize, 90, 90);
|
||||||
|
path.CloseFigure();
|
||||||
|
return path;
|
||||||
|
}
|
||||||
|
|
||||||
|
protected override void OnPaint(PaintEventArgs pevent)
|
||||||
|
{
|
||||||
|
base.OnPaint(pevent);
|
||||||
|
|
||||||
|
Rectangle rectSurface = this.ClientRectangle;
|
||||||
|
Rectangle rectBorder = Rectangle.Inflate(rectSurface, -borderSize, -borderSize);
|
||||||
|
|
||||||
|
Color borderDrawColor = activated ? borderColor : Color.Transparent;
|
||||||
|
|
||||||
|
using (GraphicsPath pathSurface = GetFigurePath(rectSurface, borderRadius+borderSize))
|
||||||
|
using (GraphicsPath pathBorder = GetFigurePath(rectBorder, borderRadius))
|
||||||
|
using (Pen penSurface = new Pen(this.Parent.BackColor, borderSize))
|
||||||
|
using (Pen penBorder = new Pen(borderDrawColor, borderSize))
|
||||||
|
{
|
||||||
|
penBorder.Alignment = PenAlignment.Outset;
|
||||||
|
pevent.Graphics.SmoothingMode = SmoothingMode.AntiAlias;
|
||||||
|
this.Region = new Region(pathSurface);
|
||||||
|
pevent.Graphics.DrawPath(penSurface, pathSurface);
|
||||||
|
pevent.Graphics.DrawPath(penBorder, pathBorder);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
65
Settings.Designer.cs → app/Settings.Designer.cs
generated
@@ -1,4 +1,6 @@
|
|||||||
namespace GHelper
|
using CustomControls;
|
||||||
|
|
||||||
|
namespace GHelper
|
||||||
{
|
{
|
||||||
partial class SettingsForm
|
partial class SettingsForm
|
||||||
{
|
{
|
||||||
@@ -52,23 +54,23 @@
|
|||||||
labelPerf = new Label();
|
labelPerf = new Label();
|
||||||
labelCPUFan = new Label();
|
labelCPUFan = new Label();
|
||||||
tablePerf = new TableLayoutPanel();
|
tablePerf = new TableLayoutPanel();
|
||||||
buttonTurbo = new Button();
|
buttonTurbo = new RoundedButton();
|
||||||
buttonBalanced = new Button();
|
buttonBalanced = new RoundedButton();
|
||||||
buttonSilent = new Button();
|
buttonSilent = new RoundedButton();
|
||||||
panelGPU = new Panel();
|
panelGPU = new Panel();
|
||||||
checkGPU = new CheckBox();
|
checkGPU = new CheckBox();
|
||||||
pictureGPU = new PictureBox();
|
pictureGPU = new PictureBox();
|
||||||
labelGPU = new Label();
|
labelGPU = new Label();
|
||||||
labelGPUFan = new Label();
|
labelGPUFan = new Label();
|
||||||
tableGPU = new TableLayoutPanel();
|
tableGPU = new TableLayoutPanel();
|
||||||
buttonUltimate = new Button();
|
buttonUltimate = new RoundedButton();
|
||||||
buttonStandard = new Button();
|
buttonStandard = new RoundedButton();
|
||||||
buttonEco = new Button();
|
buttonEco = new RoundedButton();
|
||||||
panelScreen = new Panel();
|
panelScreen = new Panel();
|
||||||
checkScreen = new CheckBox();
|
checkScreen = new CheckBox();
|
||||||
tableScreen = new TableLayoutPanel();
|
tableScreen = new TableLayoutPanel();
|
||||||
button120Hz = new Button();
|
button120Hz = new RoundedButton();
|
||||||
button60Hz = new Button();
|
button60Hz = new RoundedButton();
|
||||||
pictureScreen = new PictureBox();
|
pictureScreen = new PictureBox();
|
||||||
labelSreen = new Label();
|
labelSreen = new Label();
|
||||||
panelKeyboard = new Panel();
|
panelKeyboard = new Panel();
|
||||||
@@ -402,11 +404,14 @@
|
|||||||
//
|
//
|
||||||
// buttonTurbo
|
// buttonTurbo
|
||||||
//
|
//
|
||||||
|
buttonTurbo.Activated = false;
|
||||||
buttonTurbo.BackColor = SystemColors.ControlLightLight;
|
buttonTurbo.BackColor = SystemColors.ControlLightLight;
|
||||||
|
buttonTurbo.BorderColor = Color.Transparent;
|
||||||
buttonTurbo.Dock = DockStyle.Fill;
|
buttonTurbo.Dock = DockStyle.Fill;
|
||||||
buttonTurbo.FlatAppearance.BorderColor = Color.FromArgb(192, 0, 0);
|
buttonTurbo.FlatAppearance.BorderColor = Color.FromArgb(192, 0, 0);
|
||||||
buttonTurbo.FlatAppearance.BorderSize = 0;
|
buttonTurbo.FlatAppearance.BorderSize = 0;
|
||||||
buttonTurbo.FlatStyle = FlatStyle.Flat;
|
buttonTurbo.FlatStyle = FlatStyle.Flat;
|
||||||
|
buttonTurbo.ForeColor = SystemColors.ControlText;
|
||||||
buttonTurbo.Location = new Point(464, 12);
|
buttonTurbo.Location = new Point(464, 12);
|
||||||
buttonTurbo.Margin = new Padding(8, 12, 8, 12);
|
buttonTurbo.Margin = new Padding(8, 12, 8, 12);
|
||||||
buttonTurbo.Name = "buttonTurbo";
|
buttonTurbo.Name = "buttonTurbo";
|
||||||
@@ -417,11 +422,14 @@
|
|||||||
//
|
//
|
||||||
// buttonBalanced
|
// buttonBalanced
|
||||||
//
|
//
|
||||||
|
buttonBalanced.Activated = false;
|
||||||
buttonBalanced.BackColor = SystemColors.ControlLightLight;
|
buttonBalanced.BackColor = SystemColors.ControlLightLight;
|
||||||
|
buttonBalanced.BorderColor = Color.Transparent;
|
||||||
buttonBalanced.Dock = DockStyle.Fill;
|
buttonBalanced.Dock = DockStyle.Fill;
|
||||||
buttonBalanced.FlatAppearance.BorderColor = Color.FromArgb(0, 0, 192);
|
buttonBalanced.FlatAppearance.BorderColor = Color.FromArgb(0, 0, 192);
|
||||||
buttonBalanced.FlatAppearance.BorderSize = 0;
|
buttonBalanced.FlatAppearance.BorderSize = 0;
|
||||||
buttonBalanced.FlatStyle = FlatStyle.Flat;
|
buttonBalanced.FlatStyle = FlatStyle.Flat;
|
||||||
|
buttonBalanced.ForeColor = SystemColors.ControlText;
|
||||||
buttonBalanced.Location = new Point(236, 12);
|
buttonBalanced.Location = new Point(236, 12);
|
||||||
buttonBalanced.Margin = new Padding(8, 12, 8, 12);
|
buttonBalanced.Margin = new Padding(8, 12, 8, 12);
|
||||||
buttonBalanced.Name = "buttonBalanced";
|
buttonBalanced.Name = "buttonBalanced";
|
||||||
@@ -432,12 +440,15 @@
|
|||||||
//
|
//
|
||||||
// buttonSilent
|
// buttonSilent
|
||||||
//
|
//
|
||||||
|
buttonSilent.Activated = false;
|
||||||
buttonSilent.BackColor = SystemColors.ControlLightLight;
|
buttonSilent.BackColor = SystemColors.ControlLightLight;
|
||||||
|
buttonSilent.BorderColor = Color.Transparent;
|
||||||
buttonSilent.CausesValidation = false;
|
buttonSilent.CausesValidation = false;
|
||||||
buttonSilent.Dock = DockStyle.Fill;
|
buttonSilent.Dock = DockStyle.Fill;
|
||||||
buttonSilent.FlatAppearance.BorderColor = Color.FromArgb(0, 192, 192);
|
buttonSilent.FlatAppearance.BorderColor = Color.FromArgb(0, 192, 192);
|
||||||
buttonSilent.FlatAppearance.BorderSize = 0;
|
buttonSilent.FlatAppearance.BorderSize = 0;
|
||||||
buttonSilent.FlatStyle = FlatStyle.Flat;
|
buttonSilent.FlatStyle = FlatStyle.Flat;
|
||||||
|
buttonSilent.ForeColor = SystemColors.ControlText;
|
||||||
buttonSilent.Location = new Point(8, 12);
|
buttonSilent.Location = new Point(8, 12);
|
||||||
buttonSilent.Margin = new Padding(8, 12, 8, 12);
|
buttonSilent.Margin = new Padding(8, 12, 8, 12);
|
||||||
buttonSilent.Name = "buttonSilent";
|
buttonSilent.Name = "buttonSilent";
|
||||||
@@ -527,10 +538,13 @@
|
|||||||
//
|
//
|
||||||
// buttonUltimate
|
// buttonUltimate
|
||||||
//
|
//
|
||||||
|
buttonUltimate.Activated = false;
|
||||||
buttonUltimate.BackColor = SystemColors.ControlLightLight;
|
buttonUltimate.BackColor = SystemColors.ControlLightLight;
|
||||||
|
buttonUltimate.BorderColor = Color.Transparent;
|
||||||
buttonUltimate.Dock = DockStyle.Fill;
|
buttonUltimate.Dock = DockStyle.Fill;
|
||||||
buttonUltimate.FlatAppearance.BorderSize = 0;
|
buttonUltimate.FlatAppearance.BorderSize = 0;
|
||||||
buttonUltimate.FlatStyle = FlatStyle.Flat;
|
buttonUltimate.FlatStyle = FlatStyle.Flat;
|
||||||
|
buttonUltimate.ForeColor = SystemColors.ControlText;
|
||||||
buttonUltimate.Location = new Point(464, 12);
|
buttonUltimate.Location = new Point(464, 12);
|
||||||
buttonUltimate.Margin = new Padding(8, 12, 8, 12);
|
buttonUltimate.Margin = new Padding(8, 12, 8, 12);
|
||||||
buttonUltimate.Name = "buttonUltimate";
|
buttonUltimate.Name = "buttonUltimate";
|
||||||
@@ -541,10 +555,13 @@
|
|||||||
//
|
//
|
||||||
// buttonStandard
|
// buttonStandard
|
||||||
//
|
//
|
||||||
|
buttonStandard.Activated = false;
|
||||||
buttonStandard.BackColor = SystemColors.ControlLightLight;
|
buttonStandard.BackColor = SystemColors.ControlLightLight;
|
||||||
|
buttonStandard.BorderColor = Color.Transparent;
|
||||||
buttonStandard.Dock = DockStyle.Fill;
|
buttonStandard.Dock = DockStyle.Fill;
|
||||||
buttonStandard.FlatAppearance.BorderSize = 0;
|
buttonStandard.FlatAppearance.BorderSize = 0;
|
||||||
buttonStandard.FlatStyle = FlatStyle.Flat;
|
buttonStandard.FlatStyle = FlatStyle.Flat;
|
||||||
|
buttonStandard.ForeColor = SystemColors.ControlText;
|
||||||
buttonStandard.Location = new Point(236, 12);
|
buttonStandard.Location = new Point(236, 12);
|
||||||
buttonStandard.Margin = new Padding(8, 12, 8, 12);
|
buttonStandard.Margin = new Padding(8, 12, 8, 12);
|
||||||
buttonStandard.Name = "buttonStandard";
|
buttonStandard.Name = "buttonStandard";
|
||||||
@@ -555,11 +572,14 @@
|
|||||||
//
|
//
|
||||||
// buttonEco
|
// buttonEco
|
||||||
//
|
//
|
||||||
|
buttonEco.Activated = false;
|
||||||
buttonEco.BackColor = SystemColors.ControlLightLight;
|
buttonEco.BackColor = SystemColors.ControlLightLight;
|
||||||
|
buttonEco.BorderColor = Color.Transparent;
|
||||||
buttonEco.CausesValidation = false;
|
buttonEco.CausesValidation = false;
|
||||||
buttonEco.Dock = DockStyle.Fill;
|
buttonEco.Dock = DockStyle.Fill;
|
||||||
buttonEco.FlatAppearance.BorderSize = 0;
|
buttonEco.FlatAppearance.BorderSize = 0;
|
||||||
buttonEco.FlatStyle = FlatStyle.Flat;
|
buttonEco.FlatStyle = FlatStyle.Flat;
|
||||||
|
buttonEco.ForeColor = SystemColors.ControlText;
|
||||||
buttonEco.Location = new Point(8, 12);
|
buttonEco.Location = new Point(8, 12);
|
||||||
buttonEco.Margin = new Padding(8, 12, 8, 12);
|
buttonEco.Margin = new Padding(8, 12, 8, 12);
|
||||||
buttonEco.Name = "buttonEco";
|
buttonEco.Name = "buttonEco";
|
||||||
@@ -614,11 +634,13 @@
|
|||||||
//
|
//
|
||||||
// button120Hz
|
// button120Hz
|
||||||
//
|
//
|
||||||
|
button120Hz.Activated = false;
|
||||||
button120Hz.BackColor = SystemColors.ControlLightLight;
|
button120Hz.BackColor = SystemColors.ControlLightLight;
|
||||||
|
button120Hz.BorderColor = Color.Transparent;
|
||||||
button120Hz.Dock = DockStyle.Fill;
|
button120Hz.Dock = DockStyle.Fill;
|
||||||
button120Hz.FlatAppearance.BorderColor = SystemColors.ActiveBorder;
|
|
||||||
button120Hz.FlatAppearance.BorderSize = 0;
|
button120Hz.FlatAppearance.BorderSize = 0;
|
||||||
button120Hz.FlatStyle = FlatStyle.Flat;
|
button120Hz.FlatStyle = FlatStyle.Flat;
|
||||||
|
button120Hz.ForeColor = SystemColors.ControlText;
|
||||||
button120Hz.Location = new Point(236, 12);
|
button120Hz.Location = new Point(236, 12);
|
||||||
button120Hz.Margin = new Padding(8, 12, 8, 12);
|
button120Hz.Margin = new Padding(8, 12, 8, 12);
|
||||||
button120Hz.Name = "button120Hz";
|
button120Hz.Name = "button120Hz";
|
||||||
@@ -629,10 +651,11 @@
|
|||||||
//
|
//
|
||||||
// button60Hz
|
// button60Hz
|
||||||
//
|
//
|
||||||
|
button60Hz.Activated = false;
|
||||||
button60Hz.BackColor = SystemColors.ControlLightLight;
|
button60Hz.BackColor = SystemColors.ControlLightLight;
|
||||||
|
button60Hz.BorderColor = Color.Transparent;
|
||||||
button60Hz.CausesValidation = false;
|
button60Hz.CausesValidation = false;
|
||||||
button60Hz.Dock = DockStyle.Fill;
|
button60Hz.Dock = DockStyle.Fill;
|
||||||
button60Hz.FlatAppearance.BorderColor = SystemColors.ActiveBorder;
|
|
||||||
button60Hz.FlatAppearance.BorderSize = 0;
|
button60Hz.FlatAppearance.BorderSize = 0;
|
||||||
button60Hz.FlatStyle = FlatStyle.Flat;
|
button60Hz.FlatStyle = FlatStyle.Flat;
|
||||||
button60Hz.ForeColor = SystemColors.ControlText;
|
button60Hz.ForeColor = SystemColors.ControlText;
|
||||||
@@ -774,10 +797,10 @@
|
|||||||
//
|
//
|
||||||
pictureKeyboard.BackgroundImage = Properties.Resources.icons8_keyboard_48;
|
pictureKeyboard.BackgroundImage = Properties.Resources.icons8_keyboard_48;
|
||||||
pictureKeyboard.BackgroundImageLayout = ImageLayout.Zoom;
|
pictureKeyboard.BackgroundImageLayout = ImageLayout.Zoom;
|
||||||
pictureKeyboard.Location = new Point(25, 16);
|
pictureKeyboard.Location = new Point(27, 16);
|
||||||
pictureKeyboard.Margin = new Padding(4, 2, 4, 2);
|
pictureKeyboard.Margin = new Padding(4, 2, 4, 2);
|
||||||
pictureKeyboard.Name = "pictureKeyboard";
|
pictureKeyboard.Name = "pictureKeyboard";
|
||||||
pictureKeyboard.Size = new Size(36, 36);
|
pictureKeyboard.Size = new Size(32, 36);
|
||||||
pictureKeyboard.TabIndex = 33;
|
pictureKeyboard.TabIndex = 33;
|
||||||
pictureKeyboard.TabStop = false;
|
pictureKeyboard.TabStop = false;
|
||||||
//
|
//
|
||||||
@@ -868,23 +891,23 @@
|
|||||||
private Label labelPerf;
|
private Label labelPerf;
|
||||||
private Label labelCPUFan;
|
private Label labelCPUFan;
|
||||||
private TableLayoutPanel tablePerf;
|
private TableLayoutPanel tablePerf;
|
||||||
private Button buttonTurbo;
|
private RoundedButton buttonTurbo;
|
||||||
private Button buttonBalanced;
|
private RoundedButton buttonBalanced;
|
||||||
private Button buttonSilent;
|
private RoundedButton buttonSilent;
|
||||||
private Panel panelGPU;
|
private Panel panelGPU;
|
||||||
private CheckBox checkGPU;
|
private CheckBox checkGPU;
|
||||||
private PictureBox pictureGPU;
|
private PictureBox pictureGPU;
|
||||||
private Label labelGPU;
|
private Label labelGPU;
|
||||||
private Label labelGPUFan;
|
private Label labelGPUFan;
|
||||||
private TableLayoutPanel tableGPU;
|
private TableLayoutPanel tableGPU;
|
||||||
private Button buttonUltimate;
|
private RoundedButton buttonUltimate;
|
||||||
private Button buttonStandard;
|
private RoundedButton buttonStandard;
|
||||||
private Button buttonEco;
|
private RoundedButton buttonEco;
|
||||||
private Panel panelScreen;
|
private Panel panelScreen;
|
||||||
private CheckBox checkScreen;
|
private CheckBox checkScreen;
|
||||||
private TableLayoutPanel tableScreen;
|
private TableLayoutPanel tableScreen;
|
||||||
private Button button120Hz;
|
private RoundedButton button120Hz;
|
||||||
private Button button60Hz;
|
private RoundedButton button60Hz;
|
||||||
private PictureBox pictureScreen;
|
private PictureBox pictureScreen;
|
||||||
private Label labelSreen;
|
private Label labelSreen;
|
||||||
private Panel panelKeyboard;
|
private Panel panelKeyboard;
|
||||||
@@ -14,9 +14,6 @@ namespace GHelper
|
|||||||
static Color colorStandard = Color.FromArgb(255, 58, 174, 239);
|
static Color colorStandard = Color.FromArgb(255, 58, 174, 239);
|
||||||
static Color colorTurbo = Color.FromArgb(255, 255, 32, 32);
|
static Color colorTurbo = Color.FromArgb(255, 255, 32, 32);
|
||||||
|
|
||||||
static int buttonInactive = 0;
|
|
||||||
static int buttonActive = 5;
|
|
||||||
|
|
||||||
static System.Timers.Timer aTimer = default!;
|
static System.Timers.Timer aTimer = default!;
|
||||||
static System.Timers.Timer matrixTimer = default!;
|
static System.Timers.Timer matrixTimer = default!;
|
||||||
|
|
||||||
@@ -36,13 +33,16 @@ namespace GHelper
|
|||||||
|
|
||||||
FormClosing += SettingsForm_FormClosing;
|
FormClosing += SettingsForm_FormClosing;
|
||||||
|
|
||||||
buttonSilent.FlatAppearance.BorderColor = colorEco;
|
buttonSilent.BorderColor = colorEco;
|
||||||
buttonBalanced.FlatAppearance.BorderColor = colorStandard;
|
buttonBalanced.BorderColor = colorStandard;
|
||||||
buttonTurbo.FlatAppearance.BorderColor = colorTurbo;
|
buttonTurbo.BorderColor = colorTurbo;
|
||||||
|
|
||||||
buttonEco.FlatAppearance.BorderColor = colorEco;
|
buttonEco.BorderColor = colorEco;
|
||||||
buttonStandard.FlatAppearance.BorderColor = colorStandard;
|
buttonStandard.BorderColor = colorStandard;
|
||||||
buttonUltimate.FlatAppearance.BorderColor = colorTurbo;
|
buttonUltimate.BorderColor = colorTurbo;
|
||||||
|
|
||||||
|
button60Hz.BorderColor = SystemColors.ActiveBorder;
|
||||||
|
button120Hz.BorderColor = SystemColors.ActiveBorder;
|
||||||
|
|
||||||
buttonSilent.Click += ButtonSilent_Click;
|
buttonSilent.Click += ButtonSilent_Click;
|
||||||
buttonBalanced.Click += ButtonBalanced_Click;
|
buttonBalanced.Click += ButtonBalanced_Click;
|
||||||
@@ -599,12 +599,12 @@ namespace GHelper
|
|||||||
Logger.WriteLine("Screen Overdrive not supported");
|
Logger.WriteLine("Screen Overdrive not supported");
|
||||||
}
|
}
|
||||||
|
|
||||||
button60Hz.FlatAppearance.BorderSize = buttonInactive;
|
button60Hz.Activated = false;
|
||||||
button120Hz.FlatAppearance.BorderSize = buttonInactive;
|
button120Hz.Activated = false;
|
||||||
|
|
||||||
if (frequency == 60)
|
if (frequency == 60)
|
||||||
{
|
{
|
||||||
button60Hz.FlatAppearance.BorderSize = buttonActive;
|
button60Hz.Activated = true;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -612,7 +612,7 @@ namespace GHelper
|
|||||||
maxFrequency = frequency;
|
maxFrequency = frequency;
|
||||||
|
|
||||||
Program.config.setConfig("max_frequency", maxFrequency);
|
Program.config.setConfig("max_frequency", maxFrequency);
|
||||||
button120Hz.FlatAppearance.BorderSize = buttonActive;
|
button120Hz.Activated = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (maxFrequency > 60)
|
if (maxFrequency > 60)
|
||||||
@@ -779,22 +779,23 @@ namespace GHelper
|
|||||||
public void SetPerformanceMode(int PerformanceMode = ASUSWmi.PerformanceBalanced, bool notify = false)
|
public void SetPerformanceMode(int PerformanceMode = ASUSWmi.PerformanceBalanced, bool notify = false)
|
||||||
{
|
{
|
||||||
|
|
||||||
buttonSilent.FlatAppearance.BorderSize = buttonInactive;
|
|
||||||
buttonBalanced.FlatAppearance.BorderSize = buttonInactive;
|
buttonSilent.Activated = false;
|
||||||
buttonTurbo.FlatAppearance.BorderSize = buttonInactive;
|
buttonBalanced.Activated = false;
|
||||||
|
buttonTurbo.Activated = false;
|
||||||
|
|
||||||
switch (PerformanceMode)
|
switch (PerformanceMode)
|
||||||
{
|
{
|
||||||
case ASUSWmi.PerformanceSilent:
|
case ASUSWmi.PerformanceSilent:
|
||||||
buttonSilent.FlatAppearance.BorderSize = buttonActive;
|
buttonSilent.Activated = true;
|
||||||
perfName = "Silent";
|
perfName = "Silent";
|
||||||
break;
|
break;
|
||||||
case ASUSWmi.PerformanceTurbo:
|
case ASUSWmi.PerformanceTurbo:
|
||||||
buttonTurbo.FlatAppearance.BorderSize = buttonActive;
|
buttonTurbo.Activated = true;
|
||||||
perfName = "Turbo";
|
perfName = "Turbo";
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
buttonBalanced.FlatAppearance.BorderSize = buttonActive;
|
buttonBalanced.Activated = true;
|
||||||
PerformanceMode = ASUSWmi.PerformanceBalanced;
|
PerformanceMode = ASUSWmi.PerformanceBalanced;
|
||||||
perfName = "Balanced";
|
perfName = "Balanced";
|
||||||
break;
|
break;
|
||||||
@@ -940,6 +941,14 @@ namespace GHelper
|
|||||||
new Thread(() =>
|
new Thread(() =>
|
||||||
{
|
{
|
||||||
Thread.CurrentThread.IsBackground = true;
|
Thread.CurrentThread.IsBackground = true;
|
||||||
|
|
||||||
|
if (eco == 1)
|
||||||
|
{
|
||||||
|
string[] tokill = { "EADesktop" };
|
||||||
|
foreach (string kill in tokill)
|
||||||
|
foreach (var process in Process.GetProcessesByName(kill)) process.Kill();
|
||||||
|
}
|
||||||
|
|
||||||
Program.wmi.DeviceSet(ASUSWmi.GPUEco, eco);
|
Program.wmi.DeviceSet(ASUSWmi.GPUEco, eco);
|
||||||
Program.settingsForm.BeginInvoke(delegate
|
Program.settingsForm.BeginInvoke(delegate
|
||||||
{
|
{
|
||||||
@@ -948,7 +957,10 @@ namespace GHelper
|
|||||||
Thread.Sleep(500);
|
Thread.Sleep(500);
|
||||||
AutoScreen(SystemInformation.PowerStatus.PowerLineStatus);
|
AutoScreen(SystemInformation.PowerStatus.PowerLineStatus);
|
||||||
});
|
});
|
||||||
}).Start();
|
})
|
||||||
|
{
|
||||||
|
|
||||||
|
}.Start();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1031,24 +1043,24 @@ namespace GHelper
|
|||||||
GPUMode = Program.config.getConfig("gpu_mode");
|
GPUMode = Program.config.getConfig("gpu_mode");
|
||||||
}
|
}
|
||||||
|
|
||||||
buttonEco.FlatAppearance.BorderSize = buttonInactive;
|
buttonEco.Activated = false;
|
||||||
buttonStandard.FlatAppearance.BorderSize = buttonInactive;
|
buttonStandard.Activated = false;
|
||||||
buttonUltimate.FlatAppearance.BorderSize = buttonInactive;
|
buttonUltimate.Activated = false;
|
||||||
|
|
||||||
switch (GPUMode)
|
switch (GPUMode)
|
||||||
{
|
{
|
||||||
case ASUSWmi.GPUModeEco:
|
case ASUSWmi.GPUModeEco:
|
||||||
buttonEco.FlatAppearance.BorderSize = buttonActive;
|
buttonEco.Activated = true;
|
||||||
labelGPU.Text = "GPU Mode: 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.Activated = true;
|
||||||
labelGPU.Text = "GPU Mode: 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.Activated = true;
|
||||||
labelGPU.Text = "GPU Mode: iGPU + dGPU";
|
labelGPU.Text = "GPU Mode: iGPU + dGPU";
|
||||||
Program.trayIcon.Icon = GHelper.Properties.Resources.standard;
|
Program.trayIcon.Icon = GHelper.Properties.Resources.standard;
|
||||||
break;
|
break;
|
||||||
|
Before Width: | Height: | Size: 96 KiB After Width: | Height: | Size: 96 KiB |
@@ -5,6 +5,7 @@ sc STOP ASUSSoftwareManager
|
|||||||
sc STOP ASUSSwitch
|
sc STOP ASUSSwitch
|
||||||
sc STOP ASUSSystemAnalysis
|
sc STOP ASUSSystemAnalysis
|
||||||
sc STOP ASUSSystemDiagnosis
|
sc STOP ASUSSystemDiagnosis
|
||||||
|
sc STOP ArmouryCrateControlInterface
|
||||||
|
|
||||||
sc DELETE AsusAppService
|
sc DELETE AsusAppService
|
||||||
sc DELETE ASUSLinkNear
|
sc DELETE ASUSLinkNear
|
||||||
@@ -13,3 +14,4 @@ sc DELETE ASUSSoftwareManager
|
|||||||
sc DELETE ASUSSwitch
|
sc DELETE ASUSSwitch
|
||||||
sc DELETE ASUSSystemAnalysis
|
sc DELETE ASUSSystemAnalysis
|
||||||
sc DELETE ASUSSystemDiagnosis
|
sc DELETE ASUSSystemDiagnosis
|
||||||
|
sc DELETE ArmouryCrateControlInterface
|
||||||
@@ -1,42 +1,47 @@
|
|||||||
# G-Helper | GHelper
|
# [G-Helper (GHelper)](https://github.com/seerge/g-helper)
|
||||||
|
|
||||||
|
[](https://GitHub.com/seerge/g-helper/releases/) [](https://GitHub.com/seerge/g-helper/releases/) [](https://github.com/seerge/g-helper/blob/master/LICENSE)
|
||||||
|
[](https://GitHub.com/seerge/g-helper/stargazers/)
|
||||||
|
|
||||||
## Open source Armory Crate alternative for Asus ROG Zephyrus G14, G15, Flow X13, Flow X16, and other models
|
## Open source Armory Crate alternative for Asus ROG Zephyrus G14, G15, Flow X13, Flow X16, and other models
|
||||||
|
|
||||||
A small utility that allows you to do almost everything you could do with Armory Crate but without extra bloat and unnecessary services.
|
A small utility that allows you to do almost everything you could do with Armory Crate but without extra bloat and unnecessary services.
|
||||||
|
|
||||||
## Main advantages
|
### :gift: Main advantages
|
||||||
|
|
||||||
1. Seamless and automatic GPU switching (without asking you to close all apps, etc)
|
1. Seamless and automatic GPU switching (without asking you to close all apps, etc)
|
||||||
2. All performance modes can be fully customized (with fan curves and PPTs)
|
2. All performance modes can be fully customized (with fan curves and PPTs)
|
||||||
3. Very lightweight and consumes almost no resources, doesn't install any services. Just a single exe to run
|
3. Very lightweight and consumes almost no resources, doesn't install any services. Just a single exe to run
|
||||||
|
|
||||||
## [Download latest release](https://github.com/seerge/g-helper/releases)
|
### [:floppy_disk: Download latest release](https://github.com/seerge/g-helper/releases/latest/download/GHelper.zip)
|
||||||
|
|
||||||

|
If you like this app, please star :star: it on Github and spread a word about it!
|
||||||
|
|
||||||
## Main features
|

|
||||||
|
|
||||||
|
### :zap: Main features
|
||||||
|
|
||||||
1. Built-in **Performance modes**: Silent - Balanced - Turbo (with default fan curves)
|
1. Built-in **Performance modes**: Silent - Balanced - Turbo (with default fan curves)
|
||||||
2. **GPU modes**: Eco -Standard - Ultimate
|
2. **GPU modes**: Eco -Standard - Ultimate
|
||||||
3. Laptop screen refresh rate 60hz or 120hz (144hz, etc depending on the model) with display overdrive (OD)
|
3. Laptop screen refresh rate 60hz or 120hz (144hz, etc depending on the model) with display overdrive (OD)
|
||||||
4. Default and custom fan profiles for every performance mode
|
4. Default and custom fan profiles for every performance mode
|
||||||
5. Power limits (PPT) for every performance mode
|
5. Power limits (PPT) for every performance mode
|
||||||
6. CPU urbo boost mode
|
6. CPU turbo boost mode
|
||||||
7. Keyboard backlit animation and colors
|
7. Keyboard backlit animation and colors
|
||||||
8. Anime matrix control thanks to [Starlight](https://github.com/vddCore/Starlight) + some tweaks from my side (including animated GIFs)
|
8. Anime matrix control thanks to [Starlight](https://github.com/vddCore/Starlight) + some tweaks from my side (including animated GIFs)
|
||||||
9. FN+F5 to cycle through performance modes (with OSD notification) and FN+F4 to cycle through keyboard animation modes
|
9. FN+F5 cycles performance modes, FN+F4 cycles keyboard animation modes
|
||||||
10. Keybindings for M3 and M4 keys
|
10. Keybindings for M3 and M4 keys
|
||||||
11. Battery charge limit to preserve battery health
|
11. Battery charge limit to preserve battery health
|
||||||
12. Monitor CPU / GPU temperature, fan speeds and battery discharge rate
|
12. Monitor CPU / GPU temperature, fan speeds and battery discharge rate
|
||||||
|
|
||||||
## Automatic switching of modes when on battery or plugged in
|
### :apple: Automatic switching of modes when on battery or plugged in
|
||||||
- Performance modes
|
- Performance modes (app remembers last mode used on battery or when plugged)
|
||||||
- GPU modes
|
- GPU modes (eco on battery, stanard when plugged)
|
||||||
- Screen refresh rate
|
- Screen refresh rate (60hz on battery, 120+ hz when plugged)
|
||||||
|
|
||||||
To keep auto switching and hotkeys working the app needs to stay in running in the tray. It doesn't consume any resources.
|
To keep auto switching and hotkeys working the app needs to stay in running in the tray. It doesn't consume any resources.
|
||||||
|
|
||||||
## Performance Modes
|
### :rocket: Performance Modes
|
||||||
|
|
||||||
Modes are **same** as in Armory Crate (as they are stored in bios), including default fan curves
|
Modes are **same** as in Armory Crate (as they are stored in bios), including default fan curves
|
||||||
|
|
||||||
@@ -46,13 +51,26 @@ Modes are **same** as in Armory Crate (as they are stored in bios), including de
|
|||||||
|
|
||||||
PPTs are shown for G14 2022, for other models PPTs will be different as they are set in bios.
|
PPTs are shown for G14 2022, for other models PPTs will be different as they are set in bios.
|
||||||
|
|
||||||
## GPU Modes
|
### :video_game: GPU Modes
|
||||||
|
|
||||||
1. Eco mode : only low power integrated GPU enabled, iGPU drives built in display
|
1. Eco mode : only low power integrated GPU enabled, iGPU drives built in display
|
||||||
2. Standard mode (Windows Hybrid) : iGPU and dGPU enabled, iGPU drives built in display
|
2. Standard mode (Windows Hybrid) : iGPU and dGPU enabled, iGPU drives built in display
|
||||||
3. Ultimate mode: iGPU and dGPU enabled, but dGPU drives built in display (supported only on G14 2022 model)
|
3. Ultimate mode: iGPU and dGPU enabled, but dGPU drives built in display (supported only on G14 2022 model)
|
||||||
|
|
||||||
## How to install
|
### :question: FAQ
|
||||||
|
|
||||||
|
#### How do I stop Armory Crate install popup appearing every time I press M4 / Rog key?
|
||||||
|
Go to BIOS (F2 on boot), open Advanced Settings (F8) and disable "Armory Control Intrerface"
|
||||||
|
|
||||||
|
#### Why Ultimate GPU mode is not available on my laptop?
|
||||||
|
Ultimate mode is supported (by hardware) only on G14 2022 (and possibly other models from 2022+)
|
||||||
|
|
||||||
|
#### App doesn't start / or crashes, what should I do ?
|
||||||
|
Open "Event Viewer" from start menu, go to Windows Logs -> Application and check for recent Errors mentioning G-Helper. If you see one - please post a [new issue](https://github.com/seerge/g-helper/issues) with all details from this error.
|
||||||
|
|
||||||
|
----------------------------
|
||||||
|
|
||||||
|
### How to install
|
||||||
|
|
||||||
1. Download latest release from [**Releases Page**](https://github.com/seerge/g-helper/releases)
|
1. Download latest release from [**Releases Page**](https://github.com/seerge/g-helper/releases)
|
||||||
2. Unzip to a folder of your choice
|
2. Unzip to a folder of your choice
|
||||||
@@ -62,7 +80,7 @@ PPTs are shown for G14 2022, for other models PPTs will be different as they are
|
|||||||
|
|
||||||
- App requires [.NET7](https://dotnet.microsoft.com/en-us/download) to be installed. Most probably you already have it. Otherwise you can [download it](https://dotnet.microsoft.com/en-us/download).
|
- App requires [.NET7](https://dotnet.microsoft.com/en-us/download) to be installed. Most probably you already have it. Otherwise you can [download it](https://dotnet.microsoft.com/en-us/download).
|
||||||
|
|
||||||
- I recommend keeping "Asus Optimization Service" running, as it keeps basic laptop hotkeys such as screen or keyboard brightness adjustment working. If you have (or had) MyASUS app installed, that service is most probably still up and running even after MyASUS uninstalls. It's part of [Asus System Control Interface](https://www.asus.com/support/FAQ/1047338/). You can install it, and later disable / remove unnecessary services by running [this bat file](https://raw.githubusercontent.com/seerge/g-helper/main/stop-asus-sv.bat) as admin.
|
- I recommend keeping "Asus Optimization Service" running, as it keeps basic laptop hotkeys such as screen or keyboard brightness adjustment working. If you have (or had) MyASUS app installed, that service is most probably still up and running even after MyASUS uninstalls. It's part of [Asus System Control Interface](https://www.asus.com/support/FAQ/1047338/). You can install it, and later disable / remove unnecessary services by running [this bat file](https://raw.githubusercontent.com/seerge/g-helper/main/debloat.bat) as admin.
|
||||||
|
|
||||||
- It's not recommended to use an app in combination with Armory Crate, cause they adjust the same settings. You can [uninstall it using it's own uninstall tool](https://dlcdnets.asus.com/pub/ASUS/mb/14Utilities/Armoury_Crate_Uninstall_Tool.zip?model=armoury%20crate). Just in case, you can always install it back later.
|
- It's not recommended to use an app in combination with Armory Crate, cause they adjust the same settings. You can [uninstall it using it's own uninstall tool](https://dlcdnets.asus.com/pub/ASUS/mb/14Utilities/Armoury_Crate_Uninstall_Tool.zip?model=armoury%20crate). Just in case, you can always install it back later.
|
||||||
|
|
||||||
@@ -74,13 +92,13 @@ Designed and developed for Asus Zephyrus G14 2022 (with AMD Radeon iGPU and dGPU
|
|||||||
|
|
||||||
I don't have a Microsoft certificate to sign the app yet, so if you get a warning from Windows Defender on launch (Windows Protected your PC), click More Info -> Run anyway. Alternatively you can compile and run project by yourself using Visual Studio :)
|
I don't have a Microsoft certificate to sign the app yet, so if you get a warning from Windows Defender on launch (Windows Protected your PC), click More Info -> Run anyway. Alternatively you can compile and run project by yourself using Visual Studio :)
|
||||||
|
|
||||||
Settings file is stored at %AppData%\GHelper
|
Settings file is stored at ``%AppData%\GHelper``
|
||||||
|
|
||||||
------------------
|
------------------
|
||||||
|
|
||||||
Debloating helps to save your battery and keep laptop a bit cooler
|
Debloating helps to save your battery and keep laptop a bit cooler
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
---------
|
---------
|
||||||
|
|
||||||
4
docs/_config.yml
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
title: G-Helper
|
||||||
|
description: Open source Armory Crate alternative for Asus ROG Zephyrus G14, G15, Flow X13, Flow X16, and other models
|
||||||
|
plugins:
|
||||||
|
- jemoji
|
||||||
26
docs/_layouts/default.html
Normal file
@@ -0,0 +1,26 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="{{ page.lang | default: site.lang | default: "en-US" }}">
|
||||||
|
<head>
|
||||||
|
<meta charset="UTF-8">
|
||||||
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||||
|
|
||||||
|
{% seo %}
|
||||||
|
<link rel="stylesheet" href="{{ "/assets/css/style.css?v=" | append: site.github.build_revision | relative_url }}">
|
||||||
|
{% include head-custom.html %}
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<div class="container-lg px-3 my-5 markdown-body">
|
||||||
|
|
||||||
|
{{ content }}
|
||||||
|
|
||||||
|
{% if site.github.private != true and site.github.license %}
|
||||||
|
<div class="footer border-top border-gray-light mt-5 pt-3 text-right text-gray">
|
||||||
|
This site is open source. {% github_edit_link "Improve this page" %}.
|
||||||
|
</div>
|
||||||
|
{% endif %}
|
||||||
|
</div>
|
||||||
|
<script src="https://cdnjs.cloudflare.com/ajax/libs/anchor-js/4.1.0/anchor.min.js" integrity="sha256-lZaRhKri35AyJSypXXs4o6OPFTbTmUoltBbDCbdzegg=" crossorigin="anonymous"></script>
|
||||||
|
<script>anchors.add();</script>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
BIN
docs/screenshot.png
Normal file
|
After Width: | Height: | Size: 3.6 MiB |
|
Before Width: | Height: | Size: 955 KiB After Width: | Height: | Size: 955 KiB |
BIN
screenshot.png
|
Before Width: | Height: | Size: 3.4 MiB |