mirror of
https://github.com/jkocon/g-helper.git
synced 2026-02-23 13:00:52 +01:00
Compare commits
39 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
6e1081044b | ||
|
|
384a70c51c | ||
|
|
0da6540de4 | ||
|
|
83fed695e4 | ||
|
|
6bd69a6055 | ||
|
|
e125afde1a | ||
|
|
bc79784b2f | ||
|
|
a29cd7e1be | ||
|
|
5986707f90 | ||
|
|
3bd35074fe | ||
|
|
b1b187f098 | ||
|
|
1464a39eb4 | ||
|
|
f682646865 | ||
|
|
6a9d805838 | ||
|
|
0217b2a993 | ||
|
|
0a3256eb44 | ||
|
|
6eba7dadea | ||
|
|
772bd8e7a5 | ||
|
|
556a4ce4ee | ||
|
|
c0f88191df | ||
|
|
527769042f | ||
|
|
671c31848b | ||
|
|
00dc6a6ca3 | ||
|
|
765c03815e | ||
|
|
df35a576df | ||
|
|
becb71b69b | ||
|
|
aba4ab7742 | ||
|
|
2a9b9735d5 | ||
|
|
9ced493821 | ||
|
|
c6f3f73405 | ||
|
|
b8b82af613 | ||
|
|
4ab7ceb837 | ||
|
|
d7c85e8440 | ||
|
|
87eb2e5a39 | ||
|
|
d8569d5d43 | ||
|
|
ddf56fc017 | ||
|
|
ee86661aac | ||
|
|
d05298030f | ||
|
|
49d751ee15 |
39
.github/ISSUE_TEMPLATE/bug_report.md
vendored
39
.github/ISSUE_TEMPLATE/bug_report.md
vendored
@@ -1,39 +0,0 @@
|
||||
---
|
||||
name: Bug report
|
||||
about: Create a report to help us improve
|
||||
|
||||
---
|
||||
|
||||
## NOTE
|
||||
Bug reports without clear information or scenario to reproduce and logs from ``%AppData%\GHelper`` will be closed without answer. Please respect the time of the developer. Thanks.
|
||||
|
||||
**Describe the bug**
|
||||
A clear and concise description of what the bug is.
|
||||
|
||||
**Clear scenario to Reproduce**
|
||||
Steps to reproduce the behavior:
|
||||
1. Go to '...'
|
||||
2. Click on '....'
|
||||
3. Scroll down to '....'
|
||||
4. Explanation of an error or a bug
|
||||
|
||||
**Expected behavior**
|
||||
A clear and concise description of what you expected to happen.
|
||||
|
||||
**App Logs**
|
||||
Please include and attach log.txt from ``%AppData%\GHelper``
|
||||
|
||||
**Screenshots or screencasts**
|
||||
If applicable, add screenshots to help explain your problem.
|
||||
|
||||
**Desktop (please complete the following information):**
|
||||
- OS: [e.g. Windows 11]
|
||||
- Laptop model
|
||||
|
||||
**Asus software**
|
||||
- Armoury Crate (or it's services installed)
|
||||
- MyASUS installed
|
||||
- Other Asus services running in background
|
||||
|
||||
**Additional context**
|
||||
Add any other context about the problem here.
|
||||
82
.github/ISSUE_TEMPLATE/bug_report.yml
vendored
Normal file
82
.github/ISSUE_TEMPLATE/bug_report.yml
vendored
Normal file
@@ -0,0 +1,82 @@
|
||||
name: Bug Report
|
||||
description: Something isn't working correctly
|
||||
labels: ["bug"]
|
||||
body:
|
||||
- type: markdown
|
||||
attributes:
|
||||
value: |
|
||||
Thanks for taking the time to fill out this bug report. The more information you provide, the easier it will be for me to fix it!
|
||||
- type: checkboxes
|
||||
id: rules
|
||||
attributes:
|
||||
label: Rules
|
||||
options:
|
||||
- label: I made myself familiar with the <a href='https://github.com/seerge/g-helper?tab=readme-ov-file'>Readme</a>, <a href='https://github.com/seerge/g-helper/wiki/FAQ'>FAQ</a> and <a href='https://github.com/seerge/g-helper/wiki/Troubleshooting'>Troubleshooting</a>.
|
||||
required: true
|
||||
- label: I understand that, if insufficient information was provided, my issue will be closed without an answer.
|
||||
required: true
|
||||
validations:
|
||||
required: true
|
||||
- type: textarea
|
||||
id: description
|
||||
attributes:
|
||||
label: What's wrong?
|
||||
description: Provide detailed description of what is wrong or does not work as expected.
|
||||
placeholder: Provide detailed description of what is wrong or does not work as expected.
|
||||
validations:
|
||||
required: true
|
||||
- type: textarea
|
||||
id: reproduce
|
||||
attributes:
|
||||
label: How to reproduce the bug?
|
||||
description: Describe how to reproduce the behavior. Be as specific as possible and provide as many details as possible.
|
||||
placeholder: |
|
||||
1. Go to '...'
|
||||
2. Click on '....'
|
||||
3. Scroll down to '....'
|
||||
4. See error
|
||||
validations:
|
||||
required: true
|
||||
- type: textarea
|
||||
id: logs
|
||||
attributes:
|
||||
label: Logs
|
||||
placeholder: Please drag and drop complete log file from ``%APPDATA%\GHelper\log.txt``
|
||||
description: Please drag and drop complete log file from ``%APPDATA%\GHelper\log.txt``
|
||||
validations:
|
||||
required: true
|
||||
- type: input
|
||||
id: device
|
||||
attributes:
|
||||
label: Device and Model
|
||||
description: Which laptop do you use?
|
||||
placeholder: e.g. Asus Zephyrus G14 GA404RK
|
||||
validations:
|
||||
required: true
|
||||
- type: textarea
|
||||
id: additional
|
||||
attributes:
|
||||
label: Additional information.
|
||||
description: If applicable, add screenshots or other relevant information to help explain your problem.
|
||||
- type: checkboxes
|
||||
id: asus
|
||||
attributes:
|
||||
label: Asus Software Running
|
||||
description: Please check what Asus/Armoury Services do you have installed and running
|
||||
options:
|
||||
- label: Armoury Crate
|
||||
- label: MyAsus
|
||||
- label: Other Asus Services
|
||||
- type: input
|
||||
id: version
|
||||
attributes:
|
||||
label: Version
|
||||
description: G-Helper version?
|
||||
placeholder: e.g. 0.146
|
||||
- type: input
|
||||
id: os
|
||||
attributes:
|
||||
label: OS
|
||||
description: Which operating system do you use?
|
||||
placeholder: e.g. Windows 11 21H2
|
||||
|
||||
151
app/Ally/AllyControl.cs
Normal file
151
app/Ally/AllyControl.cs
Normal file
@@ -0,0 +1,151 @@
|
||||
using GHelper.Gpu.AMD;
|
||||
using GHelper.Input;
|
||||
using GHelper.USB;
|
||||
|
||||
namespace GHelper.Ally
|
||||
{
|
||||
|
||||
public enum ControllerMode : int
|
||||
{
|
||||
Auto = 0,
|
||||
Gamepad = 1,
|
||||
Mouse = 3,
|
||||
}
|
||||
|
||||
public class AllyControl
|
||||
{
|
||||
System.Timers.Timer timer = default!;
|
||||
static AmdGpuControl amdControl = new AmdGpuControl();
|
||||
|
||||
SettingsForm settings;
|
||||
|
||||
static ControllerMode mode = ControllerMode.Auto;
|
||||
static ControllerMode _autoMode = ControllerMode.Auto;
|
||||
static int _autoCount = 0;
|
||||
|
||||
static int fpsLimit = -1;
|
||||
|
||||
public AllyControl(SettingsForm settingsForm)
|
||||
{
|
||||
if (!AppConfig.IsAlly()) return;
|
||||
|
||||
settings = settingsForm;
|
||||
|
||||
timer = new System.Timers.Timer(500);
|
||||
timer.Elapsed += Timer_Elapsed;
|
||||
|
||||
}
|
||||
|
||||
private void Timer_Elapsed(object? sender, System.Timers.ElapsedEventArgs e)
|
||||
{
|
||||
float fps = amdControl.GetFPS();
|
||||
|
||||
ControllerMode _newMode = (fps > 0) ? ControllerMode.Gamepad : ControllerMode.Mouse;
|
||||
|
||||
if (_autoMode != _newMode) _autoCount++;
|
||||
else _autoCount = 0;
|
||||
|
||||
if (_autoCount > 2)
|
||||
{
|
||||
_autoMode = _newMode;
|
||||
_autoCount = 0;
|
||||
AsusHid.WriteInput(new byte[] { AsusHid.INPUT_ID, 0xd1, 1, 1, (byte)_autoMode }, "ControllerAuto " + _autoMode);
|
||||
Logger.WriteLine(fps.ToString());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public void Init()
|
||||
{
|
||||
if (AppConfig.IsAlly()) settings.VisualiseAlly(true);
|
||||
else return;
|
||||
|
||||
Deadzones();
|
||||
SetMode((ControllerMode)AppConfig.Get("controller_mode", (int)ControllerMode.Auto));
|
||||
|
||||
settings.VisualiseBacklight(InputDispatcher.GetBacklight());
|
||||
|
||||
fpsLimit = amdControl.GetFPSLimit();
|
||||
Logger.WriteLine($"FPS Limit: {fpsLimit}");
|
||||
settings.VisualiseFPSLimit(fpsLimit);
|
||||
|
||||
}
|
||||
|
||||
public void ToggleFPSLimit()
|
||||
{
|
||||
switch (fpsLimit)
|
||||
{
|
||||
case 30:
|
||||
fpsLimit = 40;
|
||||
break;
|
||||
case 40:
|
||||
fpsLimit = 60;
|
||||
break;
|
||||
case 60:
|
||||
fpsLimit = 120;
|
||||
break;
|
||||
default:
|
||||
fpsLimit = 30;
|
||||
break;
|
||||
}
|
||||
|
||||
int result = amdControl.SetFPSLimit(fpsLimit);
|
||||
Logger.WriteLine($"FPS Limit {fpsLimit}: {result}");
|
||||
|
||||
settings.VisualiseFPSLimit(fpsLimit);
|
||||
|
||||
}
|
||||
|
||||
|
||||
public void ToggleBacklight()
|
||||
{
|
||||
InputDispatcher.SetBacklight(4, true);
|
||||
settings.VisualiseBacklight(InputDispatcher.GetBacklight());
|
||||
}
|
||||
|
||||
private void Deadzones()
|
||||
{
|
||||
AsusHid.WriteInput(new byte[] { AsusHid.INPUT_ID, 0xd1, 4, 4, 0, 100, 0, 100 }, "ControllerDeadzone");
|
||||
}
|
||||
|
||||
private void SetMode(ControllerMode mode)
|
||||
{
|
||||
if (mode == ControllerMode.Auto)
|
||||
{
|
||||
_autoMode = ControllerMode.Auto;
|
||||
amdControl.StartFPS();
|
||||
timer.Start();
|
||||
}
|
||||
else
|
||||
{
|
||||
timer.Stop();
|
||||
amdControl.StopFPS();
|
||||
|
||||
AsusHid.WriteInput(new byte[] { AsusHid.INPUT_ID, 0xd1, 1, 1, (byte)mode }, "ControllerMode");
|
||||
}
|
||||
|
||||
AppConfig.Set("controller_mode", (int)mode);
|
||||
settings.VisualiseController(mode);
|
||||
}
|
||||
|
||||
public void ToggleMode()
|
||||
{
|
||||
|
||||
switch (mode)
|
||||
{
|
||||
case ControllerMode.Auto:
|
||||
mode = ControllerMode.Gamepad;
|
||||
break;
|
||||
case ControllerMode.Gamepad:
|
||||
mode = ControllerMode.Mouse;
|
||||
break;
|
||||
case ControllerMode.Mouse:
|
||||
mode = ControllerMode.Auto;
|
||||
break;
|
||||
}
|
||||
|
||||
SetMode(mode);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -10,7 +10,7 @@ using System.Timers;
|
||||
namespace GHelper.AnimeMatrix
|
||||
{
|
||||
|
||||
public class AniMatrixControl
|
||||
public class AniMatrixControl : NAudio.CoreAudioApi.Interfaces.IMMNotificationClient
|
||||
{
|
||||
|
||||
SettingsForm settings;
|
||||
@@ -20,6 +20,8 @@ namespace GHelper.AnimeMatrix
|
||||
|
||||
double[]? AudioValues;
|
||||
WasapiCapture? AudioDevice;
|
||||
string? AudioDeviceId;
|
||||
private MMDeviceEnumerator? AudioDeviceEnum;
|
||||
|
||||
public bool IsValid => device != null;
|
||||
|
||||
@@ -167,6 +169,9 @@ namespace GHelper.AnimeMatrix
|
||||
Logger.WriteLine(ex.ToString());
|
||||
}
|
||||
}
|
||||
|
||||
AudioDeviceId = null;
|
||||
AudioDeviceEnum?.Dispose();
|
||||
}
|
||||
|
||||
void SetMatrixAudio()
|
||||
@@ -179,10 +184,13 @@ namespace GHelper.AnimeMatrix
|
||||
|
||||
try
|
||||
{
|
||||
using (var enumerator = new MMDeviceEnumerator())
|
||||
using (MMDevice device = enumerator.GetDefaultAudioEndpoint(DataFlow.Render, Role.Console))
|
||||
AudioDeviceEnum = new MMDeviceEnumerator();
|
||||
AudioDeviceEnum.RegisterEndpointNotificationCallback(this);
|
||||
|
||||
using (MMDevice device = AudioDeviceEnum.GetDefaultAudioEndpoint(DataFlow.Render, Role.Console))
|
||||
{
|
||||
AudioDevice = new WasapiLoopbackCapture(device);
|
||||
AudioDeviceId = device.ID;
|
||||
WaveFormat fmt = AudioDevice.WaveFormat;
|
||||
|
||||
AudioValues = new double[fmt.SampleRate / 1000];
|
||||
@@ -397,6 +405,48 @@ namespace GHelper.AnimeMatrix
|
||||
|
||||
}
|
||||
|
||||
public void OnDeviceStateChanged(string deviceId, DeviceState newState)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public void OnDeviceAdded(string pwstrDeviceId)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public void OnDeviceRemoved(string deviceId)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public void OnDefaultDeviceChanged(DataFlow flow, Role role, string defaultDeviceId)
|
||||
{
|
||||
if (AudioDeviceId == defaultDeviceId)
|
||||
{
|
||||
//We already caputre this device. No need to re-initialize
|
||||
return;
|
||||
}
|
||||
|
||||
int running = AppConfig.Get("matrix_running");
|
||||
if (flow != DataFlow.Render || role != Role.Console || running != 4)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
//Restart audio if default audio changed
|
||||
Logger.WriteLine("Matrix Audio: Default Output changed to " + defaultDeviceId);
|
||||
|
||||
//Already set the device here. Otherwise this will be called multiple times in a short succession and causes a crash due to dispose during initalization.
|
||||
AudioDeviceId = defaultDeviceId;
|
||||
|
||||
//Delay is required or it will deadlock on dispose.
|
||||
Task.Delay(50).ContinueWith(t => SetMatrixAudio());
|
||||
}
|
||||
|
||||
public void OnPropertyValueChanged(string pwstrDeviceId, PropertyKey key)
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -344,6 +344,11 @@ public static class AppConfig
|
||||
return ContainsModel("TUF");
|
||||
}
|
||||
|
||||
public static bool IsProArt()
|
||||
{
|
||||
return ContainsModel("ProArt");
|
||||
}
|
||||
|
||||
public static bool IsVivobook()
|
||||
{
|
||||
return ContainsModel("Vivobook");
|
||||
@@ -379,12 +384,12 @@ public static class AppConfig
|
||||
|
||||
public static bool IsStrixLimitedRGB()
|
||||
{
|
||||
return ContainsModel("G614JV") || ContainsModel("G614JZ") || ContainsModel("G512LI") || ContainsModel("G513R") || ContainsModel("G713PV") || ContainsModel("G513IE") || ContainsModel("G713RC") || ContainsModel("G513QM");
|
||||
return (ContainsModel("G614JV") || ContainsModel("G614JZ") || ContainsModel("G512LI") || ContainsModel("G513R") || ContainsModel("G713PV") || ContainsModel("G513IE") || ContainsModel("G713RC") || ContainsModel("G513QM")) && !Is("per_key_rgb");
|
||||
}
|
||||
|
||||
public static bool IsNoDirectRGB()
|
||||
{
|
||||
return ContainsModel("GA503");
|
||||
return ContainsModel("GA503") || ContainsModel("G533Q");
|
||||
}
|
||||
|
||||
public static bool IsStrixNumpad()
|
||||
@@ -485,6 +490,11 @@ public static class AppConfig
|
||||
return ContainsModel("FA507");
|
||||
}
|
||||
|
||||
public static bool IsIntelHX()
|
||||
{
|
||||
return ContainsModel("G814") || ContainsModel("G614") || ContainsModel("G834") || ContainsModel("G634");
|
||||
}
|
||||
|
||||
public static bool IsASUS()
|
||||
{
|
||||
return ContainsModel("ROG") || ContainsModel("TUF") || ContainsModel("Vivobook") || ContainsModel("Zenbook");
|
||||
|
||||
@@ -83,10 +83,10 @@ public class AsusACPI
|
||||
public const int Temp_CPU = 0x00120094;
|
||||
public const int Temp_GPU = 0x00120097;
|
||||
|
||||
public const int PPT_TotalA0 = 0x001200A0; // SPL (Total limit for all-AMD models) / PL1
|
||||
public const int PPT_APUA0 = 0x001200A0; // sPPT (slow boost limit) / PL2
|
||||
public const int PPT_EDCA1 = 0x001200A1; // CPU EDC
|
||||
public const int PPT_TDCA2 = 0x001200A2; // CPU TDC
|
||||
public const int PPT_APUA3 = 0x001200A3; // sPPT (long boost limit) / PL2
|
||||
public const int PPT_APUA3 = 0x001200A3; // SPL (sustained limit) / PL1
|
||||
|
||||
public const int PPT_CPUB0 = 0x001200B0; // CPU PPT on 2022 (PPT_LIMIT_APU)
|
||||
public const int PPT_CPUB1 = 0x001200B1; // Total PPT on 2022 (PPT_LIMIT_SLOW)
|
||||
@@ -259,6 +259,11 @@ public class AsusACPI
|
||||
DefaultTotal = 30;
|
||||
}
|
||||
|
||||
if (AppConfig.IsIntelHX())
|
||||
{
|
||||
MaxTotal = 175;
|
||||
}
|
||||
|
||||
if (AppConfig.DynamicBoost5())
|
||||
{
|
||||
MaxGPUBoost = 5;
|
||||
@@ -508,7 +513,7 @@ public class AsusACPI
|
||||
|
||||
for (int i = 0; i < 8; i++)
|
||||
{
|
||||
if (curve[i] == old) curve[i]++; // preventing 2 points in same spot from default asus profiles
|
||||
if (curve[i] <= old) curve[i] = (byte)Math.Min(100, old + 6); // preventing 2 points in same spot from default asus profiles
|
||||
points[curve[i]] = curve[i + 8];
|
||||
old = curve[i];
|
||||
}
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using System.Diagnostics;
|
||||
using GHelper.Helpers;
|
||||
using System.Diagnostics;
|
||||
using System.Net;
|
||||
using System.Reflection;
|
||||
using System.Text.Json;
|
||||
@@ -119,7 +120,7 @@ namespace GHelper.AutoUpdate
|
||||
Logger.WriteLine(zipName);
|
||||
Logger.WriteLine(exeName);
|
||||
|
||||
string command = $"Start-Sleep -Seconds 1; $ErrorActionPreference = \"Stop\"; Expand-Archive \"{zipName}\" -DestinationPath . -Force; Remove-Item \"{zipName}\" -Force; \".\\{exeName}\"; ";
|
||||
string command = $"$ErrorActionPreference = \"Stop\"; Wait-Process -Name \"GHelper\"; Expand-Archive \"{zipName}\" -DestinationPath . -Force; Remove-Item \"{zipName}\" -Force; \".\\{exeName}\"; ";
|
||||
Logger.WriteLine(command);
|
||||
|
||||
try
|
||||
@@ -130,6 +131,7 @@ namespace GHelper.AutoUpdate
|
||||
cmd.StartInfo.CreateNoWindow = true;
|
||||
cmd.StartInfo.FileName = "powershell";
|
||||
cmd.StartInfo.Arguments = command;
|
||||
if (ProcessHelper.IsUserAdministrator()) cmd.StartInfo.Verb = "runas";
|
||||
cmd.Start();
|
||||
}
|
||||
catch (Exception ex)
|
||||
@@ -137,7 +139,7 @@ namespace GHelper.AutoUpdate
|
||||
Logger.WriteLine(ex.Message);
|
||||
}
|
||||
|
||||
Application.Exit();
|
||||
Environment.Exit(0);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -226,6 +226,8 @@ namespace GHelper
|
||||
SetKeyCombo(comboM4, textM4, "m4");
|
||||
SetKeyCombo(comboFNF4, textFNF4, "paddle");
|
||||
|
||||
checkGpuApps.Visible = false;
|
||||
checkUSBC.Visible = false;
|
||||
|
||||
int apuMem = Program.acpi.GetAPUMem();
|
||||
if (apuMem >= 0)
|
||||
|
||||
504
app/Fans.Designer.cs
generated
504
app/Fans.Designer.cs
generated
@@ -31,14 +31,14 @@ namespace GHelper
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
ChartArea chartArea17 = new ChartArea();
|
||||
Title title17 = new Title();
|
||||
ChartArea chartArea18 = new ChartArea();
|
||||
Title title18 = new Title();
|
||||
ChartArea chartArea19 = new ChartArea();
|
||||
Title title19 = new Title();
|
||||
ChartArea chartArea20 = new ChartArea();
|
||||
Title title20 = new Title();
|
||||
ChartArea chartArea5 = new ChartArea();
|
||||
Title title5 = new Title();
|
||||
ChartArea chartArea6 = new ChartArea();
|
||||
Title title6 = new Title();
|
||||
ChartArea chartArea7 = new ChartArea();
|
||||
Title title7 = new Title();
|
||||
ChartArea chartArea8 = new ChartArea();
|
||||
Title title8 = new Title();
|
||||
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Fans));
|
||||
panelFans = new Panel();
|
||||
labelTip = new Label();
|
||||
@@ -88,18 +88,22 @@ namespace GHelper
|
||||
panelPower = new Panel();
|
||||
panelApplyPower = new Panel();
|
||||
checkApplyPower = new RCheckBox();
|
||||
panelB0 = new Panel();
|
||||
labelB0 = new Label();
|
||||
labelLeftB0 = new Label();
|
||||
trackB0 = new TrackBar();
|
||||
panelC1 = new Panel();
|
||||
labelC1 = new Label();
|
||||
labelLeftC1 = new Label();
|
||||
trackC1 = new TrackBar();
|
||||
panelA0 = new Panel();
|
||||
labelA0 = new Label();
|
||||
labelLeftA0 = new Label();
|
||||
trackA0 = new TrackBar();
|
||||
panelCPU = new Panel();
|
||||
labelCPU = new Label();
|
||||
labelLeftCPU = new Label();
|
||||
trackCPU = new TrackBar();
|
||||
panelFast = new Panel();
|
||||
labelFast = new Label();
|
||||
labelLeftFast = new Label();
|
||||
trackFast = new TrackBar();
|
||||
panelSlow = new Panel();
|
||||
labelSlow = new Label();
|
||||
labelLeftSlow = new Label();
|
||||
trackSlow = new TrackBar();
|
||||
panelTotal = new Panel();
|
||||
labelTotal = new Label();
|
||||
labelLeftTotal = new Label();
|
||||
trackTotal = new TrackBar();
|
||||
panelTitleCPU = new Panel();
|
||||
pictureBoxCPU = new PictureBox();
|
||||
labelPowerLimits = new Label();
|
||||
@@ -141,10 +145,6 @@ namespace GHelper
|
||||
buttonAdvanced = new RButton();
|
||||
buttonGPU = new RButton();
|
||||
buttonCPU = new RButton();
|
||||
panelA3 = new Panel();
|
||||
labelA3 = new Label();
|
||||
labelLeftA3 = new Label();
|
||||
trackA3 = new TrackBar();
|
||||
panelFans.SuspendLayout();
|
||||
tableFanCharts.SuspendLayout();
|
||||
((System.ComponentModel.ISupportInitialize)chartGPU).BeginInit();
|
||||
@@ -170,12 +170,14 @@ namespace GHelper
|
||||
((System.ComponentModel.ISupportInitialize)pictureTemp).BeginInit();
|
||||
panelPower.SuspendLayout();
|
||||
panelApplyPower.SuspendLayout();
|
||||
panelB0.SuspendLayout();
|
||||
((System.ComponentModel.ISupportInitialize)trackB0).BeginInit();
|
||||
panelC1.SuspendLayout();
|
||||
((System.ComponentModel.ISupportInitialize)trackC1).BeginInit();
|
||||
panelA0.SuspendLayout();
|
||||
((System.ComponentModel.ISupportInitialize)trackA0).BeginInit();
|
||||
panelCPU.SuspendLayout();
|
||||
((System.ComponentModel.ISupportInitialize)trackCPU).BeginInit();
|
||||
panelFast.SuspendLayout();
|
||||
((System.ComponentModel.ISupportInitialize)trackFast).BeginInit();
|
||||
panelSlow.SuspendLayout();
|
||||
((System.ComponentModel.ISupportInitialize)trackSlow).BeginInit();
|
||||
panelTotal.SuspendLayout();
|
||||
((System.ComponentModel.ISupportInitialize)trackTotal).BeginInit();
|
||||
panelTitleCPU.SuspendLayout();
|
||||
((System.ComponentModel.ISupportInitialize)pictureBoxCPU).BeginInit();
|
||||
panelBoost.SuspendLayout();
|
||||
@@ -199,8 +201,6 @@ namespace GHelper
|
||||
((System.ComponentModel.ISupportInitialize)pictureGPU).BeginInit();
|
||||
panelNav.SuspendLayout();
|
||||
tableNav.SuspendLayout();
|
||||
panelA3.SuspendLayout();
|
||||
((System.ComponentModel.ISupportInitialize)trackA3).BeginInit();
|
||||
SuspendLayout();
|
||||
//
|
||||
// panelFans
|
||||
@@ -257,8 +257,8 @@ namespace GHelper
|
||||
//
|
||||
// chartGPU
|
||||
//
|
||||
chartArea17.Name = "ChartArea1";
|
||||
chartGPU.ChartAreas.Add(chartArea17);
|
||||
chartArea5.Name = "ChartArea1";
|
||||
chartGPU.ChartAreas.Add(chartArea5);
|
||||
chartGPU.Dock = DockStyle.Fill;
|
||||
chartGPU.Location = new Point(12, 493);
|
||||
chartGPU.Margin = new Padding(2, 10, 2, 10);
|
||||
@@ -266,13 +266,13 @@ namespace GHelper
|
||||
chartGPU.Size = new Size(782, 463);
|
||||
chartGPU.TabIndex = 17;
|
||||
chartGPU.Text = "chartGPU";
|
||||
title17.Name = "Title1";
|
||||
chartGPU.Titles.Add(title17);
|
||||
title5.Name = "Title1";
|
||||
chartGPU.Titles.Add(title5);
|
||||
//
|
||||
// chartCPU
|
||||
//
|
||||
chartArea18.Name = "ChartArea1";
|
||||
chartCPU.ChartAreas.Add(chartArea18);
|
||||
chartArea6.Name = "ChartArea1";
|
||||
chartCPU.ChartAreas.Add(chartArea6);
|
||||
chartCPU.Dock = DockStyle.Fill;
|
||||
chartCPU.Location = new Point(12, 10);
|
||||
chartCPU.Margin = new Padding(2, 10, 2, 10);
|
||||
@@ -280,13 +280,13 @@ namespace GHelper
|
||||
chartCPU.Size = new Size(782, 463);
|
||||
chartCPU.TabIndex = 14;
|
||||
chartCPU.Text = "chartCPU";
|
||||
title18.Name = "Title1";
|
||||
chartCPU.Titles.Add(title18);
|
||||
title6.Name = "Title1";
|
||||
chartCPU.Titles.Add(title6);
|
||||
//
|
||||
// chartXGM
|
||||
//
|
||||
chartArea19.Name = "ChartAreaXGM";
|
||||
chartXGM.ChartAreas.Add(chartArea19);
|
||||
chartArea7.Name = "ChartAreaXGM";
|
||||
chartXGM.ChartAreas.Add(chartArea7);
|
||||
chartXGM.Dock = DockStyle.Fill;
|
||||
chartXGM.Location = new Point(12, 1459);
|
||||
chartXGM.Margin = new Padding(2, 10, 2, 10);
|
||||
@@ -294,14 +294,14 @@ namespace GHelper
|
||||
chartXGM.Size = new Size(782, 463);
|
||||
chartXGM.TabIndex = 14;
|
||||
chartXGM.Text = "chartXGM";
|
||||
title19.Name = "Title4";
|
||||
chartXGM.Titles.Add(title19);
|
||||
title7.Name = "Title4";
|
||||
chartXGM.Titles.Add(title7);
|
||||
chartXGM.Visible = false;
|
||||
//
|
||||
// chartMid
|
||||
//
|
||||
chartArea20.Name = "ChartArea3";
|
||||
chartMid.ChartAreas.Add(chartArea20);
|
||||
chartArea8.Name = "ChartArea3";
|
||||
chartMid.ChartAreas.Add(chartArea8);
|
||||
chartMid.Dock = DockStyle.Fill;
|
||||
chartMid.Location = new Point(12, 976);
|
||||
chartMid.Margin = new Padding(2, 10, 2, 10);
|
||||
@@ -309,8 +309,8 @@ namespace GHelper
|
||||
chartMid.Size = new Size(782, 463);
|
||||
chartMid.TabIndex = 14;
|
||||
chartMid.Text = "chartMid";
|
||||
title20.Name = "Title3";
|
||||
chartMid.Titles.Add(title20);
|
||||
title8.Name = "Title3";
|
||||
chartMid.Titles.Add(title8);
|
||||
chartMid.Visible = false;
|
||||
//
|
||||
// panelTitleFans
|
||||
@@ -818,10 +818,10 @@ namespace GHelper
|
||||
panelPower.AutoSize = true;
|
||||
panelPower.AutoSizeMode = AutoSizeMode.GrowAndShrink;
|
||||
panelPower.Controls.Add(panelApplyPower);
|
||||
panelPower.Controls.Add(panelB0);
|
||||
panelPower.Controls.Add(panelC1);
|
||||
panelPower.Controls.Add(panelA3);
|
||||
panelPower.Controls.Add(panelA0);
|
||||
panelPower.Controls.Add(panelCPU);
|
||||
panelPower.Controls.Add(panelFast);
|
||||
panelPower.Controls.Add(panelSlow);
|
||||
panelPower.Controls.Add(panelTotal);
|
||||
panelPower.Controls.Add(panelTitleCPU);
|
||||
panelPower.Controls.Add(panelBoost);
|
||||
panelPower.Controls.Add(panelBoostTitle);
|
||||
@@ -858,152 +858,201 @@ namespace GHelper
|
||||
checkApplyPower.Text = "Apply Power Limits";
|
||||
checkApplyPower.UseVisualStyleBackColor = false;
|
||||
//
|
||||
// panelB0
|
||||
// panelCPU
|
||||
//
|
||||
panelB0.AutoSize = true;
|
||||
panelB0.AutoSizeMode = AutoSizeMode.GrowAndShrink;
|
||||
panelB0.Controls.Add(labelB0);
|
||||
panelB0.Controls.Add(labelLeftB0);
|
||||
panelB0.Controls.Add(trackB0);
|
||||
panelB0.Dock = DockStyle.Top;
|
||||
panelB0.Location = new Point(0, 680);
|
||||
panelB0.Margin = new Padding(4);
|
||||
panelB0.MaximumSize = new Size(0, 124);
|
||||
panelB0.Name = "panelB0";
|
||||
panelB0.Size = new Size(520, 124);
|
||||
panelB0.TabIndex = 41;
|
||||
panelCPU.AutoSize = true;
|
||||
panelCPU.AutoSizeMode = AutoSizeMode.GrowAndShrink;
|
||||
panelCPU.Controls.Add(labelCPU);
|
||||
panelCPU.Controls.Add(labelLeftCPU);
|
||||
panelCPU.Controls.Add(trackCPU);
|
||||
panelCPU.Dock = DockStyle.Top;
|
||||
panelCPU.Location = new Point(0, 680);
|
||||
panelCPU.Margin = new Padding(4);
|
||||
panelCPU.MaximumSize = new Size(0, 124);
|
||||
panelCPU.Name = "panelCPU";
|
||||
panelCPU.Size = new Size(520, 124);
|
||||
panelCPU.TabIndex = 41;
|
||||
//
|
||||
// labelB0
|
||||
// labelCPU
|
||||
//
|
||||
labelB0.Font = new Font("Segoe UI", 9F, FontStyle.Bold, GraphicsUnit.Point);
|
||||
labelB0.Location = new Point(398, 8);
|
||||
labelB0.Margin = new Padding(4, 0, 4, 0);
|
||||
labelB0.Name = "labelB0";
|
||||
labelB0.Size = new Size(116, 32);
|
||||
labelB0.TabIndex = 13;
|
||||
labelB0.Text = "CPU";
|
||||
labelB0.TextAlign = ContentAlignment.TopRight;
|
||||
labelCPU.Font = new Font("Segoe UI", 9F, FontStyle.Bold, GraphicsUnit.Point);
|
||||
labelCPU.Location = new Point(398, 8);
|
||||
labelCPU.Margin = new Padding(4, 0, 4, 0);
|
||||
labelCPU.Name = "labelCPU";
|
||||
labelCPU.Size = new Size(116, 32);
|
||||
labelCPU.TabIndex = 13;
|
||||
labelCPU.Text = "CPU";
|
||||
labelCPU.TextAlign = ContentAlignment.TopRight;
|
||||
//
|
||||
// labelLeftB0
|
||||
// labelLeftCPU
|
||||
//
|
||||
labelLeftB0.AutoSize = true;
|
||||
labelLeftB0.Location = new Point(10, 8);
|
||||
labelLeftB0.Margin = new Padding(4, 0, 4, 0);
|
||||
labelLeftB0.Name = "labelLeftB0";
|
||||
labelLeftB0.Size = new Size(58, 32);
|
||||
labelLeftB0.TabIndex = 12;
|
||||
labelLeftB0.Text = "CPU";
|
||||
labelLeftCPU.AutoSize = true;
|
||||
labelLeftCPU.Location = new Point(10, 8);
|
||||
labelLeftCPU.Margin = new Padding(4, 0, 4, 0);
|
||||
labelLeftCPU.Name = "labelLeftCPU";
|
||||
labelLeftCPU.Size = new Size(58, 32);
|
||||
labelLeftCPU.TabIndex = 12;
|
||||
labelLeftCPU.Text = "CPU";
|
||||
//
|
||||
// trackB0
|
||||
// trackCPU
|
||||
//
|
||||
trackB0.Location = new Point(6, 44);
|
||||
trackB0.Margin = new Padding(4, 2, 4, 2);
|
||||
trackB0.Maximum = 85;
|
||||
trackB0.Minimum = 5;
|
||||
trackB0.Name = "trackB0";
|
||||
trackB0.Size = new Size(508, 90);
|
||||
trackB0.TabIndex = 11;
|
||||
trackB0.TickFrequency = 5;
|
||||
trackB0.TickStyle = TickStyle.TopLeft;
|
||||
trackB0.Value = 80;
|
||||
trackCPU.Location = new Point(6, 44);
|
||||
trackCPU.Margin = new Padding(4, 2, 4, 2);
|
||||
trackCPU.Maximum = 85;
|
||||
trackCPU.Minimum = 5;
|
||||
trackCPU.Name = "trackCPU";
|
||||
trackCPU.Size = new Size(508, 90);
|
||||
trackCPU.TabIndex = 11;
|
||||
trackCPU.TickFrequency = 5;
|
||||
trackCPU.TickStyle = TickStyle.TopLeft;
|
||||
trackCPU.Value = 80;
|
||||
//
|
||||
// panelC1
|
||||
// panelFast
|
||||
//
|
||||
panelC1.AutoSize = true;
|
||||
panelC1.AutoSizeMode = AutoSizeMode.GrowAndShrink;
|
||||
panelC1.Controls.Add(labelC1);
|
||||
panelC1.Controls.Add(labelLeftC1);
|
||||
panelC1.Controls.Add(trackC1);
|
||||
panelC1.Dock = DockStyle.Top;
|
||||
panelC1.Location = new Point(0, 556);
|
||||
panelC1.Margin = new Padding(4);
|
||||
panelC1.MaximumSize = new Size(0, 124);
|
||||
panelC1.Name = "panelC1";
|
||||
panelC1.Size = new Size(520, 124);
|
||||
panelC1.TabIndex = 45;
|
||||
panelFast.AutoSize = true;
|
||||
panelFast.AutoSizeMode = AutoSizeMode.GrowAndShrink;
|
||||
panelFast.Controls.Add(labelFast);
|
||||
panelFast.Controls.Add(labelLeftFast);
|
||||
panelFast.Controls.Add(trackFast);
|
||||
panelFast.Dock = DockStyle.Top;
|
||||
panelFast.Location = new Point(0, 556);
|
||||
panelFast.Margin = new Padding(4);
|
||||
panelFast.MaximumSize = new Size(0, 124);
|
||||
panelFast.Name = "panelFast";
|
||||
panelFast.Size = new Size(520, 124);
|
||||
panelFast.TabIndex = 45;
|
||||
//
|
||||
// labelC1
|
||||
// labelFast
|
||||
//
|
||||
labelC1.Font = new Font("Segoe UI", 9F, FontStyle.Bold, GraphicsUnit.Point);
|
||||
labelC1.Location = new Point(396, 8);
|
||||
labelC1.Margin = new Padding(4, 0, 4, 0);
|
||||
labelC1.Name = "labelC1";
|
||||
labelC1.Size = new Size(114, 32);
|
||||
labelC1.TabIndex = 13;
|
||||
labelC1.Text = "FPPT";
|
||||
labelC1.TextAlign = ContentAlignment.TopRight;
|
||||
labelFast.Font = new Font("Segoe UI", 9F, FontStyle.Bold, GraphicsUnit.Point);
|
||||
labelFast.Location = new Point(396, 8);
|
||||
labelFast.Margin = new Padding(4, 0, 4, 0);
|
||||
labelFast.Name = "labelFast";
|
||||
labelFast.Size = new Size(114, 32);
|
||||
labelFast.TabIndex = 13;
|
||||
labelFast.Text = "FPPT";
|
||||
labelFast.TextAlign = ContentAlignment.TopRight;
|
||||
//
|
||||
// labelLeftC1
|
||||
// labelLeftFast
|
||||
//
|
||||
labelLeftC1.AutoSize = true;
|
||||
labelLeftC1.Location = new Point(10, 8);
|
||||
labelLeftC1.Margin = new Padding(4, 0, 4, 0);
|
||||
labelLeftC1.Name = "labelLeftC1";
|
||||
labelLeftC1.Size = new Size(65, 32);
|
||||
labelLeftC1.TabIndex = 12;
|
||||
labelLeftC1.Text = "FPPT";
|
||||
labelLeftFast.AutoSize = true;
|
||||
labelLeftFast.Location = new Point(10, 8);
|
||||
labelLeftFast.Margin = new Padding(4, 0, 4, 0);
|
||||
labelLeftFast.Name = "labelLeftFast";
|
||||
labelLeftFast.Size = new Size(65, 32);
|
||||
labelLeftFast.TabIndex = 12;
|
||||
labelLeftFast.Text = "FPPT";
|
||||
//
|
||||
// trackC1
|
||||
// trackFast
|
||||
//
|
||||
trackC1.Location = new Point(6, 48);
|
||||
trackC1.Margin = new Padding(4, 2, 4, 2);
|
||||
trackC1.Maximum = 85;
|
||||
trackC1.Minimum = 5;
|
||||
trackC1.Name = "trackC1";
|
||||
trackC1.Size = new Size(508, 90);
|
||||
trackC1.TabIndex = 11;
|
||||
trackC1.TickFrequency = 5;
|
||||
trackC1.TickStyle = TickStyle.TopLeft;
|
||||
trackC1.Value = 80;
|
||||
trackFast.Location = new Point(6, 48);
|
||||
trackFast.Margin = new Padding(4, 2, 4, 2);
|
||||
trackFast.Maximum = 85;
|
||||
trackFast.Minimum = 5;
|
||||
trackFast.Name = "trackFast";
|
||||
trackFast.Size = new Size(508, 90);
|
||||
trackFast.TabIndex = 11;
|
||||
trackFast.TickFrequency = 5;
|
||||
trackFast.TickStyle = TickStyle.TopLeft;
|
||||
trackFast.Value = 80;
|
||||
//
|
||||
// panelA0
|
||||
// panelSlow
|
||||
//
|
||||
panelA0.AutoSize = true;
|
||||
panelA0.AutoSizeMode = AutoSizeMode.GrowAndShrink;
|
||||
panelA0.Controls.Add(labelA0);
|
||||
panelA0.Controls.Add(labelLeftA0);
|
||||
panelA0.Controls.Add(trackA0);
|
||||
panelA0.Dock = DockStyle.Top;
|
||||
panelA0.Location = new Point(0, 308);
|
||||
panelA0.Margin = new Padding(4);
|
||||
panelA0.MaximumSize = new Size(0, 124);
|
||||
panelA0.Name = "panelA0";
|
||||
panelA0.Size = new Size(520, 124);
|
||||
panelA0.TabIndex = 40;
|
||||
panelSlow.AutoSize = true;
|
||||
panelSlow.AutoSizeMode = AutoSizeMode.GrowAndShrink;
|
||||
panelSlow.Controls.Add(labelSlow);
|
||||
panelSlow.Controls.Add(labelLeftSlow);
|
||||
panelSlow.Controls.Add(trackSlow);
|
||||
panelSlow.Dock = DockStyle.Top;
|
||||
panelSlow.Location = new Point(0, 432);
|
||||
panelSlow.Margin = new Padding(4);
|
||||
panelSlow.MaximumSize = new Size(0, 124);
|
||||
panelSlow.Name = "panelSlow";
|
||||
panelSlow.Size = new Size(520, 124);
|
||||
panelSlow.TabIndex = 51;
|
||||
//
|
||||
// labelA0
|
||||
// labelSlow
|
||||
//
|
||||
labelA0.Font = new Font("Segoe UI", 9F, FontStyle.Bold, GraphicsUnit.Point);
|
||||
labelA0.Location = new Point(396, 10);
|
||||
labelA0.Margin = new Padding(4, 0, 4, 0);
|
||||
labelA0.Name = "labelA0";
|
||||
labelA0.Size = new Size(116, 32);
|
||||
labelA0.TabIndex = 12;
|
||||
labelA0.Text = "SPL";
|
||||
labelA0.TextAlign = ContentAlignment.TopRight;
|
||||
labelSlow.Font = new Font("Segoe UI", 9F, FontStyle.Bold, GraphicsUnit.Point);
|
||||
labelSlow.Location = new Point(396, 10);
|
||||
labelSlow.Margin = new Padding(4, 0, 4, 0);
|
||||
labelSlow.Name = "labelSlow";
|
||||
labelSlow.Size = new Size(116, 32);
|
||||
labelSlow.TabIndex = 12;
|
||||
labelSlow.Text = "SPPT";
|
||||
labelSlow.TextAlign = ContentAlignment.TopRight;
|
||||
//
|
||||
// labelLeftA0
|
||||
// labelLeftSlow
|
||||
//
|
||||
labelLeftA0.AutoSize = true;
|
||||
labelLeftA0.Location = new Point(10, 10);
|
||||
labelLeftA0.Margin = new Padding(4, 0, 4, 0);
|
||||
labelLeftA0.Name = "labelLeftA0";
|
||||
labelLeftA0.Size = new Size(51, 32);
|
||||
labelLeftA0.TabIndex = 11;
|
||||
labelLeftA0.Text = "SPL";
|
||||
labelLeftSlow.AutoSize = true;
|
||||
labelLeftSlow.Location = new Point(10, 10);
|
||||
labelLeftSlow.Margin = new Padding(4, 0, 4, 0);
|
||||
labelLeftSlow.Name = "labelLeftSlow";
|
||||
labelLeftSlow.Size = new Size(66, 32);
|
||||
labelLeftSlow.TabIndex = 11;
|
||||
labelLeftSlow.Text = "SPPT";
|
||||
//
|
||||
// trackA0
|
||||
// trackSlow
|
||||
//
|
||||
trackA0.Location = new Point(6, 48);
|
||||
trackA0.Margin = new Padding(4, 2, 4, 2);
|
||||
trackA0.Maximum = 180;
|
||||
trackA0.Minimum = 10;
|
||||
trackA0.Name = "trackA0";
|
||||
trackA0.Size = new Size(508, 90);
|
||||
trackA0.TabIndex = 10;
|
||||
trackA0.TickFrequency = 5;
|
||||
trackA0.TickStyle = TickStyle.TopLeft;
|
||||
trackA0.Value = 125;
|
||||
trackSlow.Location = new Point(6, 48);
|
||||
trackSlow.Margin = new Padding(4, 2, 4, 2);
|
||||
trackSlow.Maximum = 180;
|
||||
trackSlow.Minimum = 10;
|
||||
trackSlow.Name = "trackSlow";
|
||||
trackSlow.Size = new Size(508, 90);
|
||||
trackSlow.TabIndex = 10;
|
||||
trackSlow.TickFrequency = 5;
|
||||
trackSlow.TickStyle = TickStyle.TopLeft;
|
||||
trackSlow.Value = 125;
|
||||
//
|
||||
// panelTotal
|
||||
//
|
||||
panelTotal.AutoSize = true;
|
||||
panelTotal.AutoSizeMode = AutoSizeMode.GrowAndShrink;
|
||||
panelTotal.Controls.Add(labelTotal);
|
||||
panelTotal.Controls.Add(labelLeftTotal);
|
||||
panelTotal.Controls.Add(trackTotal);
|
||||
panelTotal.Dock = DockStyle.Top;
|
||||
panelTotal.Location = new Point(0, 308);
|
||||
panelTotal.Margin = new Padding(4);
|
||||
panelTotal.MaximumSize = new Size(0, 124);
|
||||
panelTotal.Name = "panelTotal";
|
||||
panelTotal.Size = new Size(520, 124);
|
||||
panelTotal.TabIndex = 40;
|
||||
//
|
||||
// labelTotal
|
||||
//
|
||||
labelTotal.Font = new Font("Segoe UI", 9F, FontStyle.Bold, GraphicsUnit.Point);
|
||||
labelTotal.Location = new Point(396, 10);
|
||||
labelTotal.Margin = new Padding(4, 0, 4, 0);
|
||||
labelTotal.Name = "labelTotal";
|
||||
labelTotal.Size = new Size(116, 32);
|
||||
labelTotal.TabIndex = 12;
|
||||
labelTotal.Text = "SPL";
|
||||
labelTotal.TextAlign = ContentAlignment.TopRight;
|
||||
//
|
||||
// labelLeftTotal
|
||||
//
|
||||
labelLeftTotal.AutoSize = true;
|
||||
labelLeftTotal.Location = new Point(10, 10);
|
||||
labelLeftTotal.Margin = new Padding(4, 0, 4, 0);
|
||||
labelLeftTotal.Name = "labelLeftTotal";
|
||||
labelLeftTotal.Size = new Size(51, 32);
|
||||
labelLeftTotal.TabIndex = 11;
|
||||
labelLeftTotal.Text = "SPL";
|
||||
//
|
||||
// trackTotal
|
||||
//
|
||||
trackTotal.Location = new Point(6, 48);
|
||||
trackTotal.Margin = new Padding(4, 2, 4, 2);
|
||||
trackTotal.Maximum = 180;
|
||||
trackTotal.Minimum = 10;
|
||||
trackTotal.Name = "trackTotal";
|
||||
trackTotal.Size = new Size(508, 90);
|
||||
trackTotal.TabIndex = 10;
|
||||
trackTotal.TickFrequency = 5;
|
||||
trackTotal.TickStyle = TickStyle.TopLeft;
|
||||
trackTotal.Value = 125;
|
||||
//
|
||||
// panelTitleCPU
|
||||
//
|
||||
@@ -1534,55 +1583,6 @@ namespace GHelper
|
||||
buttonCPU.TextImageRelation = TextImageRelation.ImageBeforeText;
|
||||
buttonCPU.UseVisualStyleBackColor = false;
|
||||
//
|
||||
// panelA3
|
||||
//
|
||||
panelA3.AutoSize = true;
|
||||
panelA3.AutoSizeMode = AutoSizeMode.GrowAndShrink;
|
||||
panelA3.Controls.Add(labelA3);
|
||||
panelA3.Controls.Add(labelLeftA3);
|
||||
panelA3.Controls.Add(trackA3);
|
||||
panelA3.Dock = DockStyle.Top;
|
||||
panelA3.Location = new Point(0, 432);
|
||||
panelA3.Margin = new Padding(4);
|
||||
panelA3.MaximumSize = new Size(0, 124);
|
||||
panelA3.Name = "panelA3";
|
||||
panelA3.Size = new Size(520, 124);
|
||||
panelA3.TabIndex = 51;
|
||||
//
|
||||
// labelA3
|
||||
//
|
||||
labelA3.Font = new Font("Segoe UI", 9F, FontStyle.Bold, GraphicsUnit.Point);
|
||||
labelA3.Location = new Point(396, 10);
|
||||
labelA3.Margin = new Padding(4, 0, 4, 0);
|
||||
labelA3.Name = "labelA3";
|
||||
labelA3.Size = new Size(116, 32);
|
||||
labelA3.TabIndex = 12;
|
||||
labelA3.Text = "SPPT";
|
||||
labelA3.TextAlign = ContentAlignment.TopRight;
|
||||
//
|
||||
// labelLeftA3
|
||||
//
|
||||
labelLeftA3.AutoSize = true;
|
||||
labelLeftA3.Location = new Point(10, 10);
|
||||
labelLeftA3.Margin = new Padding(4, 0, 4, 0);
|
||||
labelLeftA3.Name = "labelLeftA3";
|
||||
labelLeftA3.Size = new Size(66, 32);
|
||||
labelLeftA3.TabIndex = 11;
|
||||
labelLeftA3.Text = "SPPT";
|
||||
//
|
||||
// trackA3
|
||||
//
|
||||
trackA3.Location = new Point(6, 48);
|
||||
trackA3.Margin = new Padding(4, 2, 4, 2);
|
||||
trackA3.Maximum = 180;
|
||||
trackA3.Minimum = 10;
|
||||
trackA3.Name = "trackA3";
|
||||
trackA3.Size = new Size(508, 90);
|
||||
trackA3.TabIndex = 10;
|
||||
trackA3.TickFrequency = 5;
|
||||
trackA3.TickStyle = TickStyle.TopLeft;
|
||||
trackA3.Value = 125;
|
||||
//
|
||||
// Fans
|
||||
//
|
||||
AutoScaleDimensions = new SizeF(192F, 192F);
|
||||
@@ -1637,15 +1637,18 @@ namespace GHelper
|
||||
panelPower.ResumeLayout(false);
|
||||
panelPower.PerformLayout();
|
||||
panelApplyPower.ResumeLayout(false);
|
||||
panelB0.ResumeLayout(false);
|
||||
panelB0.PerformLayout();
|
||||
((System.ComponentModel.ISupportInitialize)trackB0).EndInit();
|
||||
panelC1.ResumeLayout(false);
|
||||
panelC1.PerformLayout();
|
||||
((System.ComponentModel.ISupportInitialize)trackC1).EndInit();
|
||||
panelA0.ResumeLayout(false);
|
||||
panelA0.PerformLayout();
|
||||
((System.ComponentModel.ISupportInitialize)trackA0).EndInit();
|
||||
panelCPU.ResumeLayout(false);
|
||||
panelCPU.PerformLayout();
|
||||
((System.ComponentModel.ISupportInitialize)trackCPU).EndInit();
|
||||
panelFast.ResumeLayout(false);
|
||||
panelFast.PerformLayout();
|
||||
((System.ComponentModel.ISupportInitialize)trackFast).EndInit();
|
||||
panelSlow.ResumeLayout(false);
|
||||
panelSlow.PerformLayout();
|
||||
((System.ComponentModel.ISupportInitialize)trackSlow).EndInit();
|
||||
panelTotal.ResumeLayout(false);
|
||||
panelTotal.PerformLayout();
|
||||
((System.ComponentModel.ISupportInitialize)trackTotal).EndInit();
|
||||
panelTitleCPU.ResumeLayout(false);
|
||||
panelTitleCPU.PerformLayout();
|
||||
((System.ComponentModel.ISupportInitialize)pictureBoxCPU).EndInit();
|
||||
@@ -1679,9 +1682,6 @@ namespace GHelper
|
||||
((System.ComponentModel.ISupportInitialize)pictureGPU).EndInit();
|
||||
panelNav.ResumeLayout(false);
|
||||
tableNav.ResumeLayout(false);
|
||||
panelA3.ResumeLayout(false);
|
||||
panelA3.PerformLayout();
|
||||
((System.ComponentModel.ISupportInitialize)trackA3).EndInit();
|
||||
ResumeLayout(false);
|
||||
PerformLayout();
|
||||
}
|
||||
@@ -1696,14 +1696,14 @@ namespace GHelper
|
||||
private Chart chartXGM;
|
||||
private Label labelTip;
|
||||
private Panel panelPower;
|
||||
private Panel panelB0;
|
||||
private Label labelB0;
|
||||
private Label labelLeftB0;
|
||||
private TrackBar trackB0;
|
||||
private Panel panelA0;
|
||||
private Label labelA0;
|
||||
private Label labelLeftA0;
|
||||
private TrackBar trackA0;
|
||||
private Panel panelCPU;
|
||||
private Label labelCPU;
|
||||
private Label labelLeftCPU;
|
||||
private TrackBar trackCPU;
|
||||
private Panel panelTotal;
|
||||
private Label labelTotal;
|
||||
private Label labelLeftTotal;
|
||||
private TrackBar trackTotal;
|
||||
private Panel panelTitleCPU;
|
||||
private PictureBox pictureBoxCPU;
|
||||
private Label labelPowerLimits;
|
||||
@@ -1737,10 +1737,10 @@ namespace GHelper
|
||||
private RComboBox comboBoost;
|
||||
private PictureBox picturePerf;
|
||||
private Label labelFans;
|
||||
private Panel panelC1;
|
||||
private Label labelC1;
|
||||
private Label labelLeftC1;
|
||||
private TrackBar trackC1;
|
||||
private Panel panelFast;
|
||||
private Label labelFast;
|
||||
private Label labelLeftFast;
|
||||
private TrackBar trackFast;
|
||||
private Panel panelBoost;
|
||||
private RComboBox comboModes;
|
||||
private RButton buttonAdd;
|
||||
@@ -1789,9 +1789,9 @@ namespace GHelper
|
||||
private TrackBar trackGPUClockLimit;
|
||||
private Label labelGPUClockLimitTitle;
|
||||
private RButton buttonCalibrate;
|
||||
private Panel panelA3;
|
||||
private Label labelA3;
|
||||
private Label labelLeftA3;
|
||||
private TrackBar trackA3;
|
||||
private Panel panelSlow;
|
||||
private Label labelSlow;
|
||||
private Label labelLeftSlow;
|
||||
private TrackBar trackSlow;
|
||||
}
|
||||
}
|
||||
108
app/Fans.cs
108
app/Fans.cs
@@ -5,6 +5,7 @@ using GHelper.UI;
|
||||
using GHelper.USB;
|
||||
using Ryzen;
|
||||
using System.Diagnostics;
|
||||
using System.Management;
|
||||
using System.Windows.Forms.DataVisualization.Charting;
|
||||
|
||||
namespace GHelper
|
||||
@@ -103,27 +104,27 @@ namespace GHelper
|
||||
|
||||
buttonReset.Click += ButtonReset_Click;
|
||||
|
||||
trackA0.Maximum = AsusACPI.MaxTotal;
|
||||
trackA0.Minimum = AsusACPI.MinTotal;
|
||||
trackTotal.Maximum = AsusACPI.MaxTotal;
|
||||
trackTotal.Minimum = AsusACPI.MinTotal;
|
||||
|
||||
trackA3.Maximum = AsusACPI.MaxTotal;
|
||||
trackA3.Minimum = AsusACPI.MinTotal;
|
||||
trackSlow.Maximum = AsusACPI.MaxTotal;
|
||||
trackSlow.Minimum = AsusACPI.MinTotal;
|
||||
|
||||
trackB0.Maximum = AsusACPI.MaxCPU;
|
||||
trackB0.Minimum = AsusACPI.MinCPU;
|
||||
trackCPU.Maximum = AsusACPI.MaxCPU;
|
||||
trackCPU.Minimum = AsusACPI.MinCPU;
|
||||
|
||||
trackC1.Maximum = AsusACPI.MaxTotal;
|
||||
trackC1.Minimum = AsusACPI.MinTotal;
|
||||
trackFast.Maximum = AsusACPI.MaxTotal;
|
||||
trackFast.Minimum = AsusACPI.MinTotal;
|
||||
|
||||
trackC1.Scroll += TrackPower_Scroll;
|
||||
trackB0.Scroll += TrackPower_Scroll;
|
||||
trackA0.Scroll += TrackPower_Scroll;
|
||||
trackA3.Scroll += TrackPower_Scroll;
|
||||
trackFast.Scroll += TrackPower_Scroll;
|
||||
trackCPU.Scroll += TrackPower_Scroll;
|
||||
trackTotal.Scroll += TrackPower_Scroll;
|
||||
trackSlow.Scroll += TrackPower_Scroll;
|
||||
|
||||
trackC1.MouseUp += TrackPower_MouseUp;
|
||||
trackB0.MouseUp += TrackPower_MouseUp;
|
||||
trackA0.MouseUp += TrackPower_MouseUp;
|
||||
trackA3.MouseUp += TrackPower_MouseUp;
|
||||
trackFast.MouseUp += TrackPower_MouseUp;
|
||||
trackCPU.MouseUp += TrackPower_MouseUp;
|
||||
trackTotal.MouseUp += TrackPower_MouseUp;
|
||||
trackSlow.MouseUp += TrackPower_MouseUp;
|
||||
|
||||
checkApplyFans.Click += CheckApplyFans_Click;
|
||||
checkApplyPower.Click += CheckApplyPower_Click;
|
||||
@@ -177,6 +178,7 @@ namespace GHelper
|
||||
|
||||
FillModes();
|
||||
InitAll();
|
||||
InitCPU();
|
||||
|
||||
comboBoost.SelectedValueChanged += ComboBoost_Changed;
|
||||
comboPowerMode.SelectedValueChanged += ComboPowerMode_Changed;
|
||||
@@ -267,6 +269,23 @@ namespace GHelper
|
||||
InitGPU();
|
||||
}
|
||||
|
||||
public void InitCPU()
|
||||
{
|
||||
Task.Run(async () =>
|
||||
{
|
||||
string CPUName;
|
||||
using (ManagementObjectSearcher myProcessorObject = new ManagementObjectSearcher("select * from Win32_Processor"))
|
||||
foreach (ManagementObject obj in myProcessorObject.Get())
|
||||
{
|
||||
CPUName = obj["Name"].ToString();
|
||||
Invoke(delegate
|
||||
{
|
||||
Text = Properties.Strings.FansAndPower + " - " + CPUName;
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
public void ToggleNavigation(int index = 0)
|
||||
{
|
||||
|
||||
@@ -789,42 +808,41 @@ namespace GHelper
|
||||
public void InitPower(bool changed = false)
|
||||
{
|
||||
|
||||
bool modeA0 = (Program.acpi.DeviceGet(AsusACPI.PPT_TotalA0) >= 0 || RyzenControl.IsAMD());
|
||||
bool modeA3 = Program.acpi.DeviceGet(AsusACPI.PPT_APUA3) >= 0;
|
||||
bool modeA = Program.acpi.DeviceGet(AsusACPI.PPT_APUA0) >= 0 || RyzenControl.IsAMD();
|
||||
bool modeB0 = Program.acpi.IsAllAmdPPT();
|
||||
bool modeC1 = Program.acpi.DeviceGet(AsusACPI.PPT_APUC1) >= 0;
|
||||
|
||||
panelA0.Visible = modeA0;
|
||||
panelB0.Visible = modeB0;
|
||||
panelTotal.Visible = modeA;
|
||||
panelCPU.Visible = modeB0;
|
||||
|
||||
panelApplyPower.Visible = panelTitleCPU.Visible = modeA0 || modeB0 || modeC1;
|
||||
panelApplyPower.Visible = panelTitleCPU.Visible = modeA || modeB0 || modeC1;
|
||||
|
||||
|
||||
// All AMD version has B0 but doesn't have C0 (Nvidia GPU) settings
|
||||
if (modeB0)
|
||||
{
|
||||
labelLeftA0.Text = "Platform (CPU + GPU)";
|
||||
labelLeftB0.Text = "CPU";
|
||||
panelC1.Visible = false;
|
||||
panelA3.Visible = false;
|
||||
labelLeftTotal.Text = "Platform (CPU + GPU)";
|
||||
labelLeftCPU.Text = "CPU";
|
||||
panelFast.Visible = false;
|
||||
panelSlow.Visible = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
panelA3.Visible = modeA3;
|
||||
panelSlow.Visible = modeA;
|
||||
|
||||
if (RyzenControl.IsAMD())
|
||||
{
|
||||
labelLeftA0.Text = "CPU Sustained (SPL)";
|
||||
labelLeftA3.Text = "CPU Slow (sPPT)";
|
||||
labelLeftC1.Text = "CPU Fast (fPPT)";
|
||||
panelC1.Visible = modeC1;
|
||||
labelLeftTotal.Text = "CPU Sustained (SPL)";
|
||||
labelLeftSlow.Text = "CPU Slow (sPPT)";
|
||||
labelLeftFast.Text = "CPU Fast (fPPT)";
|
||||
panelFast.Visible = modeC1;
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
labelLeftA0.Text = "CPU Slow (PL1)";
|
||||
labelLeftA3.Text = "CPU Fast (PL2)";
|
||||
panelC1.Visible = false;
|
||||
labelLeftTotal.Text = "CPU Slow (PL1)";
|
||||
labelLeftSlow.Text = "CPU Fast (PL2)";
|
||||
panelFast.Visible = false;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -838,10 +856,10 @@ namespace GHelper
|
||||
|
||||
if (changed)
|
||||
{
|
||||
limit_total = trackA0.Value;
|
||||
limit_slow = trackA3.Value;
|
||||
limit_cpu = trackB0.Value;
|
||||
limit_fast = trackC1.Value;
|
||||
limit_total = trackTotal.Value;
|
||||
limit_slow = trackSlow.Value;
|
||||
limit_cpu = trackCPU.Value;
|
||||
limit_fast = trackFast.Value;
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -868,17 +886,17 @@ namespace GHelper
|
||||
if (limit_fast > AsusACPI.MaxTotal) limit_fast = AsusACPI.MaxTotal;
|
||||
if (limit_fast < AsusACPI.MinTotal) limit_fast = AsusACPI.MinTotal;
|
||||
|
||||
trackA0.Value = limit_total;
|
||||
trackA3.Value = limit_slow;
|
||||
trackB0.Value = limit_cpu;
|
||||
trackC1.Value = limit_fast;
|
||||
trackTotal.Value = limit_total;
|
||||
trackSlow.Value = limit_slow;
|
||||
trackCPU.Value = limit_cpu;
|
||||
trackFast.Value = limit_fast;
|
||||
|
||||
checkApplyPower.Checked = apply;
|
||||
|
||||
labelA0.Text = trackA0.Value.ToString() + "W";
|
||||
labelA3.Text = trackA3.Value.ToString() + "W";
|
||||
labelB0.Text = trackB0.Value.ToString() + "W";
|
||||
labelC1.Text = trackC1.Value.ToString() + "W";
|
||||
labelTotal.Text = trackTotal.Value.ToString() + "W";
|
||||
labelSlow.Text = trackSlow.Value.ToString() + "W";
|
||||
labelCPU.Text = trackCPU.Value.ToString() + "W";
|
||||
labelFast.Text = trackFast.Value.ToString() + "W";
|
||||
|
||||
AppConfig.SetMode("limit_total", limit_total);
|
||||
AppConfig.SetMode("limit_slow", limit_slow);
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||
<ProduceReferenceAssembly>False</ProduceReferenceAssembly>
|
||||
<AllowUnsafeBlocks>True</AllowUnsafeBlocks>
|
||||
<AssemblyVersion>0.145</AssemblyVersion>
|
||||
<AssemblyVersion>0.147</AssemblyVersion>
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
|
||||
|
||||
@@ -551,6 +551,65 @@ public class Adl2
|
||||
int iAdapterIndex,
|
||||
int iEnabled);
|
||||
|
||||
// FPS
|
||||
|
||||
[DllImport(Atiadlxx_FileName)]
|
||||
public static extern int ADL2_Adapter_FrameMetrics_Start(
|
||||
IntPtr context,
|
||||
int iAdapterIndex,
|
||||
int VidPnSourceId
|
||||
);
|
||||
|
||||
[DllImport(Atiadlxx_FileName)]
|
||||
public static extern int ADL2_Adapter_FrameMetrics_Stop(
|
||||
IntPtr context,
|
||||
int iAdapterIndex,
|
||||
int VidPnSourceId
|
||||
);
|
||||
|
||||
[DllImport(Atiadlxx_FileName)]
|
||||
public static extern int ADL2_Adapter_FrameMetrics_Get(
|
||||
IntPtr context,
|
||||
int iAdapterIndex,
|
||||
int VidPnSourceId,
|
||||
out float iFramesPerSecond
|
||||
);
|
||||
|
||||
[DllImport(Atiadlxx_FileName)]
|
||||
public static extern int ADL2_FPS_Settings_Get(IntPtr context, int iAdapterIndex, out ADLFPSSettingsOutput lpFPSSettings);
|
||||
|
||||
[DllImport(Atiadlxx_FileName)]
|
||||
public static extern int ADL2_FPS_Settings_Set(IntPtr context, int iAdapterIndex, ADLFPSSettingsInput lpFPSSettings);
|
||||
|
||||
[DllImport(Atiadlxx_FileName)]
|
||||
public static extern int ADL2_FPS_Settings_Reset(IntPtr context, int iAdapterIndex);
|
||||
|
||||
[StructLayout(LayoutKind.Sequential)]
|
||||
public struct ADLFPSSettingsOutput
|
||||
{
|
||||
public int ulSize;
|
||||
public int bACFPSEnabled;
|
||||
public int bDCFPSEnabled;
|
||||
public int ulACFPSCurrent;
|
||||
public int ulDCFPSCurrent;
|
||||
public int ulACFPSMaximum;
|
||||
public int ulACFPSMinimum;
|
||||
public int ulDCFPSMaximum;
|
||||
public int ulDCFPSMinimum;
|
||||
}
|
||||
|
||||
[StructLayout(LayoutKind.Sequential)]
|
||||
public struct ADLFPSSettingsInput
|
||||
{
|
||||
public int ulSize;
|
||||
public int bGlobalSettings;
|
||||
public int ulACFPSCurrent;
|
||||
public int ulDCFPSCurrent;
|
||||
|
||||
// Assuming ulReserved is an array of 6 integers
|
||||
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 6)]
|
||||
public int[] ulReserved;
|
||||
}
|
||||
// Clocks
|
||||
|
||||
[StructLayout(LayoutKind.Sequential)]
|
||||
|
||||
@@ -9,7 +9,9 @@ public class AmdGpuControl : IGpuControl
|
||||
{
|
||||
private bool _isReady;
|
||||
private nint _adlContextHandle;
|
||||
|
||||
private readonly ADLAdapterInfo _internalDiscreteAdapter;
|
||||
private readonly ADLAdapterInfo? _iGPU;
|
||||
|
||||
public bool IsNvidia => false;
|
||||
|
||||
@@ -74,6 +76,8 @@ public class AmdGpuControl : IGpuControl
|
||||
_isReady = true;
|
||||
}
|
||||
|
||||
_iGPU = FindByType(ADLAsicFamilyType.Integrated);
|
||||
|
||||
}
|
||||
|
||||
public bool IsValid => _isReady && _adlContextHandle != nint.Zero;
|
||||
@@ -139,6 +143,49 @@ public class AmdGpuControl : IGpuControl
|
||||
return true;
|
||||
}
|
||||
|
||||
public void StartFPS()
|
||||
{
|
||||
if (_adlContextHandle == nint.Zero || _iGPU == null) return;
|
||||
ADL2_Adapter_FrameMetrics_Start(_adlContextHandle, ((ADLAdapterInfo)_iGPU).AdapterIndex, 0);
|
||||
}
|
||||
|
||||
public void StopFPS()
|
||||
{
|
||||
if (_adlContextHandle == nint.Zero || _iGPU == null) return;
|
||||
ADL2_Adapter_FrameMetrics_Stop(_adlContextHandle, ((ADLAdapterInfo)_iGPU).AdapterIndex, 0);
|
||||
}
|
||||
|
||||
public float GetFPS()
|
||||
{
|
||||
if (_adlContextHandle == nint.Zero || _iGPU == null) return 0;
|
||||
float fps;
|
||||
if (ADL2_Adapter_FrameMetrics_Get(_adlContextHandle, ((ADLAdapterInfo)_iGPU).AdapterIndex, 0, out fps) != Adl2.ADL_SUCCESS) return 0;
|
||||
return fps;
|
||||
}
|
||||
|
||||
public int GetFPSLimit()
|
||||
{
|
||||
if (_adlContextHandle == nint.Zero || _iGPU == null) return -1;
|
||||
ADLFPSSettingsOutput settings;
|
||||
if (ADL2_FPS_Settings_Get(_adlContextHandle, ((ADLAdapterInfo)_iGPU).AdapterIndex, out settings) != Adl2.ADL_SUCCESS) return -1;
|
||||
return settings.ulACFPSCurrent;
|
||||
}
|
||||
|
||||
public int SetFPSLimit(int limit)
|
||||
{
|
||||
if (_adlContextHandle == nint.Zero || _iGPU == null) return -1;
|
||||
|
||||
ADLFPSSettingsInput settings = new ADLFPSSettingsInput();
|
||||
|
||||
settings.ulACFPSCurrent = limit;
|
||||
settings.ulDCFPSCurrent = limit;
|
||||
settings.bGlobalSettings = 1;
|
||||
|
||||
if (ADL2_FPS_Settings_Set(_adlContextHandle, ((ADLAdapterInfo)_iGPU).AdapterIndex, settings) != Adl2.ADL_SUCCESS) return 0;
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
public ADLODNPerformanceLevels? GetGPUClocks()
|
||||
{
|
||||
if (!IsValid) return null;
|
||||
|
||||
@@ -1,7 +1,4 @@
|
||||
using Microsoft.Win32;
|
||||
using System.Diagnostics;
|
||||
using System.Text;
|
||||
using System.Text.RegularExpressions;
|
||||
using System.Diagnostics;
|
||||
|
||||
namespace GHelper.Helpers
|
||||
{
|
||||
@@ -21,35 +18,6 @@ namespace GHelper.Helpers
|
||||
"AsusCertService"
|
||||
};
|
||||
|
||||
public static void SetChargeLimit(int newValue)
|
||||
{
|
||||
// Set the path to the .ini file
|
||||
string path = @"C:\ProgramData\ASUS\ASUS System Control Interface\ASUSOptimization\Customization.ini";
|
||||
|
||||
|
||||
// Make a backup copy of the INI file
|
||||
string backupPath = path + ".bak";
|
||||
File.Copy(path, backupPath, true);
|
||||
|
||||
string fileContents = File.ReadAllText(path, Encoding.Unicode);
|
||||
|
||||
// Find the section [BatteryHealthCharging]
|
||||
string sectionPattern = @"\[BatteryHealthCharging\]\s*(version=\d+)?\s+value=(\d+)";
|
||||
Match sectionMatch = Regex.Match(fileContents, sectionPattern);
|
||||
if (sectionMatch.Success)
|
||||
{
|
||||
// Replace the value with the new value
|
||||
string oldValueString = sectionMatch.Groups[2].Value;
|
||||
int oldValue = int.Parse(oldValueString);
|
||||
string newSection = sectionMatch.Value.Replace($"value={oldValue}", $"value={newValue}");
|
||||
|
||||
// Replace the section in the file contents
|
||||
fileContents = fileContents.Replace(sectionMatch.Value, newSection);
|
||||
|
||||
File.WriteAllText(path, fileContents, Encoding.Unicode);
|
||||
}
|
||||
}
|
||||
|
||||
public static bool IsRunning()
|
||||
{
|
||||
return Process.GetProcessesByName("AsusOptimization").Count() > 0;
|
||||
@@ -72,25 +40,6 @@ namespace GHelper.Helpers
|
||||
}
|
||||
|
||||
|
||||
public static void SetBacklightOffDelay(int value = 60)
|
||||
{
|
||||
try
|
||||
{
|
||||
RegistryKey myKey = Registry.LocalMachine.OpenSubKey(@"SOFTWARE\ASUS\ASUS System Control Interface\AsusOptimization\ASUS Keyboard Hotkeys", true);
|
||||
if (myKey != null)
|
||||
{
|
||||
myKey.SetValue("TurnOffKeybdLight", value, RegistryValueKind.DWord);
|
||||
myKey.Close();
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Logger.WriteLine(ex.Message);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
public static void StopAsusServices()
|
||||
{
|
||||
foreach (string service in services)
|
||||
|
||||
@@ -7,17 +7,27 @@ namespace GHelper.Input
|
||||
{
|
||||
|
||||
CancellationTokenSource cancellationTokenSource = new CancellationTokenSource();
|
||||
Action<int> _handler;
|
||||
|
||||
public KeyboardListener(Action<int> KeyHandler)
|
||||
{
|
||||
_handler = KeyHandler;
|
||||
Listen();
|
||||
}
|
||||
|
||||
private void Listen () {
|
||||
|
||||
HidStream? input = AsusHid.FindHidStream(AsusHid.INPUT_ID);
|
||||
|
||||
|
||||
// Fallback
|
||||
if (input == null)
|
||||
|
||||
int count = 0;
|
||||
|
||||
while (input == null && count++ < 60)
|
||||
{
|
||||
Aura.Init();
|
||||
Thread.Sleep(1000);
|
||||
input = input = AsusHid.FindHidStream(AsusHid.INPUT_ID);
|
||||
input = AsusHid.FindHidStream(AsusHid.INPUT_ID);
|
||||
}
|
||||
|
||||
if (input == null)
|
||||
@@ -48,7 +58,7 @@ namespace GHelper.Input
|
||||
if (data.Length > 1 && data[0] == AsusHid.INPUT_ID && data[1] > 0 && data[1] != 236)
|
||||
{
|
||||
Logger.WriteLine($"Key: {data[1]}");
|
||||
KeyHandler(data[1]);
|
||||
_handler(data[1]);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -171,7 +171,7 @@ namespace GHelper.Mode
|
||||
Task.Run(async () =>
|
||||
{
|
||||
await Task.Delay(TimeSpan.FromSeconds(1));
|
||||
Program.acpi.DeviceSet(AsusACPI.PPT_TotalA0, 80, "PowerLimit Fix A0");
|
||||
Program.acpi.DeviceSet(AsusACPI.PPT_APUA0, 80, "PowerLimit Fix A0");
|
||||
Program.acpi.DeviceSet(AsusACPI.PPT_APUA3, 80, "PowerLimit Fix A3");
|
||||
});
|
||||
}
|
||||
@@ -261,10 +261,10 @@ namespace GHelper.Mode
|
||||
if (limit_slow < AsusACPI.MinTotal) return;
|
||||
|
||||
// SPL and SPPT
|
||||
if (Program.acpi.DeviceGet(AsusACPI.PPT_TotalA0) >= 0)
|
||||
if (Program.acpi.DeviceGet(AsusACPI.PPT_APUA0) >= 0)
|
||||
{
|
||||
Program.acpi.DeviceSet(AsusACPI.PPT_TotalA0, limit_total, "PowerLimit A0");
|
||||
Program.acpi.DeviceSet(AsusACPI.PPT_APUA3, limit_slow, "PowerLimit A3");
|
||||
Program.acpi.DeviceSet(AsusACPI.PPT_APUA3, limit_total, "PowerLimit A3");
|
||||
Program.acpi.DeviceSet(AsusACPI.PPT_APUA0, limit_slow, "PowerLimit A0");
|
||||
customPower = limit_total;
|
||||
}
|
||||
else if (RyzenControl.IsAMD())
|
||||
|
||||
106
app/Peripherals/Mouse/Models/SpathaX.cs
Normal file
106
app/Peripherals/Mouse/Models/SpathaX.cs
Normal file
@@ -0,0 +1,106 @@
|
||||
|
||||
namespace GHelper.Peripherals.Mouse.Models
|
||||
{
|
||||
//SPATHA_WIRELESS
|
||||
public class SpathaX : AsusMouse
|
||||
{
|
||||
public SpathaX() : base(0x0B05, 0x1979, "mi_00", true)
|
||||
{
|
||||
}
|
||||
|
||||
protected SpathaX(ushort vendorId, bool wireless) : base(0x0B05, vendorId, "mi_00", wireless)
|
||||
{
|
||||
}
|
||||
|
||||
public override string GetDisplayName()
|
||||
{
|
||||
return "ROG Spatha X (Wireless)";
|
||||
}
|
||||
|
||||
public override PollingRate[] SupportedPollingrates()
|
||||
{
|
||||
return new PollingRate[] {
|
||||
PollingRate.PR250Hz,
|
||||
PollingRate.PR500Hz,
|
||||
PollingRate.PR1000Hz
|
||||
};
|
||||
}
|
||||
|
||||
public override bool HasAngleSnapping()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
public override int ProfileCount()
|
||||
{
|
||||
return 5;
|
||||
}
|
||||
|
||||
public override int DPIProfileCount()
|
||||
{
|
||||
return 4;
|
||||
}
|
||||
|
||||
public override int MaxDPI()
|
||||
{
|
||||
return 19_000;
|
||||
}
|
||||
|
||||
public override bool HasXYDPI()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
public override bool HasDebounceSetting()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
public override bool HasLiftOffSetting()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
public override bool HasRGB()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
public override LightingZone[] SupportedLightingZones()
|
||||
{
|
||||
return new LightingZone[] { LightingZone.Logo, LightingZone.Scrollwheel, LightingZone.Underglow };
|
||||
}
|
||||
|
||||
public override bool HasAutoPowerOff()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
public override bool HasAngleTuning()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
public override bool HasLowBatteryWarning()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
public override bool HasDPIColors()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
public class SpathaXWired : SpathaX
|
||||
{
|
||||
public SpathaXWired() : base(0x1977, false)
|
||||
{
|
||||
}
|
||||
|
||||
public override string GetDisplayName()
|
||||
{
|
||||
return "ROG Spatha X (Wired)";
|
||||
}
|
||||
}
|
||||
}
|
||||
179
app/Peripherals/Mouse/Models/StrixCarry.cs
Normal file
179
app/Peripherals/Mouse/Models/StrixCarry.cs
Normal file
@@ -0,0 +1,179 @@
|
||||
namespace GHelper.Peripherals.Mouse.Models
|
||||
{
|
||||
//P508
|
||||
public class StrixCarry : AsusMouse
|
||||
{
|
||||
public StrixCarry() : base(0x0B05, 0x18B4, "mi_01", true)
|
||||
{
|
||||
}
|
||||
|
||||
public override int DPIProfileCount()
|
||||
{
|
||||
return 2;
|
||||
}
|
||||
|
||||
public override string GetDisplayName()
|
||||
{
|
||||
return "ROG Strix Carry (Wireless)";
|
||||
}
|
||||
|
||||
public override PollingRate[] SupportedPollingrates()
|
||||
{
|
||||
return new PollingRate[] {
|
||||
PollingRate.PR125Hz,
|
||||
PollingRate.PR250Hz,
|
||||
PollingRate.PR500Hz,
|
||||
PollingRate.PR1000Hz
|
||||
};
|
||||
}
|
||||
|
||||
public override int ProfileCount()
|
||||
{
|
||||
return 3;
|
||||
}
|
||||
public override int MaxDPI()
|
||||
{
|
||||
return 7_200;
|
||||
}
|
||||
public override int DPIIncrements()
|
||||
{
|
||||
return 100;
|
||||
}
|
||||
|
||||
public override bool HasDebounceSetting()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
public override bool HasLiftOffSetting()
|
||||
{
|
||||
//Potentially does nothing. AC does not show the setting, but the mouse responds to it and stores it.
|
||||
return true;
|
||||
}
|
||||
|
||||
public override bool HasRGB()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
public override bool HasAutoPowerOff()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
public override bool HasAngleSnapping()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
public override bool HasXYDPI()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
public override bool CanChangeDPIProfile()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
//Has 25% increments only.
|
||||
protected override int ParseBattery(byte[] packet)
|
||||
{
|
||||
if (packet[1] == 0x12 && packet[2] == 0x07)
|
||||
{
|
||||
return packet[7] * 25;
|
||||
}
|
||||
|
||||
return -1;
|
||||
}
|
||||
|
||||
protected override PowerOffSetting ParsePowerOffSetting(byte[] packet)
|
||||
{
|
||||
if (packet[1] == 0x12 && packet[2] == 0x07)
|
||||
{
|
||||
return (PowerOffSetting)packet[5];
|
||||
}
|
||||
|
||||
return PowerOffSetting.Never;
|
||||
}
|
||||
|
||||
protected override PollingRate ParsePollingRate(byte[] packet)
|
||||
{
|
||||
if (packet[1] == 0x12 && packet[2] == 0x04 && packet[3] == 0x00)
|
||||
{
|
||||
return (PollingRate)packet[9];
|
||||
}
|
||||
|
||||
return PollingRate.PR125Hz;
|
||||
}
|
||||
|
||||
protected override byte[] GetUpdatePollingRatePacket(PollingRate pollingRate)
|
||||
{
|
||||
return new byte[] { reportId, 0x51, 0x31, 0x02, 0x00, (byte)pollingRate };
|
||||
}
|
||||
|
||||
protected override bool ParseAngleSnapping(byte[] packet)
|
||||
{
|
||||
if (packet[1] == 0x12 && packet[2] == 0x04 && packet[3] == 0x00)
|
||||
{
|
||||
return packet[13] == 0x01;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
protected override byte[] GetUpdateAngleSnappingPacket(bool angleSnapping)
|
||||
{
|
||||
return new byte[] { reportId, 0x51, 0x31, 0x04, 0x00, (byte)(angleSnapping ? 0x01 : 0x00) };
|
||||
}
|
||||
|
||||
protected override DebounceTime ParseDebounce(byte[] packet)
|
||||
{
|
||||
if (packet[1] != 0x12 || packet[2] != 0x04 || packet[3] != 0x00)
|
||||
{
|
||||
return DebounceTime.MS12;
|
||||
}
|
||||
|
||||
if (packet[11] < 0x02)
|
||||
{
|
||||
return DebounceTime.MS12;
|
||||
}
|
||||
|
||||
if (packet[11] > 0x07)
|
||||
{
|
||||
return DebounceTime.MS32;
|
||||
}
|
||||
|
||||
return (DebounceTime)packet[11];
|
||||
}
|
||||
|
||||
protected override byte[] GetUpdateDebouncePacket(DebounceTime debounce)
|
||||
{
|
||||
return new byte[] { reportId, 0x51, 0x31, 0x03, 0x00, ((byte)debounce) };
|
||||
}
|
||||
|
||||
protected override int ParseProfile(byte[] packet)
|
||||
{
|
||||
if (packet[1] == 0x12 && packet[2] == 0x00 && packet[3] == 0x00)
|
||||
{
|
||||
return packet[10];
|
||||
}
|
||||
Logger.WriteLine(GetDisplayName() + ": Failed to decode active profile");
|
||||
return 0;
|
||||
}
|
||||
|
||||
protected override int ParseDPIProfile(byte[] packet)
|
||||
{
|
||||
if (packet[1] == 0x12 && packet[2] == 0x00 && packet[3] == 0x00)
|
||||
{
|
||||
return packet[11];
|
||||
}
|
||||
Logger.WriteLine(GetDisplayName() + ": Failed to decode active profile");
|
||||
return 1;
|
||||
}
|
||||
|
||||
protected override byte[] GetUpdateEnergySettingsPacket(int lowBatteryWarning, PowerOffSetting powerOff)
|
||||
{
|
||||
return new byte[] { 0x00, 0x51, 0x37, 0x00, 0x00, (byte)powerOff, 0x00, (byte)lowBatteryWarning };
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -212,6 +212,8 @@ namespace GHelper.Peripherals
|
||||
DetectMouse(new Chakram());
|
||||
DetectMouse(new ChakramWired());
|
||||
DetectMouse(new ChakramCore());
|
||||
DetectMouse(new SpathaX());
|
||||
DetectMouse(new StrixCarry());
|
||||
}
|
||||
|
||||
public static void DetectMouse(AsusMouse am)
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
using GHelper.Ally;
|
||||
using GHelper.Battery;
|
||||
using GHelper.Display;
|
||||
using GHelper.Gpu;
|
||||
@@ -30,6 +31,7 @@ namespace GHelper
|
||||
|
||||
public static ModeControl modeControl = new ModeControl();
|
||||
public static GPUModeControl gpuControl = new GPUModeControl(settingsForm);
|
||||
public static AllyControl allyControl = new AllyControl(settingsForm);
|
||||
public static ScreenControl screenControl = new ScreenControl();
|
||||
public static ClamshellModeControl clamshellControl = new ClamshellModeControl();
|
||||
|
||||
@@ -225,6 +227,8 @@ namespace GHelper
|
||||
|
||||
settingsForm.AutoKeyboard();
|
||||
settingsForm.matrixControl.SetMatrix(true);
|
||||
|
||||
allyControl.Init();
|
||||
}
|
||||
|
||||
private static void SystemEvents_PowerModeChanged(object sender, PowerModeChangedEventArgs e)
|
||||
|
||||
10
app/Properties/Resources.Designer.cs
generated
10
app/Properties/Resources.Designer.cs
generated
@@ -220,6 +220,16 @@ namespace GHelper.Properties {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
||||
/// </summary>
|
||||
internal static System.Drawing.Bitmap icons8_controller_32 {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("icons8-controller-32", resourceCulture);
|
||||
return ((System.Drawing.Bitmap)(obj));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
||||
/// </summary>
|
||||
|
||||
@@ -133,6 +133,9 @@
|
||||
<data name="icons8-hibernate-32" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\icons8-hibernate-32.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="MFont" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\Font.otf;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name="icons8-quit-32" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\icons8-quit-32.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
@@ -148,6 +151,9 @@
|
||||
<data name="icons8-project-management-48 (1)" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\icons8-project-management-48 (1).png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="dot_standard" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\dot-standard.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="icons8-charging-battery-32" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\icons8-charging-battery-32.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
@@ -214,6 +220,9 @@
|
||||
<data name="icons8-rocket-48" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\icons8-rocket-48.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="dot_ultimate" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\dot-ultimate.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="icons8_edit_32" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\icons8-edit-32.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
@@ -277,6 +286,9 @@
|
||||
<data name="icons8-settings-32" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\icons8-settings-32.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="dot_eco" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\dot-eco.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="icons8_processor_32" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\icons8-processor-32.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
@@ -289,16 +301,7 @@
|
||||
<data name="icons8_rocket_32" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\icons8-rocket-32.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="MFont" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\Font.otf;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name="dot_eco" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\dot-eco.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="dot_standard" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\dot-standard.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="dot_ultimate" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\dot-ultimate.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
<data name="icons8-controller-32" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\icons8-controller-32.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
</root>
|
||||
@@ -124,10 +124,10 @@
|
||||
<value>Não foi possível conectar ao ASUS ACPI. O programa não funciona sem esse serviço. Tente instalar Asus System Control Interface</value>
|
||||
</data>
|
||||
<data name="AlertAPUMemoryRestart" xml:space="preserve">
|
||||
<value>Restart your device to apply changes</value>
|
||||
<value>Reinicie o dispositivo para aplicar as alterações</value>
|
||||
</data>
|
||||
<data name="AlertAPUMemoryRestartTitle" xml:space="preserve">
|
||||
<value>Restart now?</value>
|
||||
<value>Reiniciar agora?</value>
|
||||
</data>
|
||||
<data name="AlertDGPU" xml:space="preserve">
|
||||
<value>Parece que o GPU está em uso pesado, desativá-lo?</value>
|
||||
@@ -169,7 +169,7 @@
|
||||
<value>Ajuste automático dos modos de energia do Windows</value>
|
||||
</data>
|
||||
<data name="APUMemory" xml:space="preserve">
|
||||
<value>Memory Assigned to GPU</value>
|
||||
<value>Memória Alocada à GPU</value>
|
||||
</data>
|
||||
<data name="AsusServicesRunning" xml:space="preserve">
|
||||
<value>Serviços da Asus em execução</value>
|
||||
@@ -250,10 +250,10 @@
|
||||
<value>Tempo limite ligado à corrente / na bateria (0 - ON)</value>
|
||||
</data>
|
||||
<data name="BacklightTimeoutBattery" xml:space="preserve">
|
||||
<value>Backlight Timeout when on battery</value>
|
||||
<value>Desligar o ecrã após (em Bateria)</value>
|
||||
</data>
|
||||
<data name="BacklightTimeoutPlugged" xml:space="preserve">
|
||||
<value>Backlight Timeout when plugged</value>
|
||||
<value>Desligar o ecrã após (ligado à corrente)</value>
|
||||
</data>
|
||||
<data name="Balanced" xml:space="preserve">
|
||||
<value>Equilibrado</value>
|
||||
|
||||
BIN
app/Resources/icons8-controller-32.png
Normal file
BIN
app/Resources/icons8-controller-32.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 396 B |
207
app/Settings.Designer.cs
generated
207
app/Settings.Designer.cs
generated
@@ -108,6 +108,15 @@ namespace GHelper
|
||||
panelPeripheralsTile = new Panel();
|
||||
picturePeripherals = new PictureBox();
|
||||
labelPeripherals = new Label();
|
||||
panelAlly = new Panel();
|
||||
tableLayoutAlly = new TableLayoutPanel();
|
||||
buttonBacklight = new RButton();
|
||||
buttonController = new RButton();
|
||||
panelAllyTitle = new Panel();
|
||||
pictureAlly = new PictureBox();
|
||||
labelAlly = new Label();
|
||||
tableAMD = new TableLayoutPanel();
|
||||
buttonFPS = new RButton();
|
||||
panelMatrix.SuspendLayout();
|
||||
tableLayoutMatrix.SuspendLayout();
|
||||
panelMatrixTitle.SuspendLayout();
|
||||
@@ -141,6 +150,11 @@ namespace GHelper
|
||||
tableLayoutPeripherals.SuspendLayout();
|
||||
panelPeripheralsTile.SuspendLayout();
|
||||
((System.ComponentModel.ISupportInitialize)picturePeripherals).BeginInit();
|
||||
panelAlly.SuspendLayout();
|
||||
tableLayoutAlly.SuspendLayout();
|
||||
panelAllyTitle.SuspendLayout();
|
||||
((System.ComponentModel.ISupportInitialize)pictureAlly).BeginInit();
|
||||
tableAMD.SuspendLayout();
|
||||
SuspendLayout();
|
||||
//
|
||||
// panelMatrix
|
||||
@@ -152,7 +166,7 @@ namespace GHelper
|
||||
panelMatrix.Controls.Add(panelMatrixTitle);
|
||||
panelMatrix.Controls.Add(checkMatrix);
|
||||
panelMatrix.Dock = DockStyle.Top;
|
||||
panelMatrix.Location = new Point(11, 747);
|
||||
panelMatrix.Location = new Point(11, 827);
|
||||
panelMatrix.Margin = new Padding(0);
|
||||
panelMatrix.Name = "panelMatrix";
|
||||
panelMatrix.Padding = new Padding(20, 20, 20, 10);
|
||||
@@ -282,7 +296,7 @@ namespace GHelper
|
||||
panelBattery.Controls.Add(sliderBattery);
|
||||
panelBattery.Controls.Add(panelBatteryTitle);
|
||||
panelBattery.Dock = DockStyle.Top;
|
||||
panelBattery.Location = new Point(11, 1265);
|
||||
panelBattery.Location = new Point(11, 1485);
|
||||
panelBattery.Margin = new Padding(0);
|
||||
panelBattery.Name = "panelBattery";
|
||||
panelBattery.Padding = new Padding(20, 20, 20, 10);
|
||||
@@ -374,7 +388,7 @@ namespace GHelper
|
||||
panelFooter.AutoSizeMode = AutoSizeMode.GrowAndShrink;
|
||||
panelFooter.Controls.Add(tableButtons);
|
||||
panelFooter.Dock = DockStyle.Top;
|
||||
panelFooter.Location = new Point(11, 1440);
|
||||
panelFooter.Location = new Point(11, 1660);
|
||||
panelFooter.Margin = new Padding(0);
|
||||
panelFooter.Name = "panelFooter";
|
||||
panelFooter.Padding = new Padding(20);
|
||||
@@ -649,6 +663,7 @@ namespace GHelper
|
||||
panelGPU.AutoSize = true;
|
||||
panelGPU.AutoSizeMode = AutoSizeMode.GrowAndShrink;
|
||||
panelGPU.Controls.Add(labelTipGPU);
|
||||
panelGPU.Controls.Add(tableAMD);
|
||||
panelGPU.Controls.Add(tableGPU);
|
||||
panelGPU.Controls.Add(panelGPUTitle);
|
||||
panelGPU.Dock = DockStyle.Top;
|
||||
@@ -656,7 +671,7 @@ namespace GHelper
|
||||
panelGPU.Margin = new Padding(0);
|
||||
panelGPU.Name = "panelGPU";
|
||||
panelGPU.Padding = new Padding(20, 20, 20, 0);
|
||||
panelGPU.Size = new Size(827, 352);
|
||||
panelGPU.Size = new Size(827, 432);
|
||||
panelGPU.TabIndex = 1;
|
||||
panelGPU.TabStop = true;
|
||||
//
|
||||
@@ -664,7 +679,7 @@ namespace GHelper
|
||||
//
|
||||
labelTipGPU.Dock = DockStyle.Top;
|
||||
labelTipGPU.ForeColor = SystemColors.GrayText;
|
||||
labelTipGPU.Location = new Point(20, 316);
|
||||
labelTipGPU.Location = new Point(20, 396);
|
||||
labelTipGPU.Margin = new Padding(4, 0, 4, 0);
|
||||
labelTipGPU.Name = "labelTipGPU";
|
||||
labelTipGPU.Size = new Size(787, 36);
|
||||
@@ -885,7 +900,7 @@ namespace GHelper
|
||||
panelScreen.Controls.Add(tableScreen);
|
||||
panelScreen.Controls.Add(panelScreenTitle);
|
||||
panelScreen.Dock = DockStyle.Top;
|
||||
panelScreen.Location = new Point(11, 571);
|
||||
panelScreen.Location = new Point(11, 651);
|
||||
panelScreen.Margin = new Padding(0);
|
||||
panelScreen.Name = "panelScreen";
|
||||
panelScreen.Padding = new Padding(20, 20, 20, 0);
|
||||
@@ -1056,7 +1071,7 @@ namespace GHelper
|
||||
panelKeyboard.Controls.Add(tableLayoutKeyboard);
|
||||
panelKeyboard.Controls.Add(panelKeyboardTitle);
|
||||
panelKeyboard.Dock = DockStyle.Top;
|
||||
panelKeyboard.Location = new Point(11, 923);
|
||||
panelKeyboard.Location = new Point(11, 1143);
|
||||
panelKeyboard.Margin = new Padding(0);
|
||||
panelKeyboard.Name = "panelKeyboard";
|
||||
panelKeyboard.Padding = new Padding(20);
|
||||
@@ -1232,7 +1247,7 @@ namespace GHelper
|
||||
panelVersion.Controls.Add(labelCharge);
|
||||
panelVersion.Controls.Add(checkStartup);
|
||||
panelVersion.Dock = DockStyle.Top;
|
||||
panelVersion.Location = new Point(11, 1384);
|
||||
panelVersion.Location = new Point(11, 1604);
|
||||
panelVersion.Margin = new Padding(4);
|
||||
panelVersion.Name = "panelVersion";
|
||||
panelVersion.Size = new Size(827, 56);
|
||||
@@ -1257,7 +1272,7 @@ namespace GHelper
|
||||
panelPeripherals.Controls.Add(tableLayoutPeripherals);
|
||||
panelPeripherals.Controls.Add(panelPeripheralsTile);
|
||||
panelPeripherals.Dock = DockStyle.Top;
|
||||
panelPeripherals.Location = new Point(11, 1067);
|
||||
panelPeripherals.Location = new Point(11, 1287);
|
||||
panelPeripherals.Margin = new Padding(0);
|
||||
panelPeripherals.Name = "panelPeripherals";
|
||||
panelPeripherals.Padding = new Padding(20, 20, 20, 10);
|
||||
@@ -1391,18 +1406,173 @@ namespace GHelper
|
||||
labelPeripherals.TabIndex = 40;
|
||||
labelPeripherals.Text = "Peripherals";
|
||||
//
|
||||
// panelAlly
|
||||
//
|
||||
panelAlly.AccessibleRole = AccessibleRole.Grouping;
|
||||
panelAlly.AutoSize = true;
|
||||
panelAlly.AutoSizeMode = AutoSizeMode.GrowAndShrink;
|
||||
panelAlly.Controls.Add(tableLayoutAlly);
|
||||
panelAlly.Controls.Add(panelAllyTitle);
|
||||
panelAlly.Dock = DockStyle.Top;
|
||||
panelAlly.Location = new Point(11, 1003);
|
||||
panelAlly.Margin = new Padding(0);
|
||||
panelAlly.Name = "panelAlly";
|
||||
panelAlly.Padding = new Padding(20, 20, 20, 0);
|
||||
panelAlly.Size = new Size(827, 140);
|
||||
panelAlly.TabIndex = 8;
|
||||
panelAlly.TabStop = true;
|
||||
panelAlly.Visible = false;
|
||||
//
|
||||
// tableLayoutAlly
|
||||
//
|
||||
tableLayoutAlly.AutoSize = true;
|
||||
tableLayoutAlly.AutoSizeMode = AutoSizeMode.GrowAndShrink;
|
||||
tableLayoutAlly.ColumnCount = 3;
|
||||
tableLayoutAlly.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 33F));
|
||||
tableLayoutAlly.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 33F));
|
||||
tableLayoutAlly.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 33F));
|
||||
tableLayoutAlly.Controls.Add(buttonBacklight, 0, 0);
|
||||
tableLayoutAlly.Controls.Add(buttonController, 0, 0);
|
||||
tableLayoutAlly.Dock = DockStyle.Top;
|
||||
tableLayoutAlly.Location = new Point(20, 60);
|
||||
tableLayoutAlly.Margin = new Padding(8, 4, 8, 4);
|
||||
tableLayoutAlly.Name = "tableLayoutAlly";
|
||||
tableLayoutAlly.RowCount = 1;
|
||||
tableLayoutAlly.RowStyles.Add(new RowStyle(SizeType.Absolute, 80F));
|
||||
tableLayoutAlly.Size = new Size(787, 80);
|
||||
tableLayoutAlly.TabIndex = 23;
|
||||
//
|
||||
// buttonBacklight
|
||||
//
|
||||
buttonBacklight.Activated = false;
|
||||
buttonBacklight.BackColor = SystemColors.ControlLightLight;
|
||||
buttonBacklight.BorderColor = Color.Transparent;
|
||||
buttonBacklight.BorderRadius = 5;
|
||||
buttonBacklight.Dock = DockStyle.Fill;
|
||||
buttonBacklight.FlatAppearance.BorderSize = 0;
|
||||
buttonBacklight.FlatStyle = FlatStyle.Flat;
|
||||
buttonBacklight.ForeColor = SystemColors.ControlText;
|
||||
buttonBacklight.Image = Properties.Resources.backlight;
|
||||
buttonBacklight.ImageAlign = ContentAlignment.MiddleRight;
|
||||
buttonBacklight.Location = new Point(266, 4);
|
||||
buttonBacklight.Margin = new Padding(4);
|
||||
buttonBacklight.Name = "buttonBacklight";
|
||||
buttonBacklight.Secondary = false;
|
||||
buttonBacklight.Size = new Size(254, 72);
|
||||
buttonBacklight.TabIndex = 10;
|
||||
buttonBacklight.Text = "100%";
|
||||
buttonBacklight.TextImageRelation = TextImageRelation.ImageBeforeText;
|
||||
buttonBacklight.UseVisualStyleBackColor = false;
|
||||
//
|
||||
// buttonController
|
||||
//
|
||||
buttonController.Activated = false;
|
||||
buttonController.BackColor = SystemColors.ControlLightLight;
|
||||
buttonController.BorderColor = Color.Transparent;
|
||||
buttonController.BorderRadius = 5;
|
||||
buttonController.Dock = DockStyle.Fill;
|
||||
buttonController.FlatAppearance.BorderSize = 0;
|
||||
buttonController.FlatStyle = FlatStyle.Flat;
|
||||
buttonController.ForeColor = SystemColors.ControlText;
|
||||
buttonController.Image = Properties.Resources.icons8_game_controller_48;
|
||||
buttonController.ImageAlign = ContentAlignment.MiddleRight;
|
||||
buttonController.Location = new Point(4, 4);
|
||||
buttonController.Margin = new Padding(4);
|
||||
buttonController.Name = "buttonController";
|
||||
buttonController.Secondary = false;
|
||||
buttonController.Size = new Size(254, 72);
|
||||
buttonController.TabIndex = 9;
|
||||
buttonController.Text = Properties.Strings.AutoMode;
|
||||
buttonController.TextImageRelation = TextImageRelation.ImageBeforeText;
|
||||
buttonController.UseVisualStyleBackColor = false;
|
||||
//
|
||||
// panelAllyTitle
|
||||
//
|
||||
panelAllyTitle.Controls.Add(pictureAlly);
|
||||
panelAllyTitle.Controls.Add(labelAlly);
|
||||
panelAllyTitle.Dock = DockStyle.Top;
|
||||
panelAllyTitle.Location = new Point(20, 20);
|
||||
panelAllyTitle.Margin = new Padding(4);
|
||||
panelAllyTitle.Name = "panelAllyTitle";
|
||||
panelAllyTitle.Size = new Size(787, 40);
|
||||
panelAllyTitle.TabIndex = 25;
|
||||
//
|
||||
// pictureAlly
|
||||
//
|
||||
pictureAlly.BackgroundImage = Properties.Resources.icons8_controller_32;
|
||||
pictureAlly.BackgroundImageLayout = ImageLayout.Zoom;
|
||||
pictureAlly.Location = new Point(5, 0);
|
||||
pictureAlly.Margin = new Padding(4);
|
||||
pictureAlly.Name = "pictureAlly";
|
||||
pictureAlly.Size = new Size(32, 32);
|
||||
pictureAlly.TabIndex = 27;
|
||||
pictureAlly.TabStop = false;
|
||||
//
|
||||
// labelAlly
|
||||
//
|
||||
labelAlly.AutoSize = true;
|
||||
labelAlly.Font = new Font("Segoe UI", 9F, FontStyle.Bold, GraphicsUnit.Point);
|
||||
labelAlly.Location = new Point(42, -2);
|
||||
labelAlly.Margin = new Padding(8, 0, 8, 0);
|
||||
labelAlly.Name = "labelAlly";
|
||||
labelAlly.Size = new Size(181, 32);
|
||||
labelAlly.TabIndex = 26;
|
||||
labelAlly.Text = "Ally Controller";
|
||||
//
|
||||
// tableAMD
|
||||
//
|
||||
tableAMD.AutoSize = true;
|
||||
tableAMD.AutoSizeMode = AutoSizeMode.GrowAndShrink;
|
||||
tableAMD.ColumnCount = 3;
|
||||
tableAMD.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 33F));
|
||||
tableAMD.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 33F));
|
||||
tableAMD.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 33F));
|
||||
tableAMD.Controls.Add(buttonFPS, 0, 0);
|
||||
tableAMD.Dock = DockStyle.Top;
|
||||
tableAMD.Location = new Point(20, 316);
|
||||
tableAMD.Margin = new Padding(8, 4, 8, 4);
|
||||
tableAMD.Name = "tableAMD";
|
||||
tableAMD.RowCount = 1;
|
||||
tableAMD.RowStyles.Add(new RowStyle(SizeType.Absolute, 80F));
|
||||
tableAMD.Size = new Size(787, 80);
|
||||
tableAMD.TabIndex = 24;
|
||||
tableAMD.Visible = false;
|
||||
//
|
||||
// buttonFPS
|
||||
//
|
||||
buttonFPS.Activated = false;
|
||||
buttonFPS.BackColor = SystemColors.ControlLightLight;
|
||||
buttonFPS.BorderColor = Color.Transparent;
|
||||
buttonFPS.BorderRadius = 5;
|
||||
buttonFPS.Dock = DockStyle.Fill;
|
||||
buttonFPS.FlatAppearance.BorderSize = 0;
|
||||
buttonFPS.FlatStyle = FlatStyle.Flat;
|
||||
buttonFPS.ForeColor = SystemColors.ControlText;
|
||||
buttonFPS.Image = Properties.Resources.icons8_video_48;
|
||||
buttonFPS.ImageAlign = ContentAlignment.MiddleRight;
|
||||
buttonFPS.Location = new Point(4, 4);
|
||||
buttonFPS.Margin = new Padding(4);
|
||||
buttonFPS.Name = "buttonFPS";
|
||||
buttonFPS.Secondary = false;
|
||||
buttonFPS.Size = new Size(254, 72);
|
||||
buttonFPS.TabIndex = 11;
|
||||
buttonFPS.Text = "FPS Limit OFF";
|
||||
buttonFPS.TextImageRelation = TextImageRelation.ImageBeforeText;
|
||||
buttonFPS.UseVisualStyleBackColor = false;
|
||||
//
|
||||
// SettingsForm
|
||||
//
|
||||
AutoScaleDimensions = new SizeF(192F, 192F);
|
||||
AutoScaleMode = AutoScaleMode.Dpi;
|
||||
AutoSize = true;
|
||||
AutoSizeMode = AutoSizeMode.GrowAndShrink;
|
||||
ClientSize = new Size(849, 1552);
|
||||
ClientSize = new Size(849, 1717);
|
||||
Controls.Add(panelFooter);
|
||||
Controls.Add(panelVersion);
|
||||
Controls.Add(panelBattery);
|
||||
Controls.Add(panelPeripherals);
|
||||
Controls.Add(panelKeyboard);
|
||||
Controls.Add(panelAlly);
|
||||
Controls.Add(panelMatrix);
|
||||
Controls.Add(panelScreen);
|
||||
Controls.Add(panelGPU);
|
||||
@@ -1414,6 +1584,7 @@ namespace GHelper
|
||||
MinimumSize = new Size(822, 71);
|
||||
Name = "SettingsForm";
|
||||
Padding = new Padding(11);
|
||||
ShowIcon = false;
|
||||
StartPosition = FormStartPosition.CenterScreen;
|
||||
Text = "G-Helper";
|
||||
panelMatrix.ResumeLayout(false);
|
||||
@@ -1464,6 +1635,13 @@ namespace GHelper
|
||||
panelPeripheralsTile.ResumeLayout(false);
|
||||
panelPeripheralsTile.PerformLayout();
|
||||
((System.ComponentModel.ISupportInitialize)picturePeripherals).EndInit();
|
||||
panelAlly.ResumeLayout(false);
|
||||
panelAlly.PerformLayout();
|
||||
tableLayoutAlly.ResumeLayout(false);
|
||||
panelAllyTitle.ResumeLayout(false);
|
||||
panelAllyTitle.PerformLayout();
|
||||
((System.ComponentModel.ISupportInitialize)pictureAlly).EndInit();
|
||||
tableAMD.ResumeLayout(false);
|
||||
ResumeLayout(false);
|
||||
PerformLayout();
|
||||
}
|
||||
@@ -1547,5 +1725,14 @@ namespace GHelper
|
||||
private Label labelCharge;
|
||||
private RButton buttonFnLock;
|
||||
private RButton buttonBatteryFull;
|
||||
private Panel panelAlly;
|
||||
private TableLayoutPanel tableLayoutAlly;
|
||||
private RButton buttonController;
|
||||
private Panel panelAllyTitle;
|
||||
private Label labelAlly;
|
||||
private PictureBox pictureAlly;
|
||||
private RButton buttonBacklight;
|
||||
private TableLayoutPanel tableAMD;
|
||||
private RButton buttonFPS;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using GHelper.AnimeMatrix;
|
||||
using GHelper.Ally;
|
||||
using GHelper.AnimeMatrix;
|
||||
using GHelper.AutoUpdate;
|
||||
using GHelper.Battery;
|
||||
using GHelper.Display;
|
||||
@@ -23,6 +24,7 @@ namespace GHelper
|
||||
|
||||
public GPUModeControl gpuControl;
|
||||
ScreenControl screenControl = new ScreenControl();
|
||||
AllyControl allyControl;
|
||||
AutoUpdateControl updateControl;
|
||||
|
||||
AsusMouseSettings? mouseSettings;
|
||||
@@ -54,6 +56,7 @@ namespace GHelper
|
||||
gpuControl = new GPUModeControl(this);
|
||||
updateControl = new AutoUpdateControl(this);
|
||||
matrixControl = new AniMatrixControl(this);
|
||||
allyControl = new AllyControl(this);
|
||||
|
||||
buttonSilent.Text = Properties.Strings.Silent;
|
||||
buttonBalanced.Text = Properties.Strings.Balanced;
|
||||
@@ -227,6 +230,10 @@ namespace GHelper
|
||||
buttonBatteryFull.MouseLeave += ButtonBatteryFull_MouseLeave;
|
||||
buttonBatteryFull.Click += ButtonBatteryFull_Click;
|
||||
|
||||
buttonController.Click += ButtonController_Click;
|
||||
buttonBacklight.Click += ButtonBacklight_Click;
|
||||
buttonFPS.Click += ButtonFPS_Click;
|
||||
|
||||
Text = "G-Helper " + (ProcessHelper.IsUserAdministrator() ? "—" : "-") + " " + AppConfig.GetModelShort();
|
||||
TopMost = AppConfig.Is("topmost");
|
||||
|
||||
@@ -240,6 +247,58 @@ namespace GHelper
|
||||
panelPerformance.Focus();
|
||||
}
|
||||
|
||||
private void ButtonFPS_Click(object? sender, EventArgs e)
|
||||
{
|
||||
allyControl.ToggleFPSLimit();
|
||||
}
|
||||
|
||||
private void ButtonBacklight_Click(object? sender, EventArgs e)
|
||||
{
|
||||
allyControl.ToggleBacklight();
|
||||
}
|
||||
|
||||
private void ButtonController_Click(object? sender, EventArgs e)
|
||||
{
|
||||
allyControl.ToggleMode();
|
||||
}
|
||||
|
||||
public void VisualiseAlly(bool visible = false)
|
||||
{
|
||||
if (!visible) return;
|
||||
|
||||
panelAlly.Visible = true;
|
||||
panelKeyboardTitle.Visible = false;
|
||||
panelKeyboard.Padding = new Padding(20, 0, 20, 20);
|
||||
|
||||
tableAMD.Visible = true;
|
||||
}
|
||||
|
||||
public void VisualiseController(ControllerMode mode)
|
||||
{
|
||||
switch (mode)
|
||||
{
|
||||
case ControllerMode.Gamepad:
|
||||
buttonController.Text = "Gamepad";
|
||||
break;
|
||||
case ControllerMode.Mouse:
|
||||
buttonController.Text = "Mouse";
|
||||
break;
|
||||
default:
|
||||
buttonController.Text = "Auto";
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
public void VisualiseBacklight(int backlight)
|
||||
{
|
||||
buttonBacklight.Text = Math.Round((double)backlight*33.33).ToString() + "%";
|
||||
}
|
||||
|
||||
public void VisualiseFPSLimit(int limit)
|
||||
{
|
||||
buttonFPS.Text = "FPS Limit " + ((limit > 0 && limit < 120) ? limit : "OFF");
|
||||
}
|
||||
|
||||
private void SettingsForm_LostFocus(object? sender, EventArgs e)
|
||||
{
|
||||
lastLostFocus = DateTimeOffset.Now.ToUnixTimeMilliseconds();
|
||||
@@ -1214,6 +1273,12 @@ namespace GHelper
|
||||
|
||||
public void VisualiseGPUMode(int GPUMode = -1)
|
||||
{
|
||||
if (AppConfig.IsAlly() && !Program.acpi.IsXGConnected())
|
||||
{
|
||||
tableGPU.Visible = false;
|
||||
GPUMode = AsusACPI.GPUModeEco;
|
||||
}
|
||||
|
||||
ButtonEnabled(buttonOptimized, true);
|
||||
ButtonEnabled(buttonEco, true);
|
||||
ButtonEnabled(buttonStandard, true);
|
||||
@@ -1237,13 +1302,11 @@ namespace GHelper
|
||||
buttonOptimized.Activated = GPUAuto;
|
||||
labelGPU.Text = Properties.Strings.GPUMode + ": " + Properties.Strings.GPUModeEco;
|
||||
Program.trayIcon.Icon = Properties.Resources.eco;
|
||||
IconHelper.SetIcon(this, Properties.Resources.dot_eco);
|
||||
break;
|
||||
case AsusACPI.GPUModeUltimate:
|
||||
buttonUltimate.Activated = true;
|
||||
labelGPU.Text = Properties.Strings.GPUMode + ": " + Properties.Strings.GPUModeUltimate;
|
||||
Program.trayIcon.Icon = Properties.Resources.ultimate;
|
||||
IconHelper.SetIcon(this, Properties.Resources.dot_ultimate);
|
||||
break;
|
||||
default:
|
||||
buttonOptimized.BorderColor = colorStandard;
|
||||
@@ -1251,7 +1314,6 @@ namespace GHelper
|
||||
buttonOptimized.Activated = GPUAuto;
|
||||
labelGPU.Text = Properties.Strings.GPUMode + ": " + Properties.Strings.GPUModeStandard;
|
||||
Program.trayIcon.Icon = Properties.Resources.standard;
|
||||
IconHelper.SetIcon(this, Properties.Resources.dot_standard);
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
@@ -76,8 +76,8 @@ namespace GHelper.USB
|
||||
public static Color Color1 = Color.White;
|
||||
public static Color Color2 = Color.Black;
|
||||
|
||||
static bool isACPI = AppConfig.IsTUF() || AppConfig.IsVivobook();
|
||||
static bool isStrix = AppConfig.IsStrix();
|
||||
static bool isACPI = AppConfig.IsTUF() || AppConfig.IsVivobook() || AppConfig.IsProArt();
|
||||
static bool isStrix = AppConfig.IsStrix() && !AppConfig.IsNoDirectRGB();
|
||||
|
||||
static bool isStrix4Zone = AppConfig.IsStrixLimitedRGB();
|
||||
static bool isStrixNumpad = AppConfig.IsStrixNumpad();
|
||||
@@ -105,6 +105,14 @@ namespace GHelper.USB
|
||||
{ AuraMode.AMBIENT, "Ambient"},
|
||||
};
|
||||
|
||||
private static Dictionary<AuraMode, string> _modesAlly = new Dictionary<AuraMode, string>
|
||||
{
|
||||
{ AuraMode.AuraStatic, Properties.Strings.AuraStatic },
|
||||
{ AuraMode.AuraBreathe, Properties.Strings.AuraBreathe },
|
||||
{ AuraMode.AuraColorCycle, Properties.Strings.AuraColorCycle },
|
||||
{ AuraMode.AuraStrobe, Properties.Strings.AuraStrobe },
|
||||
};
|
||||
|
||||
private static Dictionary<AuraMode, string> _modesStrix = new Dictionary<AuraMode, string>
|
||||
{
|
||||
{ AuraMode.AuraStatic, Properties.Strings.AuraStatic },
|
||||
@@ -161,6 +169,11 @@ namespace GHelper.USB
|
||||
return _modesSingleColor;
|
||||
}
|
||||
|
||||
if (AppConfig.IsAlly())
|
||||
{
|
||||
return _modesAlly;
|
||||
}
|
||||
|
||||
if (AppConfig.IsAdvantageEdition())
|
||||
{
|
||||
return _modes;
|
||||
@@ -264,6 +277,9 @@ namespace GHelper.USB
|
||||
if (isACPI) Program.acpi.TUFKeyboardBrightness(brightness);
|
||||
|
||||
AsusHid.Write(new byte[] { AsusHid.AURA_ID, 0xba, 0xc5, 0xc4, (byte)brightness }, log);
|
||||
|
||||
if (AppConfig.IsAlly()) ApplyAura();
|
||||
|
||||
if (AppConfig.ContainsModel("GA503"))
|
||||
AsusHid.WriteInput(new byte[] { AsusHid.INPUT_ID, 0xba, 0xc5, 0xc4, (byte)brightness }, log);
|
||||
});
|
||||
@@ -527,18 +543,18 @@ namespace GHelper.USB
|
||||
return;
|
||||
}
|
||||
|
||||
if (isStrix)
|
||||
{
|
||||
ApplyDirect(Enumerable.Repeat(color, AURA_ZONES).ToArray(), init);
|
||||
return;
|
||||
}
|
||||
|
||||
if (AppConfig.IsNoDirectRGB())
|
||||
{
|
||||
AsusHid.Write(new List<byte[]> { AuraMessage(AuraMode.AuraStatic, color, color, 0xeb, isSingleColor), MESSAGE_SET });
|
||||
return;
|
||||
}
|
||||
|
||||
if (isStrix)
|
||||
{
|
||||
ApplyDirect(Enumerable.Repeat(color, AURA_ZONES).ToArray(), init);
|
||||
return;
|
||||
}
|
||||
|
||||
if (init)
|
||||
{
|
||||
//Init();
|
||||
@@ -558,7 +574,7 @@ namespace GHelper.USB
|
||||
|
||||
}
|
||||
|
||||
public static void ApplyAura()
|
||||
public static void ApplyAura(double colorDim = 1)
|
||||
{
|
||||
|
||||
Mode = (AuraMode)AppConfig.Get("aura_mode");
|
||||
@@ -566,6 +582,25 @@ namespace GHelper.USB
|
||||
SetColor(AppConfig.Get("aura_color"));
|
||||
SetColor2(AppConfig.Get("aura_color2"));
|
||||
|
||||
Color _Color1 = Color1;
|
||||
Color _Color2 = Color2;
|
||||
|
||||
// Ally lower brightness fix
|
||||
if (AppConfig.IsAlly())
|
||||
{
|
||||
switch (InputDispatcher.GetBacklight())
|
||||
{
|
||||
case 1: colorDim = 0.1; break;
|
||||
case 2: colorDim = 0.3; break;
|
||||
}
|
||||
|
||||
if (colorDim < 1)
|
||||
{
|
||||
_Color1 = Color.FromArgb((int)(Color1.R * colorDim), (int)(Color1.G * colorDim), (int)(Color1.B * colorDim));
|
||||
_Color2 = Color.FromArgb((int)(Color2.R * colorDim), (int)(Color2.G * colorDim), (int)(Color2.B * colorDim));
|
||||
}
|
||||
}
|
||||
|
||||
timer.Enabled = false;
|
||||
|
||||
Logger.WriteLine($"AuraMode: {Mode}");
|
||||
@@ -594,7 +629,7 @@ namespace GHelper.USB
|
||||
|
||||
int _speed = (Speed == AuraSpeed.Normal) ? 0xeb : (Speed == AuraSpeed.Fast) ? 0xf5 : 0xe1;
|
||||
|
||||
AsusHid.Write(new List<byte[]> { AuraMessage(Mode, Color1, Color2, _speed, isSingleColor), MESSAGE_APPLY, MESSAGE_SET });
|
||||
AsusHid.Write(new List<byte[]> { AuraMessage(Mode, _Color1, _Color2, _speed, isSingleColor), MESSAGE_APPLY, MESSAGE_SET });
|
||||
|
||||
if (isACPI)
|
||||
Program.acpi.TUFKeyboardRGB(Mode, Color1, _speed);
|
||||
@@ -624,6 +659,8 @@ namespace GHelper.USB
|
||||
break;
|
||||
}
|
||||
|
||||
if (isACPI) Program.acpi.TUFKeyboardRGB(AuraMode.AuraStatic, color, 0xeb);
|
||||
|
||||
AsusHid.Write(new List<byte[]> { AuraMessage(AuraMode.AuraStatic, color, color, 0xeb, isSingleColor), MESSAGE_APPLY, MESSAGE_SET });
|
||||
|
||||
}
|
||||
|
||||
@@ -84,9 +84,9 @@ Each BIOS mode is paired with matching Windows Power Mode. You can adjust this s
|
||||
|
||||
### 🔖 Important Notice
|
||||
|
||||
G-Helper is **not** an operating system, firmware or a driver. It doesn't "run" your hardware in realtime anyhow.
|
||||
G-Helper is **NOT** an operating system, firmware or a driver. It **DOESN'T** "run" your hardware in realtime anyhow.
|
||||
|
||||
It's an app that lets you select (already predefined and stored in BIOS) operating modes and (optionally) set some settings that already exist on your device (same as Armoury Crate).
|
||||
It's an app that lets you select (already predefined and stored in BIOS) operating modes and (optionally) set some settings that already exist on your device (same as Armoury Crate). If you use same mode / settings as in Armoury Crate - performance of your device won't be different.
|
||||
|
||||
Role of G-Helper for your laptop is similar to a role of a remote control for your TV.
|
||||
|
||||
@@ -117,6 +117,7 @@ Huge thanks to [@IceStormNG](https://github.com/IceStormNG) 👑 for contributio
|
||||
- ``Shift + M1 / M2`` - Backlight brightness Down / Up
|
||||
- ``Fn + C`` - Fn-Lock
|
||||
- ``Fn + Shift + F7 / F8`` - Matrix brightness Down / Up
|
||||
- ``Fn + Shift + F7 / F8`` - Screenpad brightness Down / Up
|
||||
- ``Ctrl + Shift + F20`` - Mute Microphone
|
||||
- ``Ctrl + Shift + Alt + F14`` - Eco Mode
|
||||
- ``Ctrl + Shift + Alt + F15`` - Standard Mode
|
||||
|
||||
Reference in New Issue
Block a user