mirror of
https://github.com/jkocon/g-helper.git
synced 2026-02-23 13:00:52 +01:00
Compare commits
10 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
64871e5554 | ||
|
|
b1c778b30d | ||
|
|
6932bb1889 | ||
|
|
c90a342ce8 | ||
|
|
f223ca4a33 | ||
|
|
023607da4b | ||
|
|
264631ab77 | ||
|
|
1bd5d79983 | ||
|
|
83b184a061 | ||
|
|
9ff572b8f6 |
@@ -12,6 +12,7 @@ public class ASUSWmi
|
|||||||
|
|
||||||
public const uint CPU_Fan = 0x00110013;
|
public const uint CPU_Fan = 0x00110013;
|
||||||
public const uint GPU_Fan = 0x00110014;
|
public const uint GPU_Fan = 0x00110014;
|
||||||
|
public const uint Mid_Fan = 0x00110031;
|
||||||
|
|
||||||
public const uint PerformanceMode = 0x00120075; // Thermal Control
|
public const uint PerformanceMode = 0x00120075; // Thermal Control
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,6 @@
|
|||||||
// Source thanks to https://github.com/vddCore/Starlight with some adjustments from me
|
// Source thanks to https://github.com/vddCore/Starlight with some adjustments from me
|
||||||
|
|
||||||
using Starlight.Communication;
|
using Starlight.Communication;
|
||||||
using System.Diagnostics;
|
|
||||||
using System.Management;
|
using System.Management;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
|
|
||||||
@@ -62,8 +61,7 @@ namespace Starlight.AnimeMatrix
|
|||||||
Off = 0,
|
Off = 0,
|
||||||
Dim = 1,
|
Dim = 1,
|
||||||
Medium = 2,
|
Medium = 2,
|
||||||
Full = 3,
|
Full = 3
|
||||||
Super = 4, //test, doesn't work
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -75,11 +73,11 @@ namespace Starlight.AnimeMatrix
|
|||||||
byte[] _displayBuffer;
|
byte[] _displayBuffer;
|
||||||
List<byte[]> frames = new List<byte[]>();
|
List<byte[]> frames = new List<byte[]>();
|
||||||
|
|
||||||
public int MaxColumns = 34;
|
|
||||||
public int MaxRows = 61;
|
public int MaxRows = 61;
|
||||||
public int FullRows = 11;
|
public int FullRows = 11;
|
||||||
|
public int FullEvenRows = -1;
|
||||||
|
|
||||||
public int EmptyFirstRow = 1;
|
public int MaxColumns = 34;
|
||||||
|
|
||||||
private int frameIndex = 0;
|
private int frameIndex = 0;
|
||||||
|
|
||||||
@@ -87,14 +85,13 @@ namespace Starlight.AnimeMatrix
|
|||||||
: base(0x0B05, 0x193B, 640)
|
: base(0x0B05, 0x193B, 640)
|
||||||
{
|
{
|
||||||
string model = GetModel();
|
string model = GetModel();
|
||||||
|
|
||||||
Logger.WriteLine("Animatrix: " + model);
|
|
||||||
|
|
||||||
if (model.Contains("401"))
|
if (model.Contains("401"))
|
||||||
{
|
{
|
||||||
EmptyFirstRow = 1;
|
|
||||||
FullRows = 6;
|
|
||||||
MaxColumns = 33;
|
MaxColumns = 33;
|
||||||
|
|
||||||
|
FullRows = 7;
|
||||||
|
FullEvenRows = 1;
|
||||||
|
|
||||||
MaxRows = 55;
|
MaxRows = 55;
|
||||||
LedCount = 1214;
|
LedCount = 1214;
|
||||||
UpdatePageLength = 410;
|
UpdatePageLength = 410;
|
||||||
@@ -154,7 +151,7 @@ namespace Starlight.AnimeMatrix
|
|||||||
|
|
||||||
public int XEnd(int row)
|
public int XEnd(int row)
|
||||||
{
|
{
|
||||||
if (row == 0) return MaxColumns - EmptyFirstRow;
|
if (row <= FullEvenRows && row % 2 == 0) return MaxColumns - 1;
|
||||||
return MaxColumns;
|
return MaxColumns;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -195,20 +192,14 @@ namespace Starlight.AnimeMatrix
|
|||||||
Set(Packet<AnimeMatrixPacket>(0xC0, 0x03));
|
Set(Packet<AnimeMatrixPacket>(0xC0, 0x03));
|
||||||
}
|
}
|
||||||
|
|
||||||
public int SetLedPlanar(int x, int y, byte value)
|
public void SetLedPlanar(int x, int y, byte value)
|
||||||
{
|
{
|
||||||
EnsureRowInRange(y);
|
EnsureRowInRange(y);
|
||||||
var start = RowToLinearAddress(y) - XStart(y);
|
var start = RowToLinearAddress(y) - XStart(y);
|
||||||
|
|
||||||
if (x >= XStart(y) && x < XEnd(y))
|
if (x >= XStart(y) && x < XEnd(y))
|
||||||
{
|
{
|
||||||
//Debug.Write((start + x).ToString("D4") + ",");
|
|
||||||
SetLedLinear(start + x, value);
|
SetLedLinear(start + x, value);
|
||||||
return start + x;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//Debug.Write(" ");
|
|
||||||
return -1;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void Clear(bool present = false)
|
public void Clear(bool present = false)
|
||||||
@@ -276,11 +267,37 @@ namespace Starlight.AnimeMatrix
|
|||||||
Set(Packet<AnimeMatrixPacket>(0xC5, animation.AsByte));
|
Set(Packet<AnimeMatrixPacket>(0xC5, animation.AsByte));
|
||||||
}
|
}
|
||||||
|
|
||||||
static int GetColor(Bitmap bmp, int x, int y)
|
|
||||||
|
|
||||||
|
public void PresentText(string text, float fontSize = 8F)
|
||||||
{
|
{
|
||||||
var pixel = bmp.GetPixel(Math.Max(0, Math.Min(bmp.Width - 1, x)), Math.Max(0, Math.Min(bmp.Height - 1, y)));
|
using (Bitmap bmp = new Bitmap(MaxColumns * 3, MaxRows))
|
||||||
return (Math.Max((pixel.R + pixel.G + pixel.B) / 3 - 10, 0));
|
{
|
||||||
|
using (Graphics g = Graphics.FromImage(bmp))
|
||||||
|
{
|
||||||
|
using (Font font = new Font("Arial", fontSize))
|
||||||
|
{
|
||||||
|
|
||||||
|
g.CompositingQuality = System.Drawing.Drawing2D.CompositingQuality.HighQuality;
|
||||||
|
g.SmoothingMode = System.Drawing.Drawing2D.SmoothingMode.HighQuality;
|
||||||
|
SizeF textSize = g.MeasureString(text, font);
|
||||||
|
|
||||||
|
/*
|
||||||
|
g.TranslateTransform(bmp.Width / 2, bmp.Height / 2);
|
||||||
|
g.RotateTransform(33);
|
||||||
|
g.DrawString(text, font, Brushes.White, -textSize.Width/2, -textSize.Height / 2);
|
||||||
|
*/
|
||||||
|
|
||||||
|
g.DrawString(text, font, Brushes.White, bmp.Width - textSize.Width + 5, 0);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
GenerateFrame(bmp);
|
||||||
|
Present();
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void GenerateFrame(Image image)
|
public void GenerateFrame(Image image)
|
||||||
{
|
{
|
||||||
|
|
||||||
@@ -288,46 +305,36 @@ namespace Starlight.AnimeMatrix
|
|||||||
int height = MaxRows;
|
int height = MaxRows;
|
||||||
float scale;
|
float scale;
|
||||||
|
|
||||||
Bitmap canvas = new Bitmap(width, height);
|
using (Bitmap canvas = new Bitmap(width, height))
|
||||||
|
|
||||||
scale = Math.Min((float)width / (float)image.Width, (float)height / (float)image.Height);
|
|
||||||
|
|
||||||
var graph = Graphics.FromImage(canvas);
|
|
||||||
var scaleWidth = (int)(image.Width * scale);
|
|
||||||
var scaleHeight = (int)(image.Height * scale);
|
|
||||||
|
|
||||||
graph.InterpolationMode = System.Drawing.Drawing2D.InterpolationMode.High;
|
|
||||||
graph.CompositingQuality = System.Drawing.Drawing2D.CompositingQuality.HighQuality;
|
|
||||||
graph.SmoothingMode = System.Drawing.Drawing2D.SmoothingMode.AntiAlias;
|
|
||||||
|
|
||||||
graph.DrawImage(image, ((int)width - scaleWidth), 0, scaleWidth, scaleHeight);
|
|
||||||
|
|
||||||
int addr, counter = 0;
|
|
||||||
|
|
||||||
Bitmap bmp = new Bitmap(canvas, MaxColumns * 2, MaxRows);
|
|
||||||
|
|
||||||
for (int y = 0; y < bmp.Height; y++)
|
|
||||||
{
|
{
|
||||||
for (int x = 0; x < bmp.Width; x++)
|
scale = Math.Min((float)width / (float)image.Width, (float)height / (float)image.Height);
|
||||||
|
|
||||||
|
using (var graph = Graphics.FromImage(canvas))
|
||||||
{
|
{
|
||||||
if (x % 2 == y % 2)
|
var scaleWidth = (int)(image.Width * scale);
|
||||||
{
|
var scaleHeight = (int)(image.Height * scale);
|
||||||
var color = GetColor(bmp, x, y);
|
|
||||||
//var color2= GetColor(bmp, x+1, y);
|
|
||||||
addr = SetLedPlanar(x / 2, y, (byte)color);
|
|
||||||
if (addr != -1) {
|
|
||||||
if (addr != counter)
|
|
||||||
Debug.Write("ERROR");
|
|
||||||
counter++;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
graph.InterpolationMode = System.Drawing.Drawing2D.InterpolationMode.High;
|
||||||
|
graph.CompositingQuality = System.Drawing.Drawing2D.CompositingQuality.HighQuality;
|
||||||
|
graph.SmoothingMode = System.Drawing.Drawing2D.SmoothingMode.AntiAlias;
|
||||||
|
|
||||||
|
graph.DrawImage(image, ((int)width - scaleWidth), 0, scaleWidth, scaleHeight);
|
||||||
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
//Debug.Write("\n");
|
|
||||||
|
using (Bitmap bmp = new Bitmap(canvas, MaxColumns * 2, MaxRows))
|
||||||
|
{
|
||||||
|
for (int y = 0; y < bmp.Height; y++)
|
||||||
|
for (int x = 0; x < bmp.Width; x++)
|
||||||
|
if (x % 2 == y % 2)
|
||||||
|
{
|
||||||
|
var pixel = bmp.GetPixel(x, y);
|
||||||
|
SetLedPlanar(x / 2, y, (byte)((pixel.R + pixel.G + pixel.B)/3));
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void EnsureRowInRange(int row)
|
private void EnsureRowInRange(int row)
|
||||||
|
|||||||
@@ -36,7 +36,7 @@ public static class ControlHelper
|
|||||||
foreMain = SystemColors.ControlText;
|
foreMain = SystemColors.ControlText;
|
||||||
foreAccent = Color.LightGray;
|
foreAccent = Color.LightGray;
|
||||||
borderMain = Color.LightGray;
|
borderMain = Color.LightGray;
|
||||||
buttonMain = SystemColors.ControlLight;
|
buttonMain = Color.FromArgb(255, 230, 230, 230);
|
||||||
}
|
}
|
||||||
|
|
||||||
container.BackColor = formBack;
|
container.BackColor = formBack;
|
||||||
@@ -45,6 +45,7 @@ public static class ControlHelper
|
|||||||
_invert = invert;
|
_invert = invert;
|
||||||
AdjustControls(container.Controls);
|
AdjustControls(container.Controls);
|
||||||
_invert = false;
|
_invert = false;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void Resize(RForm container, float baseScale = 2)
|
public static void Resize(RForm container, float baseScale = 2)
|
||||||
|
|||||||
@@ -19,7 +19,7 @@ namespace CustomControls
|
|||||||
[DllImport("DwmApi")] //System.Runtime.InteropServices
|
[DllImport("DwmApi")] //System.Runtime.InteropServices
|
||||||
private static extern int DwmSetWindowAttribute(IntPtr hwnd, int attr, int[] attrValue, int attrSize);
|
private static extern int DwmSetWindowAttribute(IntPtr hwnd, int attr, int[] attrValue, int attrSize);
|
||||||
|
|
||||||
public bool darkTheme = false;
|
public bool darkTheme;
|
||||||
|
|
||||||
private static bool IsDarkTheme()
|
private static bool IsDarkTheme()
|
||||||
{
|
{
|
||||||
@@ -39,8 +39,12 @@ namespace CustomControls
|
|||||||
if (setDPI)
|
if (setDPI)
|
||||||
ControlHelper.Resize(this);
|
ControlHelper.Resize(this);
|
||||||
|
|
||||||
DwmSetWindowAttribute(this.Handle, 20, new[] { darkTheme ? 1 : 0 }, 4);
|
if (changed)
|
||||||
ControlHelper.Adjust(this, darkTheme, changed);
|
{
|
||||||
|
DwmSetWindowAttribute(this.Handle, 20, new[] { darkTheme ? 1 : 0 }, 4);
|
||||||
|
ControlHelper.Adjust(this, darkTheme, changed);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -67,8 +71,8 @@ namespace CustomControls
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
private Color buttonColor = Color.LightGray;
|
private Color buttonColor = Color.FromArgb(255,230, 230, 230);
|
||||||
[DefaultValue(typeof(Color), "LightGray")]
|
[DefaultValue(typeof(Color), "230, 230, 230")]
|
||||||
public Color ButtonColor
|
public Color ButtonColor
|
||||||
{
|
{
|
||||||
get { return buttonColor; }
|
get { return buttonColor; }
|
||||||
@@ -235,13 +239,18 @@ namespace CustomControls
|
|||||||
{
|
{
|
||||||
//Fields
|
//Fields
|
||||||
private int borderSize = 5;
|
private int borderSize = 5;
|
||||||
private int borderRadius = 5;
|
|
||||||
|
|
||||||
private bool activated = false;
|
private int borderRadius = 5;
|
||||||
private bool secondary = false;
|
public int BorderRadius
|
||||||
|
{
|
||||||
|
get { return borderRadius; }
|
||||||
|
set
|
||||||
|
{
|
||||||
|
borderRadius = value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private Color borderColor = Color.Transparent;
|
private Color borderColor = Color.Transparent;
|
||||||
|
|
||||||
public Color BorderColor
|
public Color BorderColor
|
||||||
{
|
{
|
||||||
get { return borderColor; }
|
get { return borderColor; }
|
||||||
@@ -252,6 +261,7 @@ namespace CustomControls
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
private bool activated = false;
|
||||||
public bool Activated
|
public bool Activated
|
||||||
{
|
{
|
||||||
get { return activated; }
|
get { return activated; }
|
||||||
@@ -264,6 +274,7 @@ namespace CustomControls
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private bool secondary = false;
|
||||||
public bool Secondary
|
public bool Secondary
|
||||||
{
|
{
|
||||||
get { return secondary; }
|
get { return secondary; }
|
||||||
|
|||||||
30
app/Fans.Designer.cs
generated
30
app/Fans.Designer.cs
generated
@@ -203,6 +203,7 @@ namespace GHelper
|
|||||||
chartMid.Text = "chartMid";
|
chartMid.Text = "chartMid";
|
||||||
title3.Name = "Title3";
|
title3.Name = "Title3";
|
||||||
chartMid.Titles.Add(title3);
|
chartMid.Titles.Add(title3);
|
||||||
|
chartMid.Visible = false;
|
||||||
//
|
//
|
||||||
// labelFans
|
// labelFans
|
||||||
//
|
//
|
||||||
@@ -231,8 +232,9 @@ namespace GHelper
|
|||||||
//
|
//
|
||||||
buttonReset.Activated = false;
|
buttonReset.Activated = false;
|
||||||
buttonReset.Anchor = AnchorStyles.Bottom | AnchorStyles.Left;
|
buttonReset.Anchor = AnchorStyles.Bottom | AnchorStyles.Left;
|
||||||
buttonReset.BackColor = SystemColors.ControlLight;
|
buttonReset.BackColor = Color.FromArgb(230, 230, 230);
|
||||||
buttonReset.BorderColor = Color.Transparent;
|
buttonReset.BorderColor = Color.Transparent;
|
||||||
|
buttonReset.BorderRadius = 2;
|
||||||
buttonReset.FlatStyle = FlatStyle.Flat;
|
buttonReset.FlatStyle = FlatStyle.Flat;
|
||||||
buttonReset.Location = new Point(30, 1081);
|
buttonReset.Location = new Point(30, 1081);
|
||||||
buttonReset.Margin = new Padding(4, 2, 4, 2);
|
buttonReset.Margin = new Padding(4, 2, 4, 2);
|
||||||
@@ -247,8 +249,9 @@ namespace GHelper
|
|||||||
//
|
//
|
||||||
buttonApply.Activated = false;
|
buttonApply.Activated = false;
|
||||||
buttonApply.Anchor = AnchorStyles.Bottom | AnchorStyles.Right;
|
buttonApply.Anchor = AnchorStyles.Bottom | AnchorStyles.Right;
|
||||||
buttonApply.BackColor = SystemColors.ControlLight;
|
buttonApply.BackColor = Color.FromArgb(230, 230, 230);
|
||||||
buttonApply.BorderColor = Color.Transparent;
|
buttonApply.BorderColor = Color.Transparent;
|
||||||
|
buttonApply.BorderRadius = 2;
|
||||||
buttonApply.FlatStyle = FlatStyle.Flat;
|
buttonApply.FlatStyle = FlatStyle.Flat;
|
||||||
buttonApply.Location = new Point(542, 1081);
|
buttonApply.Location = new Point(542, 1081);
|
||||||
buttonApply.Margin = new Padding(4, 2, 4, 2);
|
buttonApply.Margin = new Padding(4, 2, 4, 2);
|
||||||
@@ -256,7 +259,7 @@ namespace GHelper
|
|||||||
buttonApply.Secondary = true;
|
buttonApply.Secondary = true;
|
||||||
buttonApply.Size = new Size(248, 44);
|
buttonApply.Size = new Size(248, 44);
|
||||||
buttonApply.TabIndex = 14;
|
buttonApply.TabIndex = 14;
|
||||||
buttonApply.Text = "Apply Fan Curve";
|
buttonApply.Text = "Apply Custom Curve";
|
||||||
buttonApply.UseVisualStyleBackColor = false;
|
buttonApply.UseVisualStyleBackColor = false;
|
||||||
//
|
//
|
||||||
// panelPower
|
// panelPower
|
||||||
@@ -317,8 +320,9 @@ namespace GHelper
|
|||||||
//
|
//
|
||||||
buttonApplyPower.Activated = false;
|
buttonApplyPower.Activated = false;
|
||||||
buttonApplyPower.Anchor = AnchorStyles.Bottom | AnchorStyles.Left | AnchorStyles.Right;
|
buttonApplyPower.Anchor = AnchorStyles.Bottom | AnchorStyles.Left | AnchorStyles.Right;
|
||||||
buttonApplyPower.BackColor = SystemColors.ControlLight;
|
buttonApplyPower.BackColor = Color.FromArgb(230, 230, 230);
|
||||||
buttonApplyPower.BorderColor = Color.Transparent;
|
buttonApplyPower.BorderColor = Color.Transparent;
|
||||||
|
buttonApplyPower.BorderRadius = 2;
|
||||||
buttonApplyPower.FlatStyle = FlatStyle.Flat;
|
buttonApplyPower.FlatStyle = FlatStyle.Flat;
|
||||||
buttonApplyPower.Location = new Point(20, 1081);
|
buttonApplyPower.Location = new Point(20, 1081);
|
||||||
buttonApplyPower.Margin = new Padding(4, 2, 4, 2);
|
buttonApplyPower.Margin = new Padding(4, 2, 4, 2);
|
||||||
@@ -342,12 +346,11 @@ namespace GHelper
|
|||||||
//
|
//
|
||||||
// labelCPU
|
// labelCPU
|
||||||
//
|
//
|
||||||
labelCPU.AutoSize = true;
|
|
||||||
labelCPU.Font = new Font("Segoe UI", 9F, FontStyle.Bold, GraphicsUnit.Point);
|
labelCPU.Font = new Font("Segoe UI", 9F, FontStyle.Bold, GraphicsUnit.Point);
|
||||||
labelCPU.Location = new Point(44, 40);
|
labelCPU.Location = new Point(13, 40);
|
||||||
labelCPU.Margin = new Padding(4, 0, 4, 0);
|
labelCPU.Margin = new Padding(4, 0, 4, 0);
|
||||||
labelCPU.Name = "labelCPU";
|
labelCPU.Name = "labelCPU";
|
||||||
labelCPU.Size = new Size(61, 32);
|
labelCPU.Size = new Size(120, 32);
|
||||||
labelCPU.TabIndex = 13;
|
labelCPU.TabIndex = 13;
|
||||||
labelCPU.Text = "CPU";
|
labelCPU.Text = "CPU";
|
||||||
labelCPU.TextAlign = ContentAlignment.MiddleCenter;
|
labelCPU.TextAlign = ContentAlignment.MiddleCenter;
|
||||||
@@ -389,25 +392,24 @@ namespace GHelper
|
|||||||
//
|
//
|
||||||
// labelTotal
|
// labelTotal
|
||||||
//
|
//
|
||||||
labelTotal.AutoSize = true;
|
|
||||||
labelTotal.Font = new Font("Segoe UI", 9F, FontStyle.Bold, GraphicsUnit.Point);
|
labelTotal.Font = new Font("Segoe UI", 9F, FontStyle.Bold, GraphicsUnit.Point);
|
||||||
labelTotal.Location = new Point(46, 40);
|
labelTotal.Location = new Point(16, 40);
|
||||||
labelTotal.Margin = new Padding(4, 0, 4, 0);
|
labelTotal.Margin = new Padding(4, 0, 4, 0);
|
||||||
labelTotal.Name = "labelTotal";
|
labelTotal.Name = "labelTotal";
|
||||||
labelTotal.Size = new Size(70, 32);
|
labelTotal.Size = new Size(122, 32);
|
||||||
labelTotal.TabIndex = 12;
|
labelTotal.TabIndex = 12;
|
||||||
labelTotal.Text = "Total";
|
labelTotal.Text = "Platform";
|
||||||
labelTotal.TextAlign = ContentAlignment.MiddleCenter;
|
labelTotal.TextAlign = ContentAlignment.MiddleCenter;
|
||||||
//
|
//
|
||||||
// label1
|
// label1
|
||||||
//
|
//
|
||||||
label1.AutoSize = true;
|
label1.AutoSize = true;
|
||||||
label1.Location = new Point(48, 8);
|
label1.Location = new Point(26, 8);
|
||||||
label1.Margin = new Padding(4, 0, 4, 0);
|
label1.Margin = new Padding(4, 0, 4, 0);
|
||||||
label1.Name = "label1";
|
label1.Name = "label1";
|
||||||
label1.Size = new Size(65, 32);
|
label1.Size = new Size(104, 32);
|
||||||
label1.TabIndex = 11;
|
label1.TabIndex = 11;
|
||||||
label1.Text = "Total";
|
label1.Text = "Platform";
|
||||||
label1.TextAlign = ContentAlignment.MiddleCenter;
|
label1.TextAlign = ContentAlignment.MiddleCenter;
|
||||||
//
|
//
|
||||||
// trackTotal
|
// trackTotal
|
||||||
|
|||||||
@@ -277,11 +277,12 @@ namespace GHelper
|
|||||||
if (curve.All(singleByte => singleByte == 0))
|
if (curve.All(singleByte => singleByte == 0))
|
||||||
{
|
{
|
||||||
Program.config.setConfig("mid_fan", 0);
|
Program.config.setConfig("mid_fan", 0);
|
||||||
chartMid.Visible = false;
|
|
||||||
|
|
||||||
} else
|
}
|
||||||
|
else
|
||||||
{
|
{
|
||||||
Program.config.setConfig("mid_fan", 1);
|
Program.config.setConfig("mid_fan", 1);
|
||||||
|
chartMid.Visible = true;
|
||||||
SetChart(chartMid, 2);
|
SetChart(chartMid, 2);
|
||||||
LoadProfile(seriesMid, 2);
|
LoadProfile(seriesMid, 2);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -16,7 +16,7 @@
|
|||||||
<PlatformTarget>x64</PlatformTarget>
|
<PlatformTarget>x64</PlatformTarget>
|
||||||
<ProduceReferenceAssembly>False</ProduceReferenceAssembly>
|
<ProduceReferenceAssembly>False</ProduceReferenceAssembly>
|
||||||
<AllowUnsafeBlocks>True</AllowUnsafeBlocks>
|
<AllowUnsafeBlocks>True</AllowUnsafeBlocks>
|
||||||
<AssemblyVersion>0.35</AssemblyVersion>
|
<AssemblyVersion>0.36</AssemblyVersion>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
|||||||
@@ -86,9 +86,5 @@ public static class HardwareMonitor
|
|||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
finally
|
|
||||||
{
|
|
||||||
Logger.WriteLine($"GpuTemperatureProvider: {GpuTemperatureProvider?.GetType().Name}");
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -56,7 +56,8 @@ namespace GHelper
|
|||||||
|
|
||||||
ds = settingsForm.Handle;
|
ds = settingsForm.Handle;
|
||||||
|
|
||||||
trayIcon.MouseClick += TrayIcon_MouseClick; ;
|
trayIcon.MouseClick += TrayIcon_MouseClick;
|
||||||
|
|
||||||
|
|
||||||
wmi.SubscribeToEvents(WatcherEventArrived);
|
wmi.SubscribeToEvents(WatcherEventArrived);
|
||||||
|
|
||||||
@@ -77,8 +78,15 @@ namespace GHelper
|
|||||||
SystemEvents.PowerModeChanged += SystemEvents_PowerModeChanged;
|
SystemEvents.PowerModeChanged += SystemEvents_PowerModeChanged;
|
||||||
|
|
||||||
CheckForUpdates();
|
CheckForUpdates();
|
||||||
|
|
||||||
|
if (Environment.CurrentDirectory.Trim('\\') == Application.StartupPath.Trim('\\'))
|
||||||
|
{
|
||||||
|
SettingsToggle();
|
||||||
|
}
|
||||||
|
|
||||||
Application.Run();
|
Application.Run();
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
86
app/Settings.Designer.cs
generated
86
app/Settings.Designer.cs
generated
@@ -68,11 +68,13 @@ namespace GHelper
|
|||||||
buttonOptimized = new RButton();
|
buttonOptimized = new RButton();
|
||||||
buttonUltimate = new RButton();
|
buttonUltimate = new RButton();
|
||||||
panelScreen = new Panel();
|
panelScreen = new Panel();
|
||||||
|
labelMidFan = new Label();
|
||||||
labelTipScreen = new Label();
|
labelTipScreen = new Label();
|
||||||
tableScreen = new TableLayoutPanel();
|
tableScreen = new TableLayoutPanel();
|
||||||
buttonScreenAuto = new RButton();
|
buttonScreenAuto = new RButton();
|
||||||
button60Hz = new RButton();
|
button60Hz = new RButton();
|
||||||
button120Hz = new RButton();
|
button120Hz = new RButton();
|
||||||
|
buttonMiniled = new RButton();
|
||||||
pictureScreen = new PictureBox();
|
pictureScreen = new PictureBox();
|
||||||
labelSreen = new Label();
|
labelSreen = new Label();
|
||||||
panelKeyboard = new Panel();
|
panelKeyboard = new Panel();
|
||||||
@@ -85,7 +87,6 @@ namespace GHelper
|
|||||||
buttonKeyboardColor = new RButton();
|
buttonKeyboardColor = new RButton();
|
||||||
pictureKeyboard = new PictureBox();
|
pictureKeyboard = new PictureBox();
|
||||||
labelKeyboard = new Label();
|
labelKeyboard = new Label();
|
||||||
buttonMiniled = new RButton();
|
|
||||||
panelMatrix.SuspendLayout();
|
panelMatrix.SuspendLayout();
|
||||||
tableLayoutMatrix.SuspendLayout();
|
tableLayoutMatrix.SuspendLayout();
|
||||||
((System.ComponentModel.ISupportInitialize)pictureMatrix).BeginInit();
|
((System.ComponentModel.ISupportInitialize)pictureMatrix).BeginInit();
|
||||||
@@ -178,8 +179,9 @@ namespace GHelper
|
|||||||
// buttonMatrix
|
// buttonMatrix
|
||||||
//
|
//
|
||||||
buttonMatrix.Activated = false;
|
buttonMatrix.Activated = false;
|
||||||
buttonMatrix.BackColor = SystemColors.ControlLight;
|
buttonMatrix.BackColor = Color.FromArgb(230, 230, 230);
|
||||||
buttonMatrix.BorderColor = Color.Transparent;
|
buttonMatrix.BorderColor = Color.Transparent;
|
||||||
|
buttonMatrix.BorderRadius = 2;
|
||||||
buttonMatrix.Dock = DockStyle.Top;
|
buttonMatrix.Dock = DockStyle.Top;
|
||||||
buttonMatrix.FlatAppearance.BorderSize = 0;
|
buttonMatrix.FlatAppearance.BorderSize = 0;
|
||||||
buttonMatrix.FlatStyle = FlatStyle.Flat;
|
buttonMatrix.FlatStyle = FlatStyle.Flat;
|
||||||
@@ -200,7 +202,7 @@ namespace GHelper
|
|||||||
comboMatrixRunning.Font = new Font("Segoe UI", 9F, FontStyle.Regular, GraphicsUnit.Point);
|
comboMatrixRunning.Font = new Font("Segoe UI", 9F, FontStyle.Regular, GraphicsUnit.Point);
|
||||||
comboMatrixRunning.FormattingEnabled = true;
|
comboMatrixRunning.FormattingEnabled = true;
|
||||||
comboMatrixRunning.ItemHeight = 32;
|
comboMatrixRunning.ItemHeight = 32;
|
||||||
comboMatrixRunning.Items.AddRange(new object[] { "Binary Banner", "Rog Logo", "Picture" });
|
comboMatrixRunning.Items.AddRange(new object[] { "Binary Banner", "Rog Logo", "Picture", "Clock" });
|
||||||
comboMatrixRunning.Location = new Point(197, 10);
|
comboMatrixRunning.Location = new Point(197, 10);
|
||||||
comboMatrixRunning.Margin = new Padding(4, 10, 4, 8);
|
comboMatrixRunning.Margin = new Padding(4, 10, 4, 8);
|
||||||
comboMatrixRunning.Name = "comboMatrixRunning";
|
comboMatrixRunning.Name = "comboMatrixRunning";
|
||||||
@@ -325,14 +327,15 @@ namespace GHelper
|
|||||||
//
|
//
|
||||||
buttonQuit.Activated = false;
|
buttonQuit.Activated = false;
|
||||||
buttonQuit.Anchor = AnchorStyles.Top | AnchorStyles.Right;
|
buttonQuit.Anchor = AnchorStyles.Top | AnchorStyles.Right;
|
||||||
buttonQuit.BackColor = SystemColors.ControlLight;
|
buttonQuit.BackColor = Color.FromArgb(230, 230, 230);
|
||||||
buttonQuit.BorderColor = Color.Transparent;
|
buttonQuit.BorderColor = Color.Transparent;
|
||||||
|
buttonQuit.BorderRadius = 2;
|
||||||
buttonQuit.FlatStyle = FlatStyle.Flat;
|
buttonQuit.FlatStyle = FlatStyle.Flat;
|
||||||
buttonQuit.Location = new Point(578, 16);
|
buttonQuit.Location = new Point(599, 16);
|
||||||
buttonQuit.Margin = new Padding(8, 4, 8, 4);
|
buttonQuit.Margin = new Padding(8, 4, 8, 4);
|
||||||
buttonQuit.Name = "buttonQuit";
|
buttonQuit.Name = "buttonQuit";
|
||||||
buttonQuit.Secondary = true;
|
buttonQuit.Secondary = true;
|
||||||
buttonQuit.Size = new Size(208, 44);
|
buttonQuit.Size = new Size(185, 44);
|
||||||
buttonQuit.TabIndex = 18;
|
buttonQuit.TabIndex = 18;
|
||||||
buttonQuit.Text = "Quit";
|
buttonQuit.Text = "Quit";
|
||||||
buttonQuit.UseVisualStyleBackColor = false;
|
buttonQuit.UseVisualStyleBackColor = false;
|
||||||
@@ -390,6 +393,7 @@ namespace GHelper
|
|||||||
// labelCPUFan
|
// labelCPUFan
|
||||||
//
|
//
|
||||||
labelCPUFan.Anchor = AnchorStyles.Top | AnchorStyles.Right;
|
labelCPUFan.Anchor = AnchorStyles.Top | AnchorStyles.Right;
|
||||||
|
labelCPUFan.Cursor = Cursors.Hand;
|
||||||
labelCPUFan.Location = new Point(384, 15);
|
labelCPUFan.Location = new Point(384, 15);
|
||||||
labelCPUFan.Margin = new Padding(8, 0, 8, 0);
|
labelCPUFan.Margin = new Padding(8, 0, 8, 0);
|
||||||
labelCPUFan.Name = "labelCPUFan";
|
labelCPUFan.Name = "labelCPUFan";
|
||||||
@@ -426,6 +430,7 @@ namespace GHelper
|
|||||||
buttonSilent.BackColor = SystemColors.ControlLightLight;
|
buttonSilent.BackColor = SystemColors.ControlLightLight;
|
||||||
buttonSilent.BackgroundImageLayout = ImageLayout.None;
|
buttonSilent.BackgroundImageLayout = ImageLayout.None;
|
||||||
buttonSilent.BorderColor = Color.Transparent;
|
buttonSilent.BorderColor = Color.Transparent;
|
||||||
|
buttonSilent.BorderRadius = 5;
|
||||||
buttonSilent.CausesValidation = false;
|
buttonSilent.CausesValidation = false;
|
||||||
buttonSilent.Dock = DockStyle.Fill;
|
buttonSilent.Dock = DockStyle.Fill;
|
||||||
buttonSilent.FlatAppearance.BorderSize = 0;
|
buttonSilent.FlatAppearance.BorderSize = 0;
|
||||||
@@ -448,6 +453,7 @@ namespace GHelper
|
|||||||
buttonBalanced.Activated = false;
|
buttonBalanced.Activated = false;
|
||||||
buttonBalanced.BackColor = SystemColors.ControlLightLight;
|
buttonBalanced.BackColor = SystemColors.ControlLightLight;
|
||||||
buttonBalanced.BorderColor = Color.Transparent;
|
buttonBalanced.BorderColor = Color.Transparent;
|
||||||
|
buttonBalanced.BorderRadius = 5;
|
||||||
buttonBalanced.Dock = DockStyle.Fill;
|
buttonBalanced.Dock = DockStyle.Fill;
|
||||||
buttonBalanced.FlatAppearance.BorderSize = 0;
|
buttonBalanced.FlatAppearance.BorderSize = 0;
|
||||||
buttonBalanced.FlatStyle = FlatStyle.Flat;
|
buttonBalanced.FlatStyle = FlatStyle.Flat;
|
||||||
@@ -469,6 +475,7 @@ namespace GHelper
|
|||||||
buttonTurbo.Activated = false;
|
buttonTurbo.Activated = false;
|
||||||
buttonTurbo.BackColor = SystemColors.ControlLightLight;
|
buttonTurbo.BackColor = SystemColors.ControlLightLight;
|
||||||
buttonTurbo.BorderColor = Color.Transparent;
|
buttonTurbo.BorderColor = Color.Transparent;
|
||||||
|
buttonTurbo.BorderRadius = 5;
|
||||||
buttonTurbo.Dock = DockStyle.Fill;
|
buttonTurbo.Dock = DockStyle.Fill;
|
||||||
buttonTurbo.FlatAppearance.BorderSize = 0;
|
buttonTurbo.FlatAppearance.BorderSize = 0;
|
||||||
buttonTurbo.FlatStyle = FlatStyle.Flat;
|
buttonTurbo.FlatStyle = FlatStyle.Flat;
|
||||||
@@ -488,8 +495,9 @@ namespace GHelper
|
|||||||
// buttonFans
|
// buttonFans
|
||||||
//
|
//
|
||||||
buttonFans.Activated = false;
|
buttonFans.Activated = false;
|
||||||
buttonFans.BackColor = SystemColors.ControlLight;
|
buttonFans.BackColor = Color.FromArgb(230, 230, 230);
|
||||||
buttonFans.BorderColor = Color.Transparent;
|
buttonFans.BorderColor = Color.Transparent;
|
||||||
|
buttonFans.BorderRadius = 5;
|
||||||
buttonFans.Dock = DockStyle.Fill;
|
buttonFans.Dock = DockStyle.Fill;
|
||||||
buttonFans.FlatAppearance.BorderSize = 0;
|
buttonFans.FlatAppearance.BorderSize = 0;
|
||||||
buttonFans.FlatStyle = FlatStyle.Flat;
|
buttonFans.FlatStyle = FlatStyle.Flat;
|
||||||
@@ -592,6 +600,7 @@ namespace GHelper
|
|||||||
buttonEco.Activated = false;
|
buttonEco.Activated = false;
|
||||||
buttonEco.BackColor = SystemColors.ControlLightLight;
|
buttonEco.BackColor = SystemColors.ControlLightLight;
|
||||||
buttonEco.BorderColor = Color.Transparent;
|
buttonEco.BorderColor = Color.Transparent;
|
||||||
|
buttonEco.BorderRadius = 5;
|
||||||
buttonEco.CausesValidation = false;
|
buttonEco.CausesValidation = false;
|
||||||
buttonEco.Dock = DockStyle.Top;
|
buttonEco.Dock = DockStyle.Top;
|
||||||
buttonEco.FlatAppearance.BorderSize = 0;
|
buttonEco.FlatAppearance.BorderSize = 0;
|
||||||
@@ -614,6 +623,7 @@ namespace GHelper
|
|||||||
buttonStandard.Activated = false;
|
buttonStandard.Activated = false;
|
||||||
buttonStandard.BackColor = SystemColors.ControlLightLight;
|
buttonStandard.BackColor = SystemColors.ControlLightLight;
|
||||||
buttonStandard.BorderColor = Color.Transparent;
|
buttonStandard.BorderColor = Color.Transparent;
|
||||||
|
buttonStandard.BorderRadius = 5;
|
||||||
buttonStandard.Dock = DockStyle.Top;
|
buttonStandard.Dock = DockStyle.Top;
|
||||||
buttonStandard.FlatAppearance.BorderSize = 0;
|
buttonStandard.FlatAppearance.BorderSize = 0;
|
||||||
buttonStandard.FlatStyle = FlatStyle.Flat;
|
buttonStandard.FlatStyle = FlatStyle.Flat;
|
||||||
@@ -635,6 +645,7 @@ namespace GHelper
|
|||||||
buttonOptimized.Activated = false;
|
buttonOptimized.Activated = false;
|
||||||
buttonOptimized.BackColor = SystemColors.ControlLightLight;
|
buttonOptimized.BackColor = SystemColors.ControlLightLight;
|
||||||
buttonOptimized.BorderColor = Color.Transparent;
|
buttonOptimized.BorderColor = Color.Transparent;
|
||||||
|
buttonOptimized.BorderRadius = 5;
|
||||||
buttonOptimized.Dock = DockStyle.Top;
|
buttonOptimized.Dock = DockStyle.Top;
|
||||||
buttonOptimized.FlatAppearance.BorderSize = 0;
|
buttonOptimized.FlatAppearance.BorderSize = 0;
|
||||||
buttonOptimized.FlatStyle = FlatStyle.Flat;
|
buttonOptimized.FlatStyle = FlatStyle.Flat;
|
||||||
@@ -656,6 +667,7 @@ namespace GHelper
|
|||||||
buttonUltimate.Activated = false;
|
buttonUltimate.Activated = false;
|
||||||
buttonUltimate.BackColor = SystemColors.ControlLightLight;
|
buttonUltimate.BackColor = SystemColors.ControlLightLight;
|
||||||
buttonUltimate.BorderColor = Color.Transparent;
|
buttonUltimate.BorderColor = Color.Transparent;
|
||||||
|
buttonUltimate.BorderRadius = 5;
|
||||||
buttonUltimate.Dock = DockStyle.Top;
|
buttonUltimate.Dock = DockStyle.Top;
|
||||||
buttonUltimate.FlatAppearance.BorderSize = 0;
|
buttonUltimate.FlatAppearance.BorderSize = 0;
|
||||||
buttonUltimate.FlatStyle = FlatStyle.Flat;
|
buttonUltimate.FlatStyle = FlatStyle.Flat;
|
||||||
@@ -676,6 +688,7 @@ namespace GHelper
|
|||||||
//
|
//
|
||||||
panelScreen.AutoSize = true;
|
panelScreen.AutoSize = true;
|
||||||
panelScreen.AutoSizeMode = AutoSizeMode.GrowAndShrink;
|
panelScreen.AutoSizeMode = AutoSizeMode.GrowAndShrink;
|
||||||
|
panelScreen.Controls.Add(labelMidFan);
|
||||||
panelScreen.Controls.Add(labelTipScreen);
|
panelScreen.Controls.Add(labelTipScreen);
|
||||||
panelScreen.Controls.Add(tableScreen);
|
panelScreen.Controls.Add(tableScreen);
|
||||||
panelScreen.Controls.Add(pictureScreen);
|
panelScreen.Controls.Add(pictureScreen);
|
||||||
@@ -688,6 +701,17 @@ namespace GHelper
|
|||||||
panelScreen.Size = new Size(810, 181);
|
panelScreen.Size = new Size(810, 181);
|
||||||
panelScreen.TabIndex = 38;
|
panelScreen.TabIndex = 38;
|
||||||
//
|
//
|
||||||
|
// labelMidFan
|
||||||
|
//
|
||||||
|
labelMidFan.Anchor = AnchorStyles.Top | AnchorStyles.Right;
|
||||||
|
labelMidFan.Location = new Point(488, 13);
|
||||||
|
labelMidFan.Margin = new Padding(8, 0, 8, 0);
|
||||||
|
labelMidFan.Name = "labelMidFan";
|
||||||
|
labelMidFan.Size = new Size(296, 34);
|
||||||
|
labelMidFan.TabIndex = 25;
|
||||||
|
labelMidFan.Text = " ";
|
||||||
|
labelMidFan.TextAlign = ContentAlignment.TopRight;
|
||||||
|
//
|
||||||
// labelTipScreen
|
// labelTipScreen
|
||||||
//
|
//
|
||||||
labelTipScreen.ForeColor = SystemColors.GrayText;
|
labelTipScreen.ForeColor = SystemColors.GrayText;
|
||||||
@@ -711,7 +735,6 @@ namespace GHelper
|
|||||||
tableScreen.Controls.Add(button60Hz, 1, 0);
|
tableScreen.Controls.Add(button60Hz, 1, 0);
|
||||||
tableScreen.Controls.Add(button120Hz, 2, 0);
|
tableScreen.Controls.Add(button120Hz, 2, 0);
|
||||||
tableScreen.Controls.Add(buttonMiniled, 3, 0);
|
tableScreen.Controls.Add(buttonMiniled, 3, 0);
|
||||||
|
|
||||||
tableScreen.Location = new Point(16, 51);
|
tableScreen.Location = new Point(16, 51);
|
||||||
tableScreen.Margin = new Padding(8, 4, 8, 4);
|
tableScreen.Margin = new Padding(8, 4, 8, 4);
|
||||||
tableScreen.Name = "tableScreen";
|
tableScreen.Name = "tableScreen";
|
||||||
@@ -725,6 +748,7 @@ namespace GHelper
|
|||||||
buttonScreenAuto.Activated = false;
|
buttonScreenAuto.Activated = false;
|
||||||
buttonScreenAuto.BackColor = SystemColors.ControlLightLight;
|
buttonScreenAuto.BackColor = SystemColors.ControlLightLight;
|
||||||
buttonScreenAuto.BorderColor = Color.Transparent;
|
buttonScreenAuto.BorderColor = Color.Transparent;
|
||||||
|
buttonScreenAuto.BorderRadius = 5;
|
||||||
buttonScreenAuto.Dock = DockStyle.Fill;
|
buttonScreenAuto.Dock = DockStyle.Fill;
|
||||||
buttonScreenAuto.FlatAppearance.BorderSize = 0;
|
buttonScreenAuto.FlatAppearance.BorderSize = 0;
|
||||||
buttonScreenAuto.FlatStyle = FlatStyle.Flat;
|
buttonScreenAuto.FlatStyle = FlatStyle.Flat;
|
||||||
@@ -743,6 +767,7 @@ namespace GHelper
|
|||||||
button60Hz.Activated = false;
|
button60Hz.Activated = false;
|
||||||
button60Hz.BackColor = SystemColors.ControlLightLight;
|
button60Hz.BackColor = SystemColors.ControlLightLight;
|
||||||
button60Hz.BorderColor = Color.Transparent;
|
button60Hz.BorderColor = Color.Transparent;
|
||||||
|
button60Hz.BorderRadius = 5;
|
||||||
button60Hz.CausesValidation = false;
|
button60Hz.CausesValidation = false;
|
||||||
button60Hz.Dock = DockStyle.Fill;
|
button60Hz.Dock = DockStyle.Fill;
|
||||||
button60Hz.FlatAppearance.BorderSize = 0;
|
button60Hz.FlatAppearance.BorderSize = 0;
|
||||||
@@ -762,6 +787,7 @@ namespace GHelper
|
|||||||
button120Hz.Activated = false;
|
button120Hz.Activated = false;
|
||||||
button120Hz.BackColor = SystemColors.ControlLightLight;
|
button120Hz.BackColor = SystemColors.ControlLightLight;
|
||||||
button120Hz.BorderColor = Color.Transparent;
|
button120Hz.BorderColor = Color.Transparent;
|
||||||
|
button120Hz.BorderRadius = 5;
|
||||||
button120Hz.Dock = DockStyle.Fill;
|
button120Hz.Dock = DockStyle.Fill;
|
||||||
button120Hz.FlatAppearance.BorderSize = 0;
|
button120Hz.FlatAppearance.BorderSize = 0;
|
||||||
button120Hz.FlatStyle = FlatStyle.Flat;
|
button120Hz.FlatStyle = FlatStyle.Flat;
|
||||||
@@ -775,6 +801,26 @@ namespace GHelper
|
|||||||
button120Hz.Text = "120Hz + OD";
|
button120Hz.Text = "120Hz + OD";
|
||||||
button120Hz.UseVisualStyleBackColor = false;
|
button120Hz.UseVisualStyleBackColor = false;
|
||||||
//
|
//
|
||||||
|
// buttonMiniled
|
||||||
|
//
|
||||||
|
buttonMiniled.Activated = false;
|
||||||
|
buttonMiniled.BackColor = SystemColors.ControlLightLight;
|
||||||
|
buttonMiniled.BorderColor = Color.Transparent;
|
||||||
|
buttonMiniled.BorderRadius = 5;
|
||||||
|
buttonMiniled.CausesValidation = false;
|
||||||
|
buttonMiniled.Dock = DockStyle.Fill;
|
||||||
|
buttonMiniled.FlatAppearance.BorderSize = 0;
|
||||||
|
buttonMiniled.FlatStyle = FlatStyle.Flat;
|
||||||
|
buttonMiniled.ForeColor = SystemColors.ControlText;
|
||||||
|
buttonMiniled.Location = new Point(583, 4);
|
||||||
|
buttonMiniled.Margin = new Padding(4);
|
||||||
|
buttonMiniled.Name = "buttonMiniled";
|
||||||
|
buttonMiniled.Secondary = false;
|
||||||
|
buttonMiniled.Size = new Size(185, 72);
|
||||||
|
buttonMiniled.TabIndex = 3;
|
||||||
|
buttonMiniled.Text = "Miniled";
|
||||||
|
buttonMiniled.UseVisualStyleBackColor = false;
|
||||||
|
//
|
||||||
// pictureScreen
|
// pictureScreen
|
||||||
//
|
//
|
||||||
pictureScreen.BackgroundImage = (Image)resources.GetObject("pictureScreen.BackgroundImage");
|
pictureScreen.BackgroundImage = (Image)resources.GetObject("pictureScreen.BackgroundImage");
|
||||||
@@ -836,8 +882,9 @@ namespace GHelper
|
|||||||
// buttonKeyboard
|
// buttonKeyboard
|
||||||
//
|
//
|
||||||
buttonKeyboard.Activated = false;
|
buttonKeyboard.Activated = false;
|
||||||
buttonKeyboard.BackColor = SystemColors.ControlLight;
|
buttonKeyboard.BackColor = Color.FromArgb(230, 230, 230);
|
||||||
buttonKeyboard.BorderColor = Color.Transparent;
|
buttonKeyboard.BorderColor = Color.Transparent;
|
||||||
|
buttonKeyboard.BorderRadius = 2;
|
||||||
buttonKeyboard.Dock = DockStyle.Top;
|
buttonKeyboard.Dock = DockStyle.Top;
|
||||||
buttonKeyboard.FlatAppearance.BorderSize = 0;
|
buttonKeyboard.FlatAppearance.BorderSize = 0;
|
||||||
buttonKeyboard.FlatStyle = FlatStyle.Flat;
|
buttonKeyboard.FlatStyle = FlatStyle.Flat;
|
||||||
@@ -905,6 +952,7 @@ namespace GHelper
|
|||||||
buttonKeyboardColor.Activated = false;
|
buttonKeyboardColor.Activated = false;
|
||||||
buttonKeyboardColor.BackColor = SystemColors.ButtonHighlight;
|
buttonKeyboardColor.BackColor = SystemColors.ButtonHighlight;
|
||||||
buttonKeyboardColor.BorderColor = Color.Transparent;
|
buttonKeyboardColor.BorderColor = Color.Transparent;
|
||||||
|
buttonKeyboardColor.BorderRadius = 2;
|
||||||
buttonKeyboardColor.Dock = DockStyle.Top;
|
buttonKeyboardColor.Dock = DockStyle.Top;
|
||||||
buttonKeyboardColor.FlatStyle = FlatStyle.Flat;
|
buttonKeyboardColor.FlatStyle = FlatStyle.Flat;
|
||||||
buttonKeyboardColor.ForeColor = SystemColors.ControlText;
|
buttonKeyboardColor.ForeColor = SystemColors.ControlText;
|
||||||
@@ -939,25 +987,6 @@ namespace GHelper
|
|||||||
labelKeyboard.TabIndex = 32;
|
labelKeyboard.TabIndex = 32;
|
||||||
labelKeyboard.Text = "Laptop Keyboard";
|
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.Secondary = false;
|
|
||||||
buttonMiniled.Size = new Size(185, 72);
|
|
||||||
buttonMiniled.TabIndex = 3;
|
|
||||||
buttonMiniled.Text = "Miniled";
|
|
||||||
buttonMiniled.UseVisualStyleBackColor = false;
|
|
||||||
//
|
|
||||||
// SettingsForm
|
// SettingsForm
|
||||||
//
|
//
|
||||||
AutoScaleDimensions = new SizeF(192F, 192F);
|
AutoScaleDimensions = new SizeF(192F, 192F);
|
||||||
@@ -1073,5 +1102,6 @@ namespace GHelper
|
|||||||
private RButton buttonKeyboard;
|
private RButton buttonKeyboard;
|
||||||
private RButton buttonKeyboardColor;
|
private RButton buttonKeyboardColor;
|
||||||
private RButton buttonFans;
|
private RButton buttonFans;
|
||||||
|
private Label labelMidFan;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -10,7 +10,9 @@ namespace GHelper
|
|||||||
public partial class SettingsForm : RForm
|
public partial class SettingsForm : RForm
|
||||||
{
|
{
|
||||||
|
|
||||||
static System.Timers.Timer aTimer = default!;
|
public static System.Timers.Timer aTimer = default!;
|
||||||
|
public static Point trayPoint;
|
||||||
|
|
||||||
static System.Timers.Timer matrixTimer = default!;
|
static System.Timers.Timer matrixTimer = default!;
|
||||||
|
|
||||||
public string versionUrl = "http://github.com/seerge/g-helper/releases";
|
public string versionUrl = "http://github.com/seerge/g-helper/releases";
|
||||||
@@ -21,6 +23,7 @@ namespace GHelper
|
|||||||
public Keyboard keyb;
|
public Keyboard keyb;
|
||||||
|
|
||||||
static AnimeMatrixDevice mat;
|
static AnimeMatrixDevice mat;
|
||||||
|
static long lastTip;
|
||||||
|
|
||||||
public SettingsForm()
|
public SettingsForm()
|
||||||
{
|
{
|
||||||
@@ -114,12 +117,29 @@ namespace GHelper
|
|||||||
button120Hz.MouseMove += Button120Hz_MouseHover;
|
button120Hz.MouseMove += Button120Hz_MouseHover;
|
||||||
button120Hz.MouseLeave += ButtonScreen_MouseLeave;
|
button120Hz.MouseLeave += ButtonScreen_MouseLeave;
|
||||||
|
|
||||||
|
Program.trayIcon.MouseMove += TrayIcon_MouseMove;
|
||||||
|
|
||||||
//buttonStandard.Image = (Image)(new Bitmap(buttonStandard.Image, new Size(16, 16)));
|
//buttonStandard.Image = (Image)(new Bitmap(buttonStandard.Image, new Size(16, 16)));
|
||||||
|
|
||||||
SetTimer();
|
aTimer = new System.Timers.Timer(500);
|
||||||
|
aTimer.Elapsed += OnTimedEvent;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private static void TrayIcon_MouseMove(object? sender, MouseEventArgs e)
|
||||||
|
{
|
||||||
|
if (Math.Abs(DateTimeOffset.Now.ToUnixTimeMilliseconds() - lastTip) < 2000) return;
|
||||||
|
lastTip = DateTimeOffset.Now.ToUnixTimeMilliseconds();
|
||||||
|
RefreshSensors();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
private static void OnTimedEvent(Object? source, ElapsedEventArgs? e)
|
||||||
|
{
|
||||||
|
aTimer.Interval = 2000;
|
||||||
|
if (Program.settingsForm.Visible)
|
||||||
|
RefreshSensors();
|
||||||
|
}
|
||||||
|
|
||||||
private void Button120Hz_MouseHover(object? sender, EventArgs e)
|
private void Button120Hz_MouseHover(object? sender, EventArgs e)
|
||||||
{
|
{
|
||||||
@@ -252,8 +272,9 @@ namespace GHelper
|
|||||||
Program.config.setConfig("matrix_auto", check.Checked ? 1 : 0);
|
Program.config.setConfig("matrix_auto", check.Checked ? 1 : 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
private static void StartMatrixTimer()
|
private static void StartMatrixTimer(int interval = 100)
|
||||||
{
|
{
|
||||||
|
matrixTimer.Interval = interval;
|
||||||
matrixTimer.Enabled = true;
|
matrixTimer.Enabled = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -265,14 +286,23 @@ namespace GHelper
|
|||||||
private static void MatrixTimer_Elapsed(object? sender, ElapsedEventArgs e)
|
private static void MatrixTimer_Elapsed(object? sender, ElapsedEventArgs e)
|
||||||
{
|
{
|
||||||
if (mat is null) return;
|
if (mat is null) return;
|
||||||
mat.PresentNextFrame();
|
|
||||||
|
switch (Program.config.getConfig("matrix_running"))
|
||||||
|
{
|
||||||
|
case 2:
|
||||||
|
mat.PresentNextFrame();
|
||||||
|
break;
|
||||||
|
case 3:
|
||||||
|
mat.PresentText(DateTime.Now.ToString("H:mm:ss"));
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void SetMatrixPicture(string fileName)
|
void SetMatrixPicture(string fileName)
|
||||||
{
|
{
|
||||||
|
|
||||||
if (mat is null) return;
|
if (mat is null) return;
|
||||||
|
|
||||||
StopMatrixTimer();
|
StopMatrixTimer();
|
||||||
|
|
||||||
Image image;
|
Image image;
|
||||||
@@ -315,8 +345,6 @@ namespace GHelper
|
|||||||
mat.GenerateFrame(image);
|
mat.GenerateFrame(image);
|
||||||
mat.Present();
|
mat.Present();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -342,6 +370,8 @@ namespace GHelper
|
|||||||
if (fileName is not null)
|
if (fileName is not null)
|
||||||
{
|
{
|
||||||
Program.config.setConfig("matrix_picture", fileName);
|
Program.config.setConfig("matrix_picture", fileName);
|
||||||
|
Program.config.setConfig("matrix_running", 2);
|
||||||
|
|
||||||
SetMatrixPicture(fileName);
|
SetMatrixPicture(fileName);
|
||||||
BeginInvoke(delegate
|
BeginInvoke(delegate
|
||||||
{
|
{
|
||||||
@@ -397,14 +427,19 @@ namespace GHelper
|
|||||||
mat.SetDisplayState(true);
|
mat.SetDisplayState(true);
|
||||||
mat.SetBrightness((BrightnessMode)brightness);
|
mat.SetBrightness((BrightnessMode)brightness);
|
||||||
|
|
||||||
if (running == 2)
|
switch (running)
|
||||||
{
|
{
|
||||||
string fileName = Program.config.getConfigString("matrix_picture");
|
case 2:
|
||||||
SetMatrixPicture(fileName);
|
SetMatrixPicture(Program.config.getConfigString("matrix_picture"));
|
||||||
}
|
break;
|
||||||
else
|
case 3:
|
||||||
{
|
mat.SetBuiltInAnimation(false);
|
||||||
mat.SetBuiltInAnimation(true, animation);
|
StartMatrixTimer(1000);
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
mat.SetBuiltInAnimation(true, animation);
|
||||||
|
break;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -532,7 +567,7 @@ namespace GHelper
|
|||||||
int brightness = Program.config.getConfig("matrix_brightness");
|
int brightness = Program.config.getConfig("matrix_brightness");
|
||||||
int running = Program.config.getConfig("matrix_running");
|
int running = Program.config.getConfig("matrix_running");
|
||||||
|
|
||||||
comboMatrix.SelectedIndex = (brightness != -1) ? Math.Min(brightness, comboMatrix.Items.Count-1) : 0;
|
comboMatrix.SelectedIndex = (brightness != -1) ? Math.Min(brightness, comboMatrix.Items.Count - 1) : 0;
|
||||||
comboMatrixRunning.SelectedIndex = (running != -1) ? Math.Min(running, comboMatrixRunning.Items.Count - 1) : 0;
|
comboMatrixRunning.SelectedIndex = (running != -1) ? Math.Min(running, comboMatrixRunning.Items.Count - 1) : 0;
|
||||||
|
|
||||||
checkMatrix.Checked = (Program.config.getConfig("matrix_auto") == 1);
|
checkMatrix.Checked = (Program.config.getConfig("matrix_auto") == 1);
|
||||||
@@ -707,7 +742,8 @@ namespace GHelper
|
|||||||
{
|
{
|
||||||
buttonMiniled.Activated = (miniled == 1);
|
buttonMiniled.Activated = (miniled == 1);
|
||||||
Program.config.setConfig("miniled", miniled);
|
Program.config.setConfig("miniled", miniled);
|
||||||
} else
|
}
|
||||||
|
else
|
||||||
{
|
{
|
||||||
buttonMiniled.Visible = false;
|
buttonMiniled.Visible = false;
|
||||||
}
|
}
|
||||||
@@ -747,17 +783,11 @@ namespace GHelper
|
|||||||
SetGPUMode(ASUSWmi.GPUModeEco);
|
SetGPUMode(ASUSWmi.GPUModeEco);
|
||||||
}
|
}
|
||||||
|
|
||||||
private static void SetTimer()
|
|
||||||
{
|
|
||||||
aTimer = new System.Timers.Timer(500);
|
|
||||||
aTimer.Elapsed += OnTimedEvent;
|
|
||||||
aTimer.AutoReset = true;
|
|
||||||
aTimer.Enabled = false;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
private static string FormatFan(int fan)
|
private static string FormatFan(int fan)
|
||||||
{
|
{
|
||||||
|
if (fan < 0) return null;
|
||||||
|
|
||||||
if (Program.config.getConfig("fan_rpm") == 1)
|
if (Program.config.getConfig("fan_rpm") == 1)
|
||||||
return " Fan: " + (fan * 100).ToString() + "RPM";
|
return " Fan: " + (fan * 100).ToString() + "RPM";
|
||||||
else
|
else
|
||||||
@@ -769,6 +799,7 @@ namespace GHelper
|
|||||||
|
|
||||||
string cpuFan = FormatFan(Program.wmi.DeviceGet(ASUSWmi.CPU_Fan));
|
string cpuFan = FormatFan(Program.wmi.DeviceGet(ASUSWmi.CPU_Fan));
|
||||||
string gpuFan = FormatFan(Program.wmi.DeviceGet(ASUSWmi.GPU_Fan));
|
string gpuFan = FormatFan(Program.wmi.DeviceGet(ASUSWmi.GPU_Fan));
|
||||||
|
string midFan = FormatFan(Program.wmi.DeviceGet(ASUSWmi.Mid_Fan));
|
||||||
|
|
||||||
string cpuTemp = "";
|
string cpuTemp = "";
|
||||||
string gpuTemp = "";
|
string gpuTemp = "";
|
||||||
@@ -791,15 +822,14 @@ namespace GHelper
|
|||||||
{
|
{
|
||||||
Program.settingsForm.labelCPUFan.Text = "CPU" + cpuTemp + cpuFan;
|
Program.settingsForm.labelCPUFan.Text = "CPU" + cpuTemp + cpuFan;
|
||||||
Program.settingsForm.labelGPUFan.Text = "GPU" + gpuTemp + gpuFan;
|
Program.settingsForm.labelGPUFan.Text = "GPU" + gpuTemp + gpuFan;
|
||||||
|
if (midFan is not null) Program.settingsForm.labelMidFan.Text = "Mid" + midFan;
|
||||||
Program.settingsForm.labelBattery.Text = battery;
|
Program.settingsForm.labelBattery.Text = battery;
|
||||||
|
|
||||||
|
Program.trayIcon.Text = "CPU" + cpuTemp + cpuFan + "\n" + "GPU" + gpuTemp + gpuFan + ((battery.Length > 0) ? ("\n" + battery) : "");
|
||||||
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
private static void OnTimedEvent(Object? source, ElapsedEventArgs? e)
|
|
||||||
{
|
|
||||||
RefreshSensors();
|
|
||||||
aTimer.Interval = 2000;
|
|
||||||
}
|
|
||||||
|
|
||||||
private void SettingsForm_VisibleChanged(object? sender, EventArgs e)
|
private void SettingsForm_VisibleChanged(object? sender, EventArgs e)
|
||||||
{
|
{
|
||||||
@@ -996,12 +1026,6 @@ namespace GHelper
|
|||||||
if (!ultimate)
|
if (!ultimate)
|
||||||
{
|
{
|
||||||
tableGPU.Controls.Remove(buttonUltimate);
|
tableGPU.Controls.Remove(buttonUltimate);
|
||||||
|
|
||||||
/*
|
|
||||||
* buttonFans.Image = null;
|
|
||||||
buttonFans.Height = 44;
|
|
||||||
*/
|
|
||||||
|
|
||||||
tablePerf.ColumnCount = 0;
|
tablePerf.ColumnCount = 0;
|
||||||
tableGPU.ColumnCount = 0;
|
tableGPU.ColumnCount = 0;
|
||||||
tableScreen.ColumnCount = 0;
|
tableScreen.ColumnCount = 0;
|
||||||
|
|||||||
@@ -53,14 +53,14 @@ PPTs are shown for G14 2022, for other models PPTs will be different as they are
|
|||||||
### :video_game: GPU Modes
|
### :video_game: GPU Modes
|
||||||
|
|
||||||
1. Eco mode : only low power integrated GPU enabled, iGPU drives built in display
|
1. Eco mode : only low power integrated GPU enabled, iGPU drives built in display
|
||||||
2. Standard mode (Windows Hybrid) : iGPU and dGPU enabled, iGPU drives built in display
|
2. Standard mode (MS Hybrid) : iGPU and dGPU enabled, iGPU drives built in display
|
||||||
3. Ultimate mode: iGPU and dGPU enabled, but dGPU drives built in display (supported only on G14 2022 model)
|
3. Ultimate mode: iGPU and dGPU enabled, but dGPU drives built in display (supported only on G14 2022 model)
|
||||||
4. Optimized (formely existed as a checkbox): disables dGPU on battery (Eco) and enables when plugged (Standard)
|
4. Optimized (formely existed as a checkbox): disables dGPU on battery (Eco) and enables when plugged (Standard)
|
||||||
|
|
||||||
### :question: FAQ
|
### :question: FAQ
|
||||||
|
|
||||||
#### How do I stop Armory Crate install popup appearing every time I press M4 / Rog key?
|
#### How do I stop Armory Crate install popup appearing every time I press M4 / Rog key?
|
||||||
Go to BIOS (F2 on boot), open Advanced Settings (F8) and disable "Armory Control Intrerface"
|
Go to BIOS (F2 on boot), open Advanced Settings and disable "Armory Control Intrerface"
|
||||||
|
|
||||||
#### Why Ultimate GPU mode is not available on my laptop?
|
#### Why Ultimate GPU mode is not available on my laptop?
|
||||||
Ultimate mode is supported (by hardware) only on G14 2022 (and possibly other models from 2022+)
|
Ultimate mode is supported (by hardware) only on G14 2022 (and possibly other models from 2022+)
|
||||||
@@ -68,6 +68,9 @@ Ultimate mode is supported (by hardware) only on G14 2022 (and possibly other mo
|
|||||||
#### App doesn't start / or crashes, what should I do ?
|
#### App doesn't start / or crashes, what should I do ?
|
||||||
Open "Event Viewer" from start menu, go to Windows Logs -> Application and check for recent Errors mentioning G-Helper. If you see one - please post a [new issue](https://github.com/seerge/g-helper/issues) with all details from this error.
|
Open "Event Viewer" from start menu, go to Windows Logs -> Application and check for recent Errors mentioning G-Helper. If you see one - please post a [new issue](https://github.com/seerge/g-helper/issues) with all details from this error.
|
||||||
|
|
||||||
|
#### How do I uninstall G-helper?
|
||||||
|
G-helper is a single exe, and it doesn't install anything in the system. To remove it - you can simply delete exe :) If you have applied any custom fan profiles or PPTs - before removing I would recommend selecting your favorite perfromance mode (for example balanced) and clicking "Factory defaults" under Fans + Power.
|
||||||
|
|
||||||
----------------------------
|
----------------------------
|
||||||
|
|
||||||
### How to install
|
### How to install
|
||||||
|
|||||||
Reference in New Issue
Block a user