Compare commits

...

17 Commits

Author SHA1 Message Date
seerge
64e390a61f UI tweaks 2023-03-20 17:10:18 +01:00
seerge
1cd808de07 Auto theme change 2023-03-20 16:42:51 +01:00
seerge
d82f1c8d70 Fix crash for gputemp reader 2023-03-20 15:43:51 +01:00
seerge
9189cf0a46 Dark Theme 2023-03-20 14:38:56 +01:00
seerge
3a7c4278a0 Merge branch 'main' of https://github.com/seerge/g-helper 2023-03-20 14:32:47 +01:00
seerge
7065ba8661 Dark Theme 2023-03-20 14:32:45 +01:00
Serge
1bce4a4b51 Update README.md 2023-03-20 11:45:16 +01:00
Serge
468f9c4034 Update bug_report.md 2023-03-19 23:45:02 +01:00
seerge
4d347df45c Attempt to fix auto gpu switch 2023-03-19 21:59:22 +01:00
seerge
d7f1d1d5fd Merge branch 'main' of https://github.com/seerge/g-helper 2023-03-19 17:39:32 +01:00
seerge
6800ae38dd Custom fan-axis for 401 model 2023-03-19 17:39:30 +01:00
Serge
9b2b96fbf0 Update README.md 2023-03-19 13:57:02 +01:00
seerge
04b3a15d8f Merge branch 'main' of https://github.com/seerge/g-helper 2023-03-19 10:27:35 +01:00
seerge
aae0570340 - 2023-03-19 10:27:32 +01:00
Serge
b142d566da Update README.md 2023-03-18 20:56:37 +01:00
seerge
a9115d0dff Screenshot 2023-03-18 18:46:35 +01:00
Serge
e3a3e81245 Merge pull request #96 from seerge/new_ui
New UI
2023-03-18 18:38:35 +01:00
18 changed files with 815 additions and 383 deletions

View File

@@ -25,14 +25,7 @@ If applicable, add screenshots to help explain your problem.
**Desktop (please complete the following information):**
- OS: [e.g. iOS]
- Browser [e.g. chrome, safari]
- Version [e.g. 22]
**Smartphone (please complete the following information):**
- Device: [e.g. iPhone6]
- OS: [e.g. iOS8.1]
- Browser [e.g. stock browser, safari]
- Version [e.g. 22]
- Laptop model
**Additional context**
Add any other context about the problem here.

View File

@@ -20,6 +20,7 @@ public class ASUSWmi
public const uint BatteryLimit = 0x00120057;
public const uint ScreenOverdrive = 0x00050019;
public const uint ScreenMiniled = 0x0005001E;
public const uint DevsCPUFanCurve = 0x00110024;
public const uint DevsGPUFanCurve = 0x00110025;

View File

@@ -1,4 +1,5 @@
using System.Text.Json;
using System.Management;
using System.Text.Json;
public class AppConfig
{
@@ -6,6 +7,8 @@ public class AppConfig
public string appPath;
string configFile;
string _model;
public Dictionary<string, object> config = new Dictionary<string, object>();
public AppConfig()
@@ -36,6 +39,26 @@ public class AppConfig
}
public bool ContainsModel(string contains)
{
if (_model is null)
{
_model = "";
using (var searcher = new ManagementObjectSearcher(@"Select * from Win32_ComputerSystem"))
{
foreach (var process in searcher.Get())
{
_model = process["Model"].ToString();
break;
}
}
}
return (_model is not null && _model.Contains(contains));
}
private void initConfig()
{
config = new Dictionary<string, object>();

150
app/ControlHelper.cs Normal file
View File

@@ -0,0 +1,150 @@
using CustomControls;
using System.Drawing.Drawing2D;
using System.Windows.Forms.DataVisualization.Charting;
public static class ControlHelper
{
static bool _invert = false;
static float _scale = 1;
static Color formBack;
static Color backMain;
static Color foreMain;
static Color borderMain;
static Color buttonMain;
public static void Adjust(RForm container, float baseScale = 2, bool invert = false)
{
_scale = GetDpiScale(container).Value / baseScale;
if (container.darkTheme)
{
formBack = Color.FromArgb(255, 35, 35, 35);
backMain = Color.FromArgb(255, 50, 50, 50);
foreMain = Color.White;
borderMain = Color.FromArgb(255, 50, 50, 50);
buttonMain = Color.FromArgb(255, 100, 100, 100);
}
else
{
formBack = SystemColors.Control;
backMain = SystemColors.ControlLightLight;
foreMain = SystemColors.ControlText;
borderMain = Color.LightGray;
buttonMain = SystemColors.ControlLight;
}
container.BackColor = formBack;
container.ForeColor = foreMain;
_invert = invert;
AdjustControls(container.Controls);
_invert = false;
}
private static void AdjustControls(Control.ControlCollection controls)
{
foreach (Control control in controls)
{
var button = control as Button;
if (button != null)
{
button.BackColor = backMain;
button.ForeColor = foreMain;
button.FlatStyle = FlatStyle.Flat;
button.FlatAppearance.BorderColor = borderMain;
if (button.Image is not null)
button.Image = AdjustImage(button.Image);
}
var pictureBox = control as PictureBox;
if (pictureBox != null)
{
if (pictureBox.BackgroundImage is not null)
pictureBox.BackgroundImage = AdjustImage(pictureBox.BackgroundImage);
}
var combo = control as RComboBox;
if (combo != null)
{
combo.BackColor = backMain;
combo.ForeColor = foreMain;
combo.BorderColor = backMain;
combo.ButtonColor = buttonMain;
}
var gb = control as GroupBox;
if (gb != null)
{
gb.ForeColor = foreMain;
}
var chart = control as Chart;
if (chart != null)
{
chart.BackColor = backMain;
chart.ChartAreas[0].BackColor = backMain;
chart.ChartAreas[0].AxisX.MajorGrid.LineColor = foreMain;
chart.ChartAreas[0].AxisY.MajorGrid.LineColor = foreMain;
chart.ChartAreas[0].AxisX.TitleForeColor = foreMain;
chart.ChartAreas[0].AxisY.TitleForeColor = foreMain;
chart.ChartAreas[0].AxisX.LabelStyle.ForeColor = foreMain;
chart.ChartAreas[0].AxisY.LabelStyle.ForeColor = foreMain;
chart.ChartAreas[0].AxisX.MajorTickMark.LineColor = foreMain;
chart.ChartAreas[0].AxisY.MajorTickMark.LineColor = foreMain;
chart.ChartAreas[0].AxisX.LineColor = foreMain;
chart.ChartAreas[0].AxisY.LineColor = foreMain;
chart.Titles[0].ForeColor = foreMain;
}
AdjustControls(control.Controls);
}
}
public static Lazy<float> GetDpiScale(Control control)
{
return new Lazy<float>(() =>
{
using (var graphics = control.CreateGraphics())
return graphics.DpiX / 96.0f;
});
}
private static Image AdjustImage(Image image)
{
var newSize = new Size((int)(image.Width * _scale), (int)(image.Height * _scale));
var pic = new Bitmap(newSize.Width, newSize.Height);
using (var g = Graphics.FromImage(pic))
{
g.InterpolationMode = InterpolationMode.HighQualityBicubic;
g.DrawImage(image, new Rectangle(new Point(), newSize));
}
if (_invert)
{
for (int y = 0; (y <= (pic.Height - 1)); y++)
{
for (int x = 0; (x <= (pic.Width - 1)); x++)
{
Color col = pic.GetPixel(x, y);
pic.SetPixel(x, y, Color.FromArgb(col.A, (255 - col.R), (255 - col.G), (255 - col.B)));
}
}
}
return pic;
}
}

313
app/CustomControls.cs Normal file
View File

@@ -0,0 +1,313 @@
using System.ComponentModel;
using System.Drawing.Drawing2D;
using System.Runtime.InteropServices;
namespace CustomControls
{
public class RForm : Form
{
protected static Color colorEco = Color.FromArgb(255, 6, 180, 138);
protected static Color colorStandard = Color.FromArgb(255, 58, 174, 239);
protected static Color colorTurbo = Color.FromArgb(255, 255, 32, 32);
[DllImport("UXTheme.dll", SetLastError = true, EntryPoint = "#138")]
public static extern bool CheckSystemDarkModeStatus();
[DllImport("DwmApi")] //System.Runtime.InteropServices
private static extern int DwmSetWindowAttribute(IntPtr hwnd, int attr, int[] attrValue, int attrSize);
public bool darkTheme;
public bool invert = false;
public void InitTheme()
{
bool newDarkTheme = CheckSystemDarkModeStatus();
invert = (darkTheme != newDarkTheme);
darkTheme = newDarkTheme;
ControlHelper.Adjust(this, 2, invert);
try
{
DwmSetWindowAttribute(this.Handle, 20, new[] { darkTheme ? 1 : 0 }, 4);
} catch { }
}
}
public class RComboBox : ComboBox
{
private Color borderColor = Color.Gray;
[DefaultValue(typeof(Color), "Gray")]
public Color BorderColor
{
get { return borderColor; }
set
{
if (borderColor != value)
{
borderColor = value;
Invalidate();
}
}
}
private Color buttonColor = Color.LightGray;
[DefaultValue(typeof(Color), "LightGray")]
public Color ButtonColor
{
get { return buttonColor; }
set
{
if (buttonColor != value)
{
buttonColor = value;
Invalidate();
}
}
}
private Color arrowColor = Color.Black;
[DefaultValue(typeof(Color), "Black")]
public Color ArrowColor
{
get { return arrowColor; }
set
{
if (arrowColor != value)
{
arrowColor = value;
Invalidate();
}
}
}
protected override void WndProc(ref Message m)
{
if (m.Msg == WM_PAINT && DropDownStyle != ComboBoxStyle.Simple)
{
var clientRect = ClientRectangle;
var dropDownButtonWidth = SystemInformation.HorizontalScrollBarArrowWidth;
var outerBorder = new Rectangle(clientRect.Location,
new Size(clientRect.Width - 1, clientRect.Height - 1));
var innerBorder = new Rectangle(outerBorder.X + 1, outerBorder.Y + 1,
outerBorder.Width - dropDownButtonWidth - 2, outerBorder.Height - 2);
var innerInnerBorder = new Rectangle(innerBorder.X + 1, innerBorder.Y + 1,
innerBorder.Width - 2, innerBorder.Height - 2);
var dropDownRect = new Rectangle(innerBorder.Right + 1, innerBorder.Y,
dropDownButtonWidth, innerBorder.Height + 1);
if (RightToLeft == RightToLeft.Yes)
{
innerBorder.X = clientRect.Width - innerBorder.Right;
innerInnerBorder.X = clientRect.Width - innerInnerBorder.Right;
dropDownRect.X = clientRect.Width - dropDownRect.Right;
dropDownRect.Width += 1;
}
var innerBorderColor = Enabled ? BackColor : SystemColors.Control;
var outerBorderColor = Enabled ? BorderColor : SystemColors.ControlDark;
var buttonColor = Enabled ? ButtonColor : SystemColors.Control;
var middle = new Point(dropDownRect.Left + dropDownRect.Width / 2,
dropDownRect.Top + dropDownRect.Height / 2);
var arrow = new Point[]
{
new Point(middle.X - 3, middle.Y - 2),
new Point(middle.X + 4, middle.Y - 2),
new Point(middle.X, middle.Y + 2)
};
var ps = new PAINTSTRUCT();
bool shoulEndPaint = false;
IntPtr dc;
if (m.WParam == IntPtr.Zero)
{
dc = BeginPaint(Handle, ref ps);
m.WParam = dc;
shoulEndPaint = true;
}
else
{
dc = m.WParam;
}
var rgn = CreateRectRgn(innerInnerBorder.Left, innerInnerBorder.Top,
innerInnerBorder.Right, innerInnerBorder.Bottom);
SelectClipRgn(dc, rgn);
DefWndProc(ref m);
DeleteObject(rgn);
rgn = CreateRectRgn(clientRect.Left, clientRect.Top,
clientRect.Right, clientRect.Bottom);
SelectClipRgn(dc, rgn);
using (var g = Graphics.FromHdc(dc))
{
using (var b = new SolidBrush(buttonColor))
{
g.FillRectangle(b, dropDownRect);
}
using (var b = new SolidBrush(arrowColor))
{
g.FillPolygon(b, arrow);
}
using (var p = new Pen(innerBorderColor))
{
g.DrawRectangle(p, innerBorder);
g.DrawRectangle(p, innerInnerBorder);
}
using (var p = new Pen(outerBorderColor))
{
g.DrawRectangle(p, outerBorder);
}
}
if (shoulEndPaint)
EndPaint(Handle, ref ps);
DeleteObject(rgn);
}
else
base.WndProc(ref m);
}
private const int WM_PAINT = 0xF;
[StructLayout(LayoutKind.Sequential)]
public struct RECT
{
public int L, T, R, B;
}
[StructLayout(LayoutKind.Sequential)]
public struct PAINTSTRUCT
{
public IntPtr hdc;
public bool fErase;
public int rcPaint_left;
public int rcPaint_top;
public int rcPaint_right;
public int rcPaint_bottom;
public bool fRestore;
public bool fIncUpdate;
public int reserved1;
public int reserved2;
public int reserved3;
public int reserved4;
public int reserved5;
public int reserved6;
public int reserved7;
public int reserved8;
}
[DllImport("user32.dll")]
private static extern IntPtr BeginPaint(IntPtr hWnd,
[In, Out] ref PAINTSTRUCT lpPaint);
[DllImport("user32.dll")]
private static extern bool EndPaint(IntPtr hWnd, ref PAINTSTRUCT lpPaint);
[DllImport("gdi32.dll")]
public static extern int SelectClipRgn(IntPtr hDC, IntPtr hRgn);
[DllImport("user32.dll")]
public static extern int GetUpdateRgn(IntPtr hwnd, IntPtr hrgn, bool fErase);
public enum RegionFlags
{
ERROR = 0,
NULLREGION = 1,
SIMPLEREGION = 2,
COMPLEXREGION = 3,
}
[DllImport("gdi32.dll")]
internal static extern bool DeleteObject(IntPtr hObject);
[DllImport("gdi32.dll")]
private static extern IntPtr CreateRectRgn(int x1, int y1, int x2, int y2);
}
public class RButton : Button
{
//Fields
private int borderSize = 5;
private int borderRadius = 3;
private bool activated = false;
private Color borderColor = Color.Transparent;
public Color BorderColor
{
get { return borderColor; }
set
{
borderColor = value;
}
}
public bool Activated
{
get { return activated; }
set
{
if (activated != value)
this.Invalidate();
activated = value;
}
}
public RButton()
{
this.FlatStyle = FlatStyle.Flat;
this.FlatAppearance.BorderSize = 0;
}
private GraphicsPath GetFigurePath(Rectangle rect, int radius)
{
GraphicsPath path = new GraphicsPath();
float curveSize = radius * 2F;
path.StartFigure();
path.AddArc(rect.X, rect.Y, curveSize, curveSize, 180, 90);
path.AddArc(rect.Right - curveSize, rect.Y, curveSize, curveSize, 270, 90);
path.AddArc(rect.Right - curveSize, rect.Bottom - curveSize, curveSize, curveSize, 0, 90);
path.AddArc(rect.X, rect.Bottom - curveSize, curveSize, curveSize, 90, 90);
path.CloseFigure();
return path;
}
protected override void OnPaint(PaintEventArgs pevent)
{
base.OnPaint(pevent);
float ratio = pevent.Graphics.DpiX / 192.0f;
int border = (int)(ratio * borderSize);
Rectangle rectSurface = this.ClientRectangle;
Rectangle rectBorder = Rectangle.Inflate(rectSurface, -border, -border);
Color borderDrawColor = activated ? borderColor : Color.Transparent;
using (GraphicsPath pathSurface = GetFigurePath(rectSurface, borderRadius + border))
using (GraphicsPath pathBorder = GetFigurePath(rectBorder, borderRadius))
using (Pen penSurface = new Pen(this.Parent.BackColor, border))
using (Pen penBorder = new Pen(borderDrawColor, border))
{
penBorder.Alignment = PenAlignment.Outset;
pevent.Graphics.SmoothingMode = SmoothingMode.AntiAlias;
this.Region = new Region(pathSurface);
pevent.Graphics.DrawPath(penSurface, pathSurface);
pevent.Graphics.DrawPath(penBorder, pathBorder);
}
if (!Enabled && ForeColor != SystemColors.ControlText)
{
var rect = pevent.ClipRectangle;
if (Image is not null)
{
rect.Y += Image.Height;
rect.Height -= Image.Height;
}
TextFormatFlags flags = TextFormatFlags.HorizontalCenter | TextFormatFlags.VerticalCenter | TextFormatFlags.WordBreak;
TextRenderer.DrawText(pevent.Graphics, this.Text, this.Font, rect, Color.Gray, flags);
}
}
}
}

62
app/Fans.Designer.cs generated
View File

@@ -1,4 +1,7 @@
namespace GHelper
using CustomControls;
using System.Windows.Forms.DataVisualization.Charting;
namespace GHelper
{
partial class Fans
{
@@ -28,25 +31,27 @@
/// </summary>
private void InitializeComponent()
{
System.Windows.Forms.DataVisualization.Charting.ChartArea chartArea1 = new System.Windows.Forms.DataVisualization.Charting.ChartArea();
System.Windows.Forms.DataVisualization.Charting.ChartArea chartArea2 = new System.Windows.Forms.DataVisualization.Charting.ChartArea();
ChartArea chartArea3 = new ChartArea();
Title title3 = new Title();
ChartArea chartArea4 = new ChartArea();
Title title4 = new Title();
panelFans = new Panel();
labelTip = new Label();
labelBoost = new Label();
comboBoost = new ComboBox();
comboBoost = new RComboBox();
picturePerf = new PictureBox();
tableFanCharts = new TableLayoutPanel();
chartGPU = new System.Windows.Forms.DataVisualization.Charting.Chart();
chartCPU = new System.Windows.Forms.DataVisualization.Charting.Chart();
chartGPU = new Chart();
chartCPU = new Chart();
labelFans = new Label();
checkAuto = new CheckBox();
buttonReset = new Button();
buttonApply = new Button();
buttonReset = new RButton();
buttonApply = new RButton();
panelPower = new Panel();
pictureBox1 = new PictureBox();
labelPowerLimits = new Label();
checkApplyPower = new CheckBox();
buttonApplyPower = new Button();
buttonApplyPower = new RButton();
panelCPU = new Panel();
labelCPU = new Label();
label2 = new Label();
@@ -114,6 +119,7 @@
// comboBoost
//
comboBoost.Anchor = AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right;
comboBoost.BorderColor = Color.White;
comboBoost.DropDownStyle = ComboBoxStyle.DropDownList;
comboBoost.FormattingEnabled = true;
comboBoost.Items.AddRange(new object[] { "Disabled", "Enabled", "Aggressive", "Efficient Enabled", "Efficient Aggressive" });
@@ -154,8 +160,8 @@
//
// chartGPU
//
chartArea1.Name = "ChartArea1";
chartGPU.ChartAreas.Add(chartArea1);
chartArea3.Name = "ChartArea1";
chartGPU.ChartAreas.Add(chartArea3);
chartGPU.Dock = DockStyle.Fill;
chartGPU.Location = new Point(2, 506);
chartGPU.Margin = new Padding(2, 10, 2, 10);
@@ -163,11 +169,13 @@
chartGPU.Size = new Size(760, 476);
chartGPU.TabIndex = 17;
chartGPU.Text = "chart1";
title3.Name = "Title1";
chartGPU.Titles.Add(title3);
//
// chartCPU
//
chartArea2.Name = "ChartArea1";
chartCPU.ChartAreas.Add(chartArea2);
chartArea4.Name = "ChartArea1";
chartCPU.ChartAreas.Add(chartArea4);
chartCPU.Dock = DockStyle.Fill;
chartCPU.Location = new Point(2, 10);
chartCPU.Margin = new Padding(2, 10, 2, 10);
@@ -175,6 +183,8 @@
chartCPU.Size = new Size(760, 476);
chartCPU.TabIndex = 14;
chartCPU.Text = "chartCPU";
title4.Name = "Title1";
chartCPU.Titles.Add(title4);
//
// labelFans
//
@@ -201,25 +211,33 @@
//
// buttonReset
//
buttonReset.Activated = false;
buttonReset.Anchor = AnchorStyles.Bottom | AnchorStyles.Left;
buttonReset.BackColor = SystemColors.ControlLight;
buttonReset.BorderColor = Color.Transparent;
buttonReset.FlatStyle = FlatStyle.Flat;
buttonReset.Location = new Point(30, 1081);
buttonReset.Margin = new Padding(4, 2, 4, 2);
buttonReset.Name = "buttonReset";
buttonReset.Size = new Size(232, 44);
buttonReset.TabIndex = 15;
buttonReset.Text = "Factory Defaults";
buttonReset.UseVisualStyleBackColor = true;
buttonReset.UseVisualStyleBackColor = false;
//
// buttonApply
//
buttonApply.Activated = false;
buttonApply.Anchor = AnchorStyles.Bottom | AnchorStyles.Right;
buttonApply.BackColor = SystemColors.ControlLight;
buttonApply.BorderColor = Color.Transparent;
buttonApply.FlatStyle = FlatStyle.Flat;
buttonApply.Location = new Point(542, 1081);
buttonApply.Margin = new Padding(4, 2, 4, 2);
buttonApply.Name = "buttonApply";
buttonApply.Size = new Size(248, 44);
buttonApply.TabIndex = 14;
buttonApply.Text = "Apply Fan Curve";
buttonApply.UseVisualStyleBackColor = true;
buttonApply.UseVisualStyleBackColor = false;
//
// panelPower
//
@@ -277,14 +295,18 @@
//
// buttonApplyPower
//
buttonApplyPower.Activated = false;
buttonApplyPower.Anchor = AnchorStyles.Bottom | AnchorStyles.Left | AnchorStyles.Right;
buttonApplyPower.BackColor = SystemColors.ControlLight;
buttonApplyPower.BorderColor = Color.Transparent;
buttonApplyPower.FlatStyle = FlatStyle.Flat;
buttonApplyPower.Location = new Point(20, 1081);
buttonApplyPower.Margin = new Padding(4, 2, 4, 2);
buttonApplyPower.Name = "buttonApplyPower";
buttonApplyPower.Size = new Size(324, 44);
buttonApplyPower.TabIndex = 24;
buttonApplyPower.Text = "Apply Power Limits";
buttonApplyPower.UseVisualStyleBackColor = true;
buttonApplyPower.UseVisualStyleBackColor = false;
//
// panelCPU
//
@@ -456,11 +478,11 @@
#endregion
private Panel panelFans;
private CheckBox checkAuto;
private Button buttonReset;
private Button buttonApply;
private RButton buttonReset;
private RButton buttonApply;
private Panel panelPower;
private CheckBox checkApplyPower;
private Button buttonApplyPower;
private RButton buttonApplyPower;
private Panel panelCPU;
private Label labelCPU;
private Label label2;
@@ -479,7 +501,7 @@
private Label labelFans;
private PictureBox picturePerf;
private PictureBox pictureBox1;
private ComboBox comboBoost;
private RComboBox comboBoost;
private Label labelBoost;
private Label labelTip;
}

View File

@@ -1,24 +1,23 @@
using System;
using System.Diagnostics;
using System.Diagnostics.Metrics;
using System.Drawing.Imaging;
using System.Drawing.Text;
using System.IO;
using System.Diagnostics;
using System.Windows.Forms.DataVisualization.Charting;
using CustomControls;
namespace GHelper
{
public partial class Fans : Form
public partial class Fans : RForm
{
DataPoint curPoint = null;
Series seriesCPU;
Series seriesGPU;
static int MinRPM, MaxRPM;
static string ChartPercToRPM(int percentage, string unit = "")
{
if (percentage == 0) return "OFF";
return (1800 + 200 * Math.Floor(percentage * 0.2)).ToString() + unit;
return (200 * Math.Round((float)(MinRPM + (MaxRPM - MinRPM) * percentage * 0.01) / 200)).ToString() + unit;
}
void SetChart(Chart chart, int device)
@@ -34,10 +33,7 @@ namespace GHelper
if (Program.settingsForm.perfName.Length > 0)
labelFans.Text = "Fan Profiles: " + Program.settingsForm.perfName;
if (chart.Titles.Count > 0)
chart.Titles[0].Text = title;
else
chart.Titles.Add(title);
chart.Titles[0].Text = title;
chart.ChartAreas[0].AxisX.MajorGrid.LineColor = Color.LightGray;
chart.ChartAreas[0].AxisY.MajorGrid.LineColor = Color.LightGray;
@@ -84,6 +80,18 @@ namespace GHelper
{
InitializeComponent();
InitTheme();
MinRPM = 1800;
if (Program.config.ContainsModel("401"))
MaxRPM = 7200;
else if (Program.config.ContainsModel("503"))
MaxRPM = 6800;
else
MaxRPM = 5800;
labelTip.Visible = false;
labelTip.BackColor = Color.Transparent;
@@ -93,8 +101,8 @@ namespace GHelper
seriesCPU = chartCPU.Series.Add("CPU");
seriesGPU = chartGPU.Series.Add("GPU");
seriesCPU.Color = Color.Blue;
seriesGPU.Color = Color.Red;
seriesCPU.Color = colorStandard;
seriesGPU.Color = colorTurbo;
chartCPU.MouseMove += ChartCPU_MouseMove;
chartCPU.MouseUp += ChartCPU_MouseUp;
@@ -245,12 +253,12 @@ namespace GHelper
{
if (applied)
{
labelApplied.ForeColor = Color.Blue;
labelApplied.ForeColor = colorStandard;
labelApplied.Text = "Applied";
}
else
{
labelApplied.ForeColor = Color.Red;
labelApplied.ForeColor = colorTurbo;
labelApplied.Text = "Not Applied";
}

View File

@@ -16,7 +16,7 @@
<PlatformTarget>x64</PlatformTarget>
<ProduceReferenceAssembly>False</ProduceReferenceAssembly>
<AllowUnsafeBlocks>True</AllowUnsafeBlocks>
<AssemblyVersion>0.31</AssemblyVersion>
<AssemblyVersion>0.34</AssemblyVersion>
</PropertyGroup>
<ItemGroup>
@@ -51,15 +51,6 @@
<PackageReference Include="WinForms.DataVisualization" Version="1.7.0" />
</ItemGroup>
<ItemGroup>
<Reference Include="Microsoft.Management.Infrastructure">
<HintPath>..\..\.nuget\packages\microsoft.management.infrastructure\2.0.0\ref\net451\Microsoft.Management.Infrastructure.dll</HintPath>
</Reference>
<Reference Include="Microsoft.Management.Infrastructure.Native">
<HintPath>..\..\.nuget\packages\microsoft.management.infrastructure.runtime.win\2.0.0\runtimes\win10-x64\lib\netstandard1.6\Microsoft.Management.Infrastructure.Native.dll</HintPath>
</Reference>
</ItemGroup>
<ItemGroup>
<Content Include="Resources\eco.ico">
<CopyToOutputDirectory>Never</CopyToOutputDirectory>

View File

@@ -58,28 +58,36 @@ public static class HardwareMonitor
}
public static void RecreateGpuTemperatureProvider() {
try {
try
{
GpuTemperatureProvider?.Dispose();
// Detect valid GPU temperature provider.
// We start with NVIDIA because there's always at least an integrated AMD GPU
IGpuTemperatureProvider gpuTemperatureProvider = new NvidiaGpuTemperatureProvider();
if (gpuTemperatureProvider.IsValid) {
if (gpuTemperatureProvider.IsValid)
{
GpuTemperatureProvider = gpuTemperatureProvider;
return;
}
gpuTemperatureProvider.Dispose();
gpuTemperatureProvider = new AmdGpuTemperatureProvider();
if (gpuTemperatureProvider.IsValid) {
if (gpuTemperatureProvider.IsValid)
{
GpuTemperatureProvider = gpuTemperatureProvider;
return;
}
gpuTemperatureProvider.Dispose();
GpuTemperatureProvider = null;
} finally {
}
catch (Exception ex)
{
}
finally
{
Logger.WriteLine($"GpuTemperatureProvider: {GpuTemperatureProvider?.GetType().Name}");
}
}

View File

@@ -1,67 +0,0 @@
using System.Drawing.Drawing2D;
public static class HighDpiHelper
{
public static void AdjustControlImagesDpiScale(Control container, float baseScale = 2)
{
var dpiScale = GetDpiScale(container).Value;
AdjustControlImagesDpiScale(container.Controls, dpiScale / baseScale);
}
public static void AdjustButtonDpiScale(ButtonBase button, float dpiScale)
{
var image = button.Image;
if (image == null)
return;
button.Image = ScaleImage(image, dpiScale);
}
private static void AdjustControlImagesDpiScale(Control.ControlCollection controls, float dpiScale)
{
foreach (Control control in controls)
{
var button = control as ButtonBase;
if (button != null)
AdjustButtonDpiScale(button, dpiScale);
AdjustControlImagesDpiScale(control.Controls, dpiScale);
}
}
public static Lazy<float> GetDpiScale(Control control)
{
return new Lazy<float>(() =>
{
using (var graphics = control.CreateGraphics())
return graphics.DpiX / 96.0f;
});
}
private static Image ScaleImage(Image image, float dpiScale)
{
var newSize = ScaleSize(image.Size, dpiScale);
var newBitmap = new Bitmap(newSize.Width, newSize.Height);
using (var g = Graphics.FromImage(newBitmap))
{
// According to this blog post http://blogs.msdn.com/b/visualstudio/archive/2014/03/19/improving-high-dpi-support-for-visual-studio-2013.aspx
// NearestNeighbor is more adapted for 200% and 200%+ DPI
var interpolationMode = InterpolationMode.HighQualityBicubic;
if (dpiScale >= 2.0f)
interpolationMode = InterpolationMode.NearestNeighbor;
g.InterpolationMode = interpolationMode;
g.DrawImage(image, new Rectangle(new Point(), newSize));
}
return newBitmap;
}
private static Size ScaleSize(Size size, float scale)
{
return new Size((int)(size.Width * scale), (int)(size.Height * scale));
}
}

View File

@@ -1,4 +1,6 @@
namespace GHelper
using CustomControls;
namespace GHelper
{
partial class Keyboard
{
@@ -31,12 +33,12 @@
groupBox1 = new GroupBox();
textM4 = new TextBox();
textM3 = new TextBox();
comboM4 = new ComboBox();
comboM4 = new RComboBox();
labelM4 = new Label();
comboM3 = new ComboBox();
comboM3 = new RComboBox();
labelM3 = new Label();
textFNF4 = new TextBox();
comboFNF4 = new ComboBox();
comboFNF4 = new RComboBox();
labelFNF4 = new Label();
groupBox1.SuspendLayout();
SuspendLayout();
@@ -161,13 +163,13 @@
private GroupBox groupBox1;
private Label labelM3;
private ComboBox comboM3;
private ComboBox comboM4;
private RComboBox comboM3;
private RComboBox comboM4;
private Label labelM4;
private TextBox textM4;
private TextBox textM3;
private TextBox textFNF4;
private ComboBox comboFNF4;
private RComboBox comboFNF4;
private Label labelFNF4;
}
}

View File

@@ -1,6 +1,8 @@
namespace GHelper
using CustomControls;
namespace GHelper
{
public partial class Keyboard : Form
public partial class Keyboard : RForm
{
Dictionary<string, string> customActions = new Dictionary<string, string>
@@ -51,6 +53,7 @@
public Keyboard()
{
InitializeComponent();
InitTheme();
SetKeyCombo(comboM3, textM3, "m3");
SetKeyCombo(comboM4, textM4, "m4");

View File

@@ -27,6 +27,7 @@ namespace GHelper
private static IntPtr ds;
private static long lastAuto;
private static long lastTheme;
// The main entry point for the application
public static void Main()
@@ -48,6 +49,8 @@ namespace GHelper
}
SystemEvents.UserPreferenceChanged += OnUserPreferenceChanged;
Application.EnableVisualStyles();
ds = settingsForm.Handle;
@@ -77,6 +80,30 @@ namespace GHelper
}
static void OnUserPreferenceChanged(object sender, UserPreferenceChangedEventArgs e)
{
if (Math.Abs(DateTimeOffset.Now.ToUnixTimeMilliseconds() - lastTheme) < 2000) return;
lastTheme = DateTimeOffset.Now.ToUnixTimeMilliseconds();
switch (e.Category)
{
case UserPreferenceCategory.General:
Debug.WriteLine("Theme Changed");
settingsForm.InitTheme();
if (settingsForm.fans is not null && settingsForm.fans.Text != "")
settingsForm.fans.InitTheme();
if (settingsForm.keyb is not null && settingsForm.keyb.Text != "")
settingsForm.keyb.InitTheme();
break;
}
}
static async void CheckForUpdates()
{
@@ -112,7 +139,7 @@ namespace GHelper
}
public static void SetAutoModes()
public static void SetAutoModes(bool wait = false)
{
if (Math.Abs(DateTimeOffset.Now.ToUnixTimeMilliseconds() - lastAuto) < 1000) return;
@@ -126,6 +153,9 @@ namespace GHelper
settingsForm.AutoPerformance(isPlugged);
// waiting a bit before turning off dGPU
// if (wait && isPlugged != PowerLineStatus.Online) Thread.Sleep(3000);
bool switched = settingsForm.AutoGPUMode(isPlugged);
if (!switched) settingsForm.AutoScreen(isPlugged);
@@ -135,7 +165,7 @@ namespace GHelper
private static void SystemEvents_PowerModeChanged(object sender, PowerModeChangedEventArgs e)
{
Logger.WriteLine("Windows - Power Mode Changed");
SetAutoModes();
SetAutoModes(true);
}

View File

@@ -1,85 +0,0 @@
using System.ComponentModel;
using System.Drawing;
using System.Drawing.Drawing2D;
namespace CustomControls
{
public class RoundedButton : Button
{
//Fields
private int borderSize = 5;
private int borderRadius = 5;
private bool activated = false;
private Color borderColor = Color.Transparent;
public Color BorderColor
{
get { return borderColor; }
set
{
borderColor = value;
}
}
public bool Activated
{
get { return activated; }
set
{
if (activated != value)
this.Invalidate();
activated = value;
}
}
public RoundedButton()
{
this.FlatStyle = FlatStyle.Flat;
this.FlatAppearance.BorderSize = 0;
}
private GraphicsPath GetFigurePath(Rectangle rect, int radius)
{
GraphicsPath path = new GraphicsPath();
float curveSize = radius * 2F;
path.StartFigure();
path.AddArc(rect.X, rect.Y, curveSize, curveSize, 180, 90);
path.AddArc(rect.Right - curveSize, rect.Y, curveSize, curveSize, 270, 90);
path.AddArc(rect.Right - curveSize, rect.Bottom - curveSize, curveSize, curveSize, 0, 90);
path.AddArc(rect.X, rect.Bottom - curveSize, curveSize, curveSize, 90, 90);
path.CloseFigure();
return path;
}
protected override void OnPaint(PaintEventArgs pevent)
{
base.OnPaint(pevent);
float ratio = pevent.Graphics.DpiX / 192.0f;
int border = (int)(ratio * borderSize);
Rectangle rectSurface = this.ClientRectangle;
Rectangle rectBorder = Rectangle.Inflate(rectSurface, -border, -border);
Color borderDrawColor = activated ? borderColor : Color.Transparent;
using (GraphicsPath pathSurface = GetFigurePath(rectSurface, borderRadius+ border))
using (GraphicsPath pathBorder = GetFigurePath(rectBorder, borderRadius))
using (Pen penSurface = new Pen(this.Parent.BackColor, border))
using (Pen penBorder = new Pen(borderDrawColor, border))
{
penBorder.Alignment = PenAlignment.Outset;
pevent.Graphics.SmoothingMode = SmoothingMode.AntiAlias;
this.Region = new Region(pathSurface);
pevent.Graphics.DrawPath(penSurface, pathSurface);
pevent.Graphics.DrawPath(penBorder, pathBorder);
}
}
}
}

230
app/Settings.Designer.cs generated
View File

@@ -34,9 +34,9 @@ namespace GHelper
panelMatrix = new Panel();
checkMatrix = new CheckBox();
tableLayoutMatrix = new TableLayoutPanel();
comboMatrix = new ComboBox();
buttonMatrix = new Button();
comboMatrixRunning = new ComboBox();
comboMatrix = new RComboBox();
buttonMatrix = new RButton();
comboMatrixRunning = new RComboBox();
pictureMatrix = new PictureBox();
labelMatrix = new Label();
panelBattery = new Panel();
@@ -46,45 +46,46 @@ namespace GHelper
labelBatteryTitle = new Label();
trackBattery = new TrackBar();
panelFooter = new Panel();
buttonQuit = new Button();
buttonQuit = new RButton();
checkStartup = new CheckBox();
panelPerformance = new Panel();
picturePerf = new PictureBox();
labelPerf = new Label();
labelCPUFan = new Label();
tablePerf = new TableLayoutPanel();
buttonSilent = new RoundedButton();
buttonBalanced = new RoundedButton();
buttonTurbo = new RoundedButton();
buttonFans = new Button();
buttonSilent = new RButton();
buttonBalanced = new RButton();
buttonTurbo = new RButton();
buttonFans = new RButton();
panelGPU = new Panel();
labelTipGPU = new Label();
pictureGPU = new PictureBox();
labelGPU = new Label();
labelGPUFan = new Label();
tableGPU = new TableLayoutPanel();
buttonEco = new RoundedButton();
buttonStandard = new RoundedButton();
buttonOptimized = new RoundedButton();
buttonUltimate = new RoundedButton();
buttonEco = new RButton();
buttonStandard = new RButton();
buttonOptimized = new RButton();
buttonUltimate = new RButton();
panelScreen = new Panel();
labelTipScreen = new Label();
tableScreen = new TableLayoutPanel();
buttonScreenAuto = new RoundedButton();
button60Hz = new RoundedButton();
button120Hz = new RoundedButton();
buttonScreenAuto = new RButton();
button60Hz = new RButton();
button120Hz = new RButton();
pictureScreen = new PictureBox();
labelSreen = new Label();
panelKeyboard = new Panel();
tableLayoutKeyboard = new TableLayoutPanel();
buttonKeyboard = new Button();
comboKeyboard = new ComboBox();
buttonKeyboard = new RButton();
comboKeyboard = new RComboBox();
panelColor = new Panel();
pictureColor2 = new PictureBox();
pictureColor = new PictureBox();
buttonKeyboardColor = new Button();
buttonKeyboardColor = new RButton();
pictureKeyboard = new PictureBox();
labelKeyboard = new Label();
buttonMiniled = new RButton();
panelMatrix.SuspendLayout();
tableLayoutMatrix.SuspendLayout();
((System.ComponentModel.ISupportInitialize)pictureMatrix).BeginInit();
@@ -122,7 +123,7 @@ namespace GHelper
panelMatrix.Margin = new Padding(8);
panelMatrix.Name = "panelMatrix";
panelMatrix.Padding = new Padding(0, 0, 0, 12);
panelMatrix.Size = new Size(816, 168);
panelMatrix.Size = new Size(810, 168);
panelMatrix.TabIndex = 33;
//
// checkMatrix
@@ -155,11 +156,13 @@ namespace GHelper
tableLayoutMatrix.Name = "tableLayoutMatrix";
tableLayoutMatrix.RowCount = 1;
tableLayoutMatrix.RowStyles.Add(new RowStyle(SizeType.Percent, 100F));
tableLayoutMatrix.Size = new Size(780, 60);
tableLayoutMatrix.Size = new Size(772, 60);
tableLayoutMatrix.TabIndex = 43;
//
// comboMatrix
//
comboMatrix.BorderColor = Color.White;
comboMatrix.ButtonColor = SystemColors.ControlLight;
comboMatrix.Dock = DockStyle.Top;
comboMatrix.Font = new Font("Segoe UI", 9F, FontStyle.Regular, GraphicsUnit.Point);
comboMatrix.FormattingEnabled = true;
@@ -168,34 +171,39 @@ namespace GHelper
comboMatrix.Location = new Point(4, 10);
comboMatrix.Margin = new Padding(4, 10, 4, 8);
comboMatrix.Name = "comboMatrix";
comboMatrix.Size = new Size(187, 40);
comboMatrix.Size = new Size(185, 40);
comboMatrix.TabIndex = 41;
comboMatrix.TabStop = false;
//
// buttonMatrix
//
buttonMatrix.BackColor = SystemColors.ButtonFace;
buttonMatrix.Activated = false;
buttonMatrix.BackColor = SystemColors.ControlLight;
buttonMatrix.BorderColor = Color.Transparent;
buttonMatrix.Dock = DockStyle.Top;
buttonMatrix.FlatAppearance.BorderSize = 0;
buttonMatrix.Location = new Point(394, 8);
buttonMatrix.FlatStyle = FlatStyle.Flat;
buttonMatrix.Location = new Point(390, 8);
buttonMatrix.Margin = new Padding(4, 8, 4, 8);
buttonMatrix.Name = "buttonMatrix";
buttonMatrix.Size = new Size(187, 44);
buttonMatrix.Size = new Size(185, 44);
buttonMatrix.TabIndex = 43;
buttonMatrix.Text = "Picture / Gif";
buttonMatrix.UseVisualStyleBackColor = false;
//
// comboMatrixRunning
//
comboMatrixRunning.BorderColor = Color.White;
comboMatrixRunning.ButtonColor = SystemColors.ControlLight;
comboMatrixRunning.Dock = DockStyle.Top;
comboMatrixRunning.Font = new Font("Segoe UI", 9F, FontStyle.Regular, GraphicsUnit.Point);
comboMatrixRunning.FormattingEnabled = true;
comboMatrixRunning.ItemHeight = 32;
comboMatrixRunning.Items.AddRange(new object[] { "Binary Banner", "Rog Logo", "Picture" });
comboMatrixRunning.Location = new Point(199, 10);
comboMatrixRunning.Location = new Point(197, 10);
comboMatrixRunning.Margin = new Padding(4, 10, 4, 8);
comboMatrixRunning.Name = "comboMatrixRunning";
comboMatrixRunning.Size = new Size(187, 40);
comboMatrixRunning.Size = new Size(185, 40);
comboMatrixRunning.TabIndex = 42;
comboMatrixRunning.TabStop = false;
//
@@ -235,7 +243,7 @@ namespace GHelper
panelBattery.Margin = new Padding(8);
panelBattery.Name = "panelBattery";
panelBattery.Padding = new Padding(0, 0, 0, 12);
panelBattery.Size = new Size(816, 158);
panelBattery.Size = new Size(810, 158);
panelBattery.TabIndex = 34;
//
// labelVersion
@@ -253,7 +261,7 @@ namespace GHelper
// labelBattery
//
labelBattery.Anchor = AnchorStyles.Top | AnchorStyles.Right;
labelBattery.Location = new Point(428, 9);
labelBattery.Location = new Point(422, 9);
labelBattery.Margin = new Padding(8, 0, 8, 0);
labelBattery.Name = "labelBattery";
labelBattery.Size = new Size(364, 44);
@@ -291,7 +299,7 @@ namespace GHelper
trackBattery.Maximum = 100;
trackBattery.Minimum = 50;
trackBattery.Name = "trackBattery";
trackBattery.Size = new Size(772, 90);
trackBattery.Size = new Size(766, 90);
trackBattery.SmallChange = 5;
trackBattery.TabIndex = 33;
trackBattery.TickFrequency = 10;
@@ -309,14 +317,17 @@ namespace GHelper
panelFooter.Margin = new Padding(8);
panelFooter.Name = "panelFooter";
panelFooter.Padding = new Padding(0, 0, 0, 10);
panelFooter.Size = new Size(816, 74);
panelFooter.Size = new Size(810, 74);
panelFooter.TabIndex = 35;
//
// buttonQuit
//
buttonQuit.Activated = false;
buttonQuit.Anchor = AnchorStyles.Top | AnchorStyles.Right;
buttonQuit.BackColor = SystemColors.ButtonFace;
buttonQuit.Location = new Point(584, 16);
buttonQuit.BackColor = SystemColors.ControlLight;
buttonQuit.BorderColor = Color.Transparent;
buttonQuit.FlatStyle = FlatStyle.Flat;
buttonQuit.Location = new Point(578, 16);
buttonQuit.Margin = new Padding(8, 4, 8, 4);
buttonQuit.Name = "buttonQuit";
buttonQuit.Size = new Size(208, 44);
@@ -348,7 +359,7 @@ namespace GHelper
panelPerformance.Margin = new Padding(0);
panelPerformance.Name = "panelPerformance";
panelPerformance.Padding = new Padding(0, 0, 0, 12);
panelPerformance.Size = new Size(816, 200);
panelPerformance.Size = new Size(810, 200);
panelPerformance.TabIndex = 36;
//
// picturePerf
@@ -377,10 +388,10 @@ namespace GHelper
// labelCPUFan
//
labelCPUFan.Anchor = AnchorStyles.Top | AnchorStyles.Right;
labelCPUFan.Location = new Point(456, 16);
labelCPUFan.Location = new Point(384, 15);
labelCPUFan.Margin = new Padding(8, 0, 8, 0);
labelCPUFan.Name = "labelCPUFan";
labelCPUFan.Size = new Size(336, 36);
labelCPUFan.Size = new Size(400, 36);
labelCPUFan.TabIndex = 30;
labelCPUFan.Text = " ";
labelCPUFan.TextAlign = ContentAlignment.TopRight;
@@ -404,7 +415,7 @@ namespace GHelper
tablePerf.Name = "tablePerf";
tablePerf.RowCount = 1;
tablePerf.RowStyles.Add(new RowStyle(SizeType.Absolute, 128F));
tablePerf.Size = new Size(780, 128);
tablePerf.Size = new Size(772, 128);
tablePerf.TabIndex = 29;
//
// buttonSilent
@@ -423,7 +434,7 @@ namespace GHelper
buttonSilent.Location = new Point(4, 4);
buttonSilent.Margin = new Padding(4);
buttonSilent.Name = "buttonSilent";
buttonSilent.Size = new Size(187, 120);
buttonSilent.Size = new Size(185, 120);
buttonSilent.TabIndex = 0;
buttonSilent.Text = "Silent";
buttonSilent.TextImageRelation = TextImageRelation.ImageAboveText;
@@ -440,10 +451,10 @@ namespace GHelper
buttonBalanced.ForeColor = SystemColors.ControlText;
buttonBalanced.Image = Properties.Resources.icons8_fiat_500_48;
buttonBalanced.ImageAlign = ContentAlignment.BottomCenter;
buttonBalanced.Location = new Point(199, 4);
buttonBalanced.Location = new Point(197, 4);
buttonBalanced.Margin = new Padding(4);
buttonBalanced.Name = "buttonBalanced";
buttonBalanced.Size = new Size(187, 120);
buttonBalanced.Size = new Size(185, 120);
buttonBalanced.TabIndex = 1;
buttonBalanced.Text = "Balanced";
buttonBalanced.TextImageRelation = TextImageRelation.ImageAboveText;
@@ -460,10 +471,10 @@ namespace GHelper
buttonTurbo.ForeColor = SystemColors.ControlText;
buttonTurbo.Image = Properties.Resources.icons8_rocket_48;
buttonTurbo.ImageAlign = ContentAlignment.BottomCenter;
buttonTurbo.Location = new Point(394, 4);
buttonTurbo.Location = new Point(390, 4);
buttonTurbo.Margin = new Padding(4);
buttonTurbo.Name = "buttonTurbo";
buttonTurbo.Size = new Size(187, 120);
buttonTurbo.Size = new Size(185, 120);
buttonTurbo.TabIndex = 2;
buttonTurbo.Text = "Turbo";
buttonTurbo.TextImageRelation = TextImageRelation.ImageAboveText;
@@ -471,15 +482,18 @@ namespace GHelper
//
// buttonFans
//
buttonFans.BackColor = SystemColors.ButtonFace;
buttonFans.Activated = false;
buttonFans.BackColor = SystemColors.ControlLight;
buttonFans.BorderColor = Color.Transparent;
buttonFans.Dock = DockStyle.Fill;
buttonFans.FlatAppearance.BorderSize = 0;
buttonFans.FlatStyle = FlatStyle.Flat;
buttonFans.Image = Properties.Resources.icons8_fan_48;
buttonFans.ImageAlign = ContentAlignment.BottomCenter;
buttonFans.Location = new Point(589, 4);
buttonFans.Location = new Point(583, 4);
buttonFans.Margin = new Padding(4);
buttonFans.Name = "buttonFans";
buttonFans.Size = new Size(187, 120);
buttonFans.Size = new Size(185, 120);
buttonFans.TabIndex = 35;
buttonFans.Text = "Fans + Power";
buttonFans.TextImageRelation = TextImageRelation.ImageAboveText;
@@ -499,7 +513,7 @@ namespace GHelper
panelGPU.Margin = new Padding(8);
panelGPU.Name = "panelGPU";
panelGPU.Padding = new Padding(0, 0, 0, 10);
panelGPU.Size = new Size(816, 237);
panelGPU.Size = new Size(810, 237);
panelGPU.TabIndex = 37;
//
// labelTipGPU
@@ -516,7 +530,7 @@ namespace GHelper
//
pictureGPU.BackgroundImage = (Image)resources.GetObject("pictureGPU.BackgroundImage");
pictureGPU.BackgroundImageLayout = ImageLayout.Zoom;
pictureGPU.Location = new Point(24, 20);
pictureGPU.Location = new Point(24, 21);
pictureGPU.Margin = new Padding(4);
pictureGPU.Name = "pictureGPU";
pictureGPU.Size = new Size(32, 32);
@@ -527,7 +541,7 @@ namespace GHelper
//
labelGPU.AutoSize = true;
labelGPU.Font = new Font("Segoe UI", 9F, FontStyle.Bold, GraphicsUnit.Point);
labelGPU.Location = new Point(60, 20);
labelGPU.Location = new Point(60, 21);
labelGPU.Margin = new Padding(8, 0, 8, 0);
labelGPU.Name = "labelGPU";
labelGPU.Size = new Size(136, 32);
@@ -537,10 +551,10 @@ namespace GHelper
// labelGPUFan
//
labelGPUFan.Anchor = AnchorStyles.Top | AnchorStyles.Right;
labelGPUFan.Location = new Point(244, 12);
labelGPUFan.Location = new Point(384, 21);
labelGPUFan.Margin = new Padding(8, 0, 8, 0);
labelGPUFan.Name = "labelGPUFan";
labelGPUFan.Size = new Size(548, 44);
labelGPUFan.Size = new Size(400, 34);
labelGPUFan.TabIndex = 17;
labelGPUFan.Text = " ";
labelGPUFan.TextAlign = ContentAlignment.TopRight;
@@ -564,7 +578,7 @@ namespace GHelper
tableGPU.Name = "tableGPU";
tableGPU.RowCount = 1;
tableGPU.RowStyles.Add(new RowStyle(SizeType.Absolute, 128F));
tableGPU.Size = new Size(780, 128);
tableGPU.Size = new Size(772, 128);
tableGPU.TabIndex = 16;
//
// buttonEco
@@ -582,7 +596,7 @@ namespace GHelper
buttonEco.Location = new Point(4, 4);
buttonEco.Margin = new Padding(4);
buttonEco.Name = "buttonEco";
buttonEco.Size = new Size(187, 120);
buttonEco.Size = new Size(185, 120);
buttonEco.TabIndex = 0;
buttonEco.Text = "Eco";
buttonEco.TextImageRelation = TextImageRelation.ImageAboveText;
@@ -599,10 +613,10 @@ namespace GHelper
buttonStandard.ForeColor = SystemColors.ControlText;
buttonStandard.Image = Properties.Resources.icons8_spa_flower_48;
buttonStandard.ImageAlign = ContentAlignment.BottomCenter;
buttonStandard.Location = new Point(199, 4);
buttonStandard.Location = new Point(197, 4);
buttonStandard.Margin = new Padding(4);
buttonStandard.Name = "buttonStandard";
buttonStandard.Size = new Size(187, 120);
buttonStandard.Size = new Size(185, 120);
buttonStandard.TabIndex = 1;
buttonStandard.Text = "Standard";
buttonStandard.TextImageRelation = TextImageRelation.ImageAboveText;
@@ -619,10 +633,10 @@ namespace GHelper
buttonOptimized.ForeColor = SystemColors.ControlText;
buttonOptimized.Image = Properties.Resources.icons8_project_management_48__1_;
buttonOptimized.ImageAlign = ContentAlignment.BottomCenter;
buttonOptimized.Location = new Point(589, 4);
buttonOptimized.Location = new Point(583, 4);
buttonOptimized.Margin = new Padding(4);
buttonOptimized.Name = "buttonOptimized";
buttonOptimized.Size = new Size(187, 120);
buttonOptimized.Size = new Size(185, 120);
buttonOptimized.TabIndex = 3;
buttonOptimized.Text = "Optimized";
buttonOptimized.TextImageRelation = TextImageRelation.ImageAboveText;
@@ -639,10 +653,10 @@ namespace GHelper
buttonUltimate.ForeColor = SystemColors.ControlText;
buttonUltimate.Image = Properties.Resources.icons8_game_controller_48;
buttonUltimate.ImageAlign = ContentAlignment.BottomCenter;
buttonUltimate.Location = new Point(394, 4);
buttonUltimate.Location = new Point(390, 4);
buttonUltimate.Margin = new Padding(4);
buttonUltimate.Name = "buttonUltimate";
buttonUltimate.Size = new Size(187, 120);
buttonUltimate.Size = new Size(185, 120);
buttonUltimate.TabIndex = 2;
buttonUltimate.Text = "Ultimate";
buttonUltimate.TextImageRelation = TextImageRelation.ImageAboveText;
@@ -661,7 +675,7 @@ namespace GHelper
panelScreen.Margin = new Padding(8);
panelScreen.Name = "panelScreen";
panelScreen.Padding = new Padding(0, 0, 0, 10);
panelScreen.Size = new Size(816, 181);
panelScreen.Size = new Size(810, 181);
panelScreen.TabIndex = 38;
//
// labelTipScreen
@@ -691,7 +705,7 @@ namespace GHelper
tableScreen.Name = "tableScreen";
tableScreen.RowCount = 1;
tableScreen.RowStyles.Add(new RowStyle(SizeType.Absolute, 80F));
tableScreen.Size = new Size(780, 80);
tableScreen.Size = new Size(772, 80);
tableScreen.TabIndex = 23;
//
// buttonScreenAuto
@@ -706,7 +720,7 @@ namespace GHelper
buttonScreenAuto.Location = new Point(4, 4);
buttonScreenAuto.Margin = new Padding(4);
buttonScreenAuto.Name = "buttonScreenAuto";
buttonScreenAuto.Size = new Size(187, 72);
buttonScreenAuto.Size = new Size(185, 72);
buttonScreenAuto.TabIndex = 0;
buttonScreenAuto.Text = "Auto";
buttonScreenAuto.UseVisualStyleBackColor = false;
@@ -721,10 +735,10 @@ namespace GHelper
button60Hz.FlatAppearance.BorderSize = 0;
button60Hz.FlatStyle = FlatStyle.Flat;
button60Hz.ForeColor = SystemColors.ControlText;
button60Hz.Location = new Point(199, 4);
button60Hz.Location = new Point(197, 4);
button60Hz.Margin = new Padding(4);
button60Hz.Name = "button60Hz";
button60Hz.Size = new Size(187, 72);
button60Hz.Size = new Size(185, 72);
button60Hz.TabIndex = 1;
button60Hz.Text = "60Hz";
button60Hz.UseVisualStyleBackColor = false;
@@ -738,10 +752,10 @@ namespace GHelper
button120Hz.FlatAppearance.BorderSize = 0;
button120Hz.FlatStyle = FlatStyle.Flat;
button120Hz.ForeColor = SystemColors.ControlText;
button120Hz.Location = new Point(394, 4);
button120Hz.Location = new Point(390, 4);
button120Hz.Margin = new Padding(4);
button120Hz.Name = "button120Hz";
button120Hz.Size = new Size(187, 72);
button120Hz.Size = new Size(185, 72);
button120Hz.TabIndex = 2;
button120Hz.Text = "120Hz + OD";
button120Hz.UseVisualStyleBackColor = false;
@@ -780,7 +794,7 @@ namespace GHelper
panelKeyboard.Margin = new Padding(8);
panelKeyboard.Name = "panelKeyboard";
panelKeyboard.Padding = new Padding(0, 0, 0, 12);
panelKeyboard.Size = new Size(816, 130);
panelKeyboard.Size = new Size(810, 130);
panelKeyboard.TabIndex = 39;
//
// tableLayoutKeyboard
@@ -801,25 +815,31 @@ namespace GHelper
tableLayoutKeyboard.Name = "tableLayoutKeyboard";
tableLayoutKeyboard.RowCount = 1;
tableLayoutKeyboard.RowStyles.Add(new RowStyle(SizeType.Percent, 100F));
tableLayoutKeyboard.Size = new Size(780, 60);
tableLayoutKeyboard.Size = new Size(772, 60);
tableLayoutKeyboard.TabIndex = 39;
//
// buttonKeyboard
//
buttonKeyboard.BackColor = SystemColors.ButtonFace;
buttonKeyboard.Activated = false;
buttonKeyboard.BackColor = SystemColors.ControlLight;
buttonKeyboard.BorderColor = Color.Transparent;
buttonKeyboard.Dock = DockStyle.Top;
buttonKeyboard.FlatAppearance.BorderSize = 0;
buttonKeyboard.Location = new Point(394, 8);
buttonKeyboard.FlatStyle = FlatStyle.Flat;
buttonKeyboard.Location = new Point(390, 8);
buttonKeyboard.Margin = new Padding(4, 8, 4, 8);
buttonKeyboard.Name = "buttonKeyboard";
buttonKeyboard.Size = new Size(187, 44);
buttonKeyboard.Size = new Size(185, 44);
buttonKeyboard.TabIndex = 37;
buttonKeyboard.Text = "Extra";
buttonKeyboard.UseVisualStyleBackColor = false;
//
// comboKeyboard
//
comboKeyboard.BorderColor = Color.White;
comboKeyboard.ButtonColor = SystemColors.ControlLight;
comboKeyboard.Dock = DockStyle.Top;
comboKeyboard.FlatStyle = FlatStyle.Flat;
comboKeyboard.Font = new Font("Segoe UI", 9F, FontStyle.Regular, GraphicsUnit.Point);
comboKeyboard.FormattingEnabled = true;
comboKeyboard.ItemHeight = 32;
@@ -827,7 +847,7 @@ namespace GHelper
comboKeyboard.Location = new Point(4, 10);
comboKeyboard.Margin = new Padding(4, 10, 4, 8);
comboKeyboard.Name = "comboKeyboard";
comboKeyboard.Size = new Size(187, 40);
comboKeyboard.Size = new Size(185, 40);
comboKeyboard.TabIndex = 35;
comboKeyboard.TabStop = false;
//
@@ -838,16 +858,16 @@ namespace GHelper
panelColor.Controls.Add(pictureColor);
panelColor.Controls.Add(buttonKeyboardColor);
panelColor.Dock = DockStyle.Fill;
panelColor.Location = new Point(199, 8);
panelColor.Location = new Point(197, 8);
panelColor.Margin = new Padding(4, 8, 4, 8);
panelColor.Name = "panelColor";
panelColor.Size = new Size(187, 44);
panelColor.Size = new Size(185, 44);
panelColor.TabIndex = 36;
//
// pictureColor2
//
pictureColor2.Anchor = AnchorStyles.Top | AnchorStyles.Right;
pictureColor2.Location = new Point(125, 12);
pictureColor2.Location = new Point(123, 12);
pictureColor2.Margin = new Padding(8);
pictureColor2.Name = "pictureColor2";
pictureColor2.Size = new Size(20, 20);
@@ -857,7 +877,7 @@ namespace GHelper
// pictureColor
//
pictureColor.Anchor = AnchorStyles.Top | AnchorStyles.Right;
pictureColor.Location = new Point(153, 12);
pictureColor.Location = new Point(151, 12);
pictureColor.Margin = new Padding(8);
pictureColor.Name = "pictureColor";
pictureColor.Size = new Size(20, 20);
@@ -866,15 +886,16 @@ namespace GHelper
//
// buttonKeyboardColor
//
buttonKeyboardColor.Activated = false;
buttonKeyboardColor.BackColor = SystemColors.ButtonHighlight;
buttonKeyboardColor.BorderColor = Color.Transparent;
buttonKeyboardColor.Dock = DockStyle.Top;
buttonKeyboardColor.FlatAppearance.BorderColor = Color.Red;
buttonKeyboardColor.FlatAppearance.BorderSize = 2;
buttonKeyboardColor.FlatStyle = FlatStyle.Flat;
buttonKeyboardColor.ForeColor = SystemColors.ControlText;
buttonKeyboardColor.Location = new Point(0, 0);
buttonKeyboardColor.Margin = new Padding(4, 8, 4, 8);
buttonKeyboardColor.Name = "buttonKeyboardColor";
buttonKeyboardColor.Size = new Size(187, 44);
buttonKeyboardColor.Size = new Size(185, 44);
buttonKeyboardColor.TabIndex = 39;
buttonKeyboardColor.Text = "Color ";
buttonKeyboardColor.UseVisualStyleBackColor = false;
@@ -901,6 +922,24 @@ namespace GHelper
labelKeyboard.TabIndex = 32;
labelKeyboard.Text = "Laptop Keyboard";
//
// buttonMiniled
//
buttonMiniled.Activated = false;
buttonMiniled.BackColor = SystemColors.ControlLightLight;
buttonMiniled.BorderColor = Color.Transparent;
buttonMiniled.CausesValidation = false;
buttonMiniled.Dock = DockStyle.Fill;
buttonMiniled.FlatAppearance.BorderSize = 0;
buttonMiniled.FlatStyle = FlatStyle.Flat;
buttonMiniled.ForeColor = SystemColors.ControlText;
buttonMiniled.Location = new Point(197, 4);
buttonMiniled.Margin = new Padding(4);
buttonMiniled.Name = "buttonMiniled";
buttonMiniled.Size = new Size(185, 72);
buttonMiniled.TabIndex = 3;
buttonMiniled.Text = "Miniled";
buttonMiniled.UseVisualStyleBackColor = false;
//
// SettingsForm
//
AutoScaleDimensions = new SizeF(192F, 192F);
@@ -971,49 +1010,50 @@ namespace GHelper
private Label labelBatteryTitle;
private TrackBar trackBattery;
private Panel panelFooter;
private Button buttonQuit;
private RButton buttonQuit;
private CheckBox checkStartup;
private Panel panelPerformance;
private PictureBox picturePerf;
private Label labelPerf;
private Label labelCPUFan;
private TableLayoutPanel tablePerf;
private RoundedButton buttonTurbo;
private RoundedButton buttonBalanced;
private RoundedButton buttonSilent;
private RButton buttonTurbo;
private RButton buttonBalanced;
private RButton buttonSilent;
private Panel panelGPU;
private PictureBox pictureGPU;
private Label labelGPU;
private Label labelGPUFan;
private TableLayoutPanel tableGPU;
private RoundedButton buttonUltimate;
private RoundedButton buttonStandard;
private RoundedButton buttonEco;
private RButton buttonUltimate;
private RButton buttonStandard;
private RButton buttonEco;
private Panel panelScreen;
private TableLayoutPanel tableScreen;
private RoundedButton buttonScreenAuto;
private RoundedButton button60Hz;
private RButton buttonScreenAuto;
private RButton button60Hz;
private PictureBox pictureScreen;
private Label labelSreen;
private Panel panelKeyboard;
private PictureBox pictureKeyboard;
private Label labelKeyboard;
private TableLayoutPanel tableLayoutMatrix;
private Button buttonMatrix;
private ComboBox comboMatrixRunning;
private ComboBox comboMatrix;
private RComboBox comboMatrixRunning;
private RComboBox comboMatrix;
private TableLayoutPanel tableLayoutKeyboard;
private Button buttonKeyboard;
private ComboBox comboKeyboard;
private RComboBox comboKeyboard;
private Panel panelColor;
private PictureBox pictureColor2;
private PictureBox pictureColor;
private Button buttonKeyboardColor;
private CheckBox checkMatrix;
private RoundedButton button120Hz;
private Button buttonFans;
private RoundedButton buttonOptimized;
private RButton button120Hz;
private RButton buttonOptimized;
private Label labelTipGPU;
private Label labelTipScreen;
private RButton buttonMiniled;
private RButton buttonMatrix;
private RButton buttonKeyboard;
private RButton buttonKeyboardColor;
private RButton buttonFans;
}
}

View File

@@ -1,4 +1,5 @@
using Starlight.AnimeMatrix;
using CustomControls;
using Starlight.AnimeMatrix;
using System.Diagnostics;
using System.Drawing.Imaging;
using System.Timers;
@@ -6,13 +7,9 @@ using System.Timers;
namespace GHelper
{
public partial class SettingsForm : Form
public partial class SettingsForm : RForm
{
static Color colorEco = Color.FromArgb(255, 6, 180, 138);
static Color colorStandard = Color.FromArgb(255, 58, 174, 239);
static Color colorTurbo = Color.FromArgb(255, 255, 32, 32);
static System.Timers.Timer aTimer = default!;
static System.Timers.Timer matrixTimer = default!;
@@ -20,16 +17,15 @@ namespace GHelper
public string perfName = "Balanced";
Fans fans;
Keyboard keyb;
public Fans fans;
public Keyboard keyb;
static AnimeMatrixDevice mat;
public SettingsForm()
{
InitializeComponent();
HighDpiHelper.AdjustControlImagesDpiScale(this, 2);
InitTheme();
FormClosing += SettingsForm_FormClosing;
@@ -45,6 +41,7 @@ namespace GHelper
button60Hz.BorderColor = SystemColors.ActiveBorder;
button120Hz.BorderColor = SystemColors.ActiveBorder;
buttonScreenAuto.BorderColor = SystemColors.ActiveBorder;
buttonMiniled.BorderColor = colorTurbo;
buttonOptimized.Click += ButtonOptimized_Click;
buttonSilent.Click += ButtonSilent_Click;
@@ -62,6 +59,7 @@ namespace GHelper
button60Hz.Click += Button60Hz_Click;
button120Hz.Click += Button120Hz_Click;
buttonScreenAuto.Click += ButtonScreenAuto_Click;
buttonMiniled.Click += ButtonMiniled_Click;
buttonQuit.Click += ButtonQuit_Click;
@@ -93,6 +91,7 @@ namespace GHelper
checkStartup.CheckedChanged += CheckStartup_CheckedChanged;
labelVersion.Click += LabelVersion_Click;
labelVersion.ForeColor = Color.FromArgb(128, Color.Gray);
buttonOptimized.MouseMove += ButtonOptimized_MouseHover;
buttonOptimized.MouseLeave += ButtonGPU_MouseLeave;
@@ -121,6 +120,7 @@ namespace GHelper
}
private void Button120Hz_MouseHover(object? sender, EventArgs e)
{
labelTipScreen.Text = "Max refresh rate + screen overdrive for lower latency";
@@ -614,13 +614,17 @@ namespace GHelper
SetScreen(60, 0);
}
private void ButtonMiniled_Click(object? sender, EventArgs e)
{
int miniled = (Program.config.getConfig("miniled") == 1) ? 0 : 1;
Program.config.setConfig("miniled", miniled);
SetScreen(-1, -1, miniled);
}
public void SetScreen(int frequency = -1, int overdrive = -1)
public void SetScreen(int frequency = -1, int overdrive = -1, int miniled = -1)
{
int currentFrequency = NativeMethods.GetRefreshRate();
if (currentFrequency < 0) // Laptop screen not detected or has unknown refresh rate
if (NativeMethods.GetRefreshRate() < 0) // Laptop screen not detected or has unknown refresh rate
{
InitScreen();
return;
@@ -629,19 +633,25 @@ namespace GHelper
if (frequency >= 1000)
{
frequency = Program.config.getConfig("max_frequency");
if (frequency <= 60)
frequency = 120;
if (frequency <= 60) frequency = 120;
}
if (frequency <= 0) return;
if (frequency > 0)
{
NativeMethods.SetRefreshRate(frequency);
Logger.WriteLine("Screen " + frequency.ToString() + "Hz");
}
NativeMethods.SetRefreshRate(frequency);
if (overdrive >= 0)
Program.wmi.DeviceSet(ASUSWmi.ScreenOverdrive, overdrive);
InitScreen();
if (miniled >= 0)
{
Program.wmi.DeviceSet(ASUSWmi.ScreenMiniled, miniled);
Debug.WriteLine("Miniled " + miniled);
}
Logger.WriteLine("Screen " + frequency.ToString() + "Hz");
InitScreen();
}
@@ -653,37 +663,19 @@ namespace GHelper
bool screenAuto = (Program.config.getConfig("screen_auto") == 1);
int overdrive = 0;
try
{
overdrive = Program.wmi.DeviceGet(ASUSWmi.ScreenOverdrive);
}
catch
{
Logger.WriteLine("Screen Overdrive not supported");
}
int overdrive = Program.wmi.DeviceGet(ASUSWmi.ScreenOverdrive);
int miniled = Program.wmi.DeviceGet(ASUSWmi.ScreenMiniled);
if (frequency < 0)
{
button60Hz.Enabled = false;
button120Hz.Enabled = false;
buttonScreenAuto.Enabled = false;
labelSreen.Text = "Laptop Screen: Turned off";
button60Hz.BackColor = SystemColors.ControlLight;
button120Hz.BackColor = SystemColors.ControlLight;
buttonScreenAuto.BackColor = SystemColors.ControlLight;
}
else
{
button60Hz.Enabled = true;
button120Hz.Enabled = true;
buttonScreenAuto.Enabled = true;
button60Hz.BackColor = SystemColors.ControlLightLight;
button120Hz.BackColor = SystemColors.ControlLightLight;
buttonScreenAuto.BackColor = SystemColors.ControlLightLight;
labelSreen.Text = "Laptop Screen: " + frequency + "Hz" + ((overdrive == 1) ? " + Overdrive" : "");
}
bool screenEnabled = (frequency >= 0);
ButtonEnabled(button60Hz, screenEnabled);
ButtonEnabled(button120Hz, screenEnabled);
ButtonEnabled(buttonScreenAuto, screenEnabled);
ButtonEnabled(buttonMiniled, screenEnabled);
labelSreen.Text = screenEnabled
? "Laptop Screen: " + frequency + "Hz" + ((overdrive == 1) ? " + Overdrive" : "")
: "Laptop Screen: Turned off";
button60Hz.Activated = false;
button120Hz.Activated = false;
@@ -711,6 +703,13 @@ namespace GHelper
button120Hz.Text = maxFrequency.ToString() + "Hz + OD";
}
if (miniled >= 0)
{
tableScreen.Controls.Add(buttonMiniled, 3, 0);
buttonMiniled.Activated = (miniled == 1);
Program.config.setConfig("miniled", miniled);
}
Program.config.setConfig("frequency", frequency);
Program.config.setConfig("overdrive", overdrive);
}
@@ -1000,11 +999,11 @@ namespace GHelper
tablePerf.ColumnCount = 0;
tableGPU.ColumnCount = 0;
tableScreen.ColumnCount = 0;
}
tableLayoutKeyboard.ColumnCount = 0;
tableScreen.ColumnCount = 0;
tableLayoutMatrix.ColumnCount = 0;
@@ -1031,12 +1030,13 @@ namespace GHelper
}
Program.config.setConfig("gpu_mode", GpuMode);
ButtonEnabled(buttonOptimized, true);
ButtonEnabled(buttonEco, true);
ButtonEnabled(buttonStandard, true);
ButtonEnabled(buttonUltimate, true);
Program.config.setConfig("gpu_mode", GpuMode);
VisualiseGPUMode(GpuMode);
return GpuMode;
@@ -1060,7 +1060,7 @@ namespace GHelper
if (eco == 1)
{
string[] tokill = { "EADesktop" };
string[] tokill = { "EADesktop", "RadeonSoftware" };
foreach (string kill in tokill)
foreach (var process in Process.GetProcessesByName(kill)) process.Kill();
}
@@ -1204,10 +1204,10 @@ namespace GHelper
}
public void ButtonEnabled(Button but, bool enabled)
public void ButtonEnabled(RButton but, bool enabled)
{
but.Enabled = enabled;
but.BackColor = enabled ? SystemColors.ControlLightLight : SystemColors.ControlLight;
but.BackColor = but.Enabled ? Color.FromArgb(255, but.BackColor) : Color.FromArgb(100, but.BackColor);
}
public void SetStartupCheck(bool status)

View File

@@ -1,11 +1,10 @@
# [G-Helper (GHelper)](https://github.com/seerge/g-helper)
[![Github all releases](https://img.shields.io/github/downloads/seerge/g-helper/total.svg)](https://GitHub.com/seerge/g-helper/releases/) [![GitHub release](https://img.shields.io/github/release/seerge/g-helper.svg)](https://GitHub.com/seerge/g-helper/releases/) [![GitHub license](https://badgen.net/github/license/seerge/g-helper)](https://github.com/seerge/g-helper/blob/master/LICENSE)
[![GitHub stars](https://img.shields.io/github/stars/seerge/g-helper.svg?style=social&label=Star&maxAge=2592000)](https://GitHub.com/seerge/g-helper/stargazers/)
[![Github all releases](https://img.shields.io/github/downloads/seerge/g-helper/total.svg)](https://GitHub.com/seerge/g-helper/releases/) [![GitHub release](https://img.shields.io/github/release/seerge/g-helper.svg)](https://GitHub.com/seerge/g-helper/releases/) [![GitHub stars](https://img.shields.io/github/stars/seerge/g-helper.svg?style=social&label=Star&maxAge=2592000)](https://GitHub.com/seerge/g-helper/stargazers/)
## Open source Armory Crate alternative for Asus ROG Zephyrus G14, G15, Flow X13, Flow X16, and other models
## Open source Armoury Crate alternative for Asus ROG Zephyrus G14, G15, Flow X13, Flow X16, and other models
A small utility that allows you to do almost everything you could do with Armory Crate but without extra bloat and unnecessary services.
A small utility that allows you to do almost everything you could do with Armoury Crate but without extra bloat and unnecessary services.
### :gift: Main advantages
@@ -15,14 +14,14 @@ A small utility that allows you to do almost everything you could do with Armory
### [:floppy_disk: Download latest release](https://github.com/seerge/g-helper/releases/latest/download/GHelper.zip)
If you like this app, please star :star: it on Github and spread a word about it!
If you like this app, please [star :star: it on Github](https://github.com/seerge/g-helper) and spread a word about it!
![Screenshot](https://raw.githubusercontent.com/seerge/g-helper/main/docs/screenshot.png)
### :zap: Main features
1. Built-in **Performance modes**: Silent - Balanced - Turbo (with default fan curves)
2. **GPU modes**: Eco -Standard - Ultimate
2. **GPU modes**: Eco - Standard - Ultimate - Optimized
3. Laptop screen refresh rate 60hz or 120hz (144hz, etc depending on the model) with display overdrive (OD)
4. Default and custom fan profiles for every performance mode
5. Power limits (PPT) for every performance mode
@@ -36,8 +35,8 @@ If you like this app, please star :star: it on Github and spread a word about it
### :apple: Automatic switching of modes when on battery or plugged in
- Performance modes (app remembers last mode used on battery or when plugged)
- GPU modes (eco on battery, stanard when plugged)
- Screen refresh rate (60hz on battery, 120+ hz when plugged)
- Optimized GPU mode - disables dGPU on battery and enables when plugged
- Auto Screen refresh rate (60hz on battery, 120+ hz when plugged)
To keep auto switching and hotkeys working the app needs to stay in running in the tray. It doesn't consume any resources.
@@ -56,6 +55,7 @@ PPTs are shown for G14 2022, for other models PPTs will be different as they are
1. Eco mode : only low power integrated GPU enabled, iGPU drives built in display
2. Standard mode (Windows Hybrid) : iGPU and dGPU enabled, iGPU drives built in display
3. Ultimate mode: iGPU and dGPU enabled, but dGPU drives built in display (supported only on G14 2022 model)
4. Optimized (formely existed as a checkbox): disables dGPU on battery (Eco) and enables when plugged (Standard)
### :question: FAQ

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.6 MiB

After

Width:  |  Height:  |  Size: 4.2 MiB