mirror of
https://github.com/jkocon/g-helper.git
synced 2026-02-23 13:00:52 +01:00
UI tweaks
This commit is contained in:
20
Aura.cs
20
Aura.cs
@@ -43,7 +43,7 @@ public class Aura
|
|||||||
{
|
{
|
||||||
|
|
||||||
HidDevice[] HidDeviceList;
|
HidDevice[] HidDeviceList;
|
||||||
int[] deviceIds = { 0x1854, 0x1869, 0x1866, 0x19b6 };
|
int[] deviceIds = { 0x1854, 0x1869, 0x1866, 0x19b6, 0x1822, 0x1837, 0x1854, 0x184a, 0x183d, 0x8502, 0x1807, 0x17e0 };
|
||||||
|
|
||||||
HidDeviceList = HidDevices.Enumerate(0x0b05, deviceIds).ToArray();
|
HidDeviceList = HidDevices.Enumerate(0x0b05, deviceIds).ToArray();
|
||||||
|
|
||||||
@@ -63,18 +63,14 @@ public class Aura
|
|||||||
|
|
||||||
foreach (HidDevice device in HidDeviceList)
|
foreach (HidDevice device in HidDeviceList)
|
||||||
{
|
{
|
||||||
if (device.IsConnected)
|
if (device.IsConnected && device.Description.Contains("HID"))
|
||||||
{
|
{
|
||||||
if (device.Description.IndexOf("HID") >= 0)
|
device.OpenDevice();
|
||||||
{
|
byte[] msg = AuraMessage(Mode, Color1, Color2, Speed);
|
||||||
device.OpenDevice();
|
device.Write(msg);
|
||||||
byte[] msg = AuraMessage(Mode, Color1, Color2, Speed);
|
device.Write(MESSAGE_SET);
|
||||||
device.Write(msg);
|
device.Write(MESSAGE_APPLY);
|
||||||
device.Write(MESSAGE_SET);
|
device.CloseDevice();
|
||||||
device.Write(MESSAGE_APPLY);
|
|
||||||
device.CloseDevice();
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -16,7 +16,7 @@
|
|||||||
<PlatformTarget>x64</PlatformTarget>
|
<PlatformTarget>x64</PlatformTarget>
|
||||||
<ProduceReferenceAssembly>False</ProduceReferenceAssembly>
|
<ProduceReferenceAssembly>False</ProduceReferenceAssembly>
|
||||||
<AllowUnsafeBlocks>True</AllowUnsafeBlocks>
|
<AllowUnsafeBlocks>True</AllowUnsafeBlocks>
|
||||||
<AssemblyVersion>0.28</AssemblyVersion>
|
<AssemblyVersion>0.29</AssemblyVersion>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
|||||||
77
RoundedButton.cs
Normal file
77
RoundedButton.cs
Normal file
@@ -0,0 +1,77 @@
|
|||||||
|
using System.ComponentModel;
|
||||||
|
using System.Drawing.Drawing2D;
|
||||||
|
|
||||||
|
namespace CustomControls
|
||||||
|
{
|
||||||
|
public class RoundedButton : Button
|
||||||
|
{
|
||||||
|
//Fields
|
||||||
|
private int borderSize = 5;
|
||||||
|
private int borderRadius = 5;
|
||||||
|
private bool activated = false;
|
||||||
|
private Color borderColor = Color.Transparent;
|
||||||
|
|
||||||
|
public Color BorderColor
|
||||||
|
{
|
||||||
|
get { return borderColor; }
|
||||||
|
set
|
||||||
|
{
|
||||||
|
borderColor = value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public bool Activated
|
||||||
|
{
|
||||||
|
get { return activated; }
|
||||||
|
set
|
||||||
|
{
|
||||||
|
if (activated != value)
|
||||||
|
this.Invalidate();
|
||||||
|
activated = value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public RoundedButton()
|
||||||
|
{
|
||||||
|
this.FlatStyle = FlatStyle.Flat;
|
||||||
|
this.FlatAppearance.BorderSize = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
private GraphicsPath GetFigurePath(Rectangle rect, int radius)
|
||||||
|
{
|
||||||
|
GraphicsPath path = new GraphicsPath();
|
||||||
|
float curveSize = radius * 2F;
|
||||||
|
|
||||||
|
path.StartFigure();
|
||||||
|
path.AddArc(rect.X, rect.Y, curveSize, curveSize, 180, 90);
|
||||||
|
path.AddArc(rect.Right - curveSize, rect.Y, curveSize, curveSize, 270, 90);
|
||||||
|
path.AddArc(rect.Right - curveSize, rect.Bottom - curveSize, curveSize, curveSize, 0, 90);
|
||||||
|
path.AddArc(rect.X, rect.Bottom - curveSize, curveSize, curveSize, 90, 90);
|
||||||
|
path.CloseFigure();
|
||||||
|
return path;
|
||||||
|
}
|
||||||
|
|
||||||
|
protected override void OnPaint(PaintEventArgs pevent)
|
||||||
|
{
|
||||||
|
base.OnPaint(pevent);
|
||||||
|
|
||||||
|
Rectangle rectSurface = this.ClientRectangle;
|
||||||
|
Rectangle rectBorder = Rectangle.Inflate(rectSurface, -borderSize, -borderSize);
|
||||||
|
|
||||||
|
Color borderDrawColor = activated ? borderColor : Color.Transparent;
|
||||||
|
|
||||||
|
using (GraphicsPath pathSurface = GetFigurePath(rectSurface, borderRadius+borderSize))
|
||||||
|
using (GraphicsPath pathBorder = GetFigurePath(rectBorder, borderRadius))
|
||||||
|
using (Pen penSurface = new Pen(this.Parent.BackColor, borderSize))
|
||||||
|
using (Pen penBorder = new Pen(borderDrawColor, borderSize))
|
||||||
|
{
|
||||||
|
pevent.Graphics.SmoothingMode = SmoothingMode.AntiAlias;
|
||||||
|
this.Region = new Region(pathSurface);
|
||||||
|
pevent.Graphics.DrawPath(penSurface, pathSurface);
|
||||||
|
pevent.Graphics.DrawPath(penBorder, pathBorder);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
65
Settings.Designer.cs
generated
65
Settings.Designer.cs
generated
@@ -1,4 +1,6 @@
|
|||||||
namespace GHelper
|
using CustomControls;
|
||||||
|
|
||||||
|
namespace GHelper
|
||||||
{
|
{
|
||||||
partial class SettingsForm
|
partial class SettingsForm
|
||||||
{
|
{
|
||||||
@@ -52,23 +54,23 @@
|
|||||||
labelPerf = new Label();
|
labelPerf = new Label();
|
||||||
labelCPUFan = new Label();
|
labelCPUFan = new Label();
|
||||||
tablePerf = new TableLayoutPanel();
|
tablePerf = new TableLayoutPanel();
|
||||||
buttonTurbo = new Button();
|
buttonTurbo = new RoundedButton();
|
||||||
buttonBalanced = new Button();
|
buttonBalanced = new RoundedButton();
|
||||||
buttonSilent = new Button();
|
buttonSilent = new RoundedButton();
|
||||||
panelGPU = new Panel();
|
panelGPU = new Panel();
|
||||||
checkGPU = new CheckBox();
|
checkGPU = new CheckBox();
|
||||||
pictureGPU = new PictureBox();
|
pictureGPU = new PictureBox();
|
||||||
labelGPU = new Label();
|
labelGPU = new Label();
|
||||||
labelGPUFan = new Label();
|
labelGPUFan = new Label();
|
||||||
tableGPU = new TableLayoutPanel();
|
tableGPU = new TableLayoutPanel();
|
||||||
buttonUltimate = new Button();
|
buttonUltimate = new RoundedButton();
|
||||||
buttonStandard = new Button();
|
buttonStandard = new RoundedButton();
|
||||||
buttonEco = new Button();
|
buttonEco = new RoundedButton();
|
||||||
panelScreen = new Panel();
|
panelScreen = new Panel();
|
||||||
checkScreen = new CheckBox();
|
checkScreen = new CheckBox();
|
||||||
tableScreen = new TableLayoutPanel();
|
tableScreen = new TableLayoutPanel();
|
||||||
button120Hz = new Button();
|
button120Hz = new RoundedButton();
|
||||||
button60Hz = new Button();
|
button60Hz = new RoundedButton();
|
||||||
pictureScreen = new PictureBox();
|
pictureScreen = new PictureBox();
|
||||||
labelSreen = new Label();
|
labelSreen = new Label();
|
||||||
panelKeyboard = new Panel();
|
panelKeyboard = new Panel();
|
||||||
@@ -402,11 +404,14 @@
|
|||||||
//
|
//
|
||||||
// buttonTurbo
|
// buttonTurbo
|
||||||
//
|
//
|
||||||
|
buttonTurbo.Activated = false;
|
||||||
buttonTurbo.BackColor = SystemColors.ControlLightLight;
|
buttonTurbo.BackColor = SystemColors.ControlLightLight;
|
||||||
|
buttonTurbo.BorderColor = Color.Transparent;
|
||||||
buttonTurbo.Dock = DockStyle.Fill;
|
buttonTurbo.Dock = DockStyle.Fill;
|
||||||
buttonTurbo.FlatAppearance.BorderColor = Color.FromArgb(192, 0, 0);
|
buttonTurbo.FlatAppearance.BorderColor = Color.FromArgb(192, 0, 0);
|
||||||
buttonTurbo.FlatAppearance.BorderSize = 0;
|
buttonTurbo.FlatAppearance.BorderSize = 0;
|
||||||
buttonTurbo.FlatStyle = FlatStyle.Flat;
|
buttonTurbo.FlatStyle = FlatStyle.Flat;
|
||||||
|
buttonTurbo.ForeColor = SystemColors.ControlText;
|
||||||
buttonTurbo.Location = new Point(464, 12);
|
buttonTurbo.Location = new Point(464, 12);
|
||||||
buttonTurbo.Margin = new Padding(8, 12, 8, 12);
|
buttonTurbo.Margin = new Padding(8, 12, 8, 12);
|
||||||
buttonTurbo.Name = "buttonTurbo";
|
buttonTurbo.Name = "buttonTurbo";
|
||||||
@@ -417,11 +422,14 @@
|
|||||||
//
|
//
|
||||||
// buttonBalanced
|
// buttonBalanced
|
||||||
//
|
//
|
||||||
|
buttonBalanced.Activated = false;
|
||||||
buttonBalanced.BackColor = SystemColors.ControlLightLight;
|
buttonBalanced.BackColor = SystemColors.ControlLightLight;
|
||||||
|
buttonBalanced.BorderColor = Color.Transparent;
|
||||||
buttonBalanced.Dock = DockStyle.Fill;
|
buttonBalanced.Dock = DockStyle.Fill;
|
||||||
buttonBalanced.FlatAppearance.BorderColor = Color.FromArgb(0, 0, 192);
|
buttonBalanced.FlatAppearance.BorderColor = Color.FromArgb(0, 0, 192);
|
||||||
buttonBalanced.FlatAppearance.BorderSize = 0;
|
buttonBalanced.FlatAppearance.BorderSize = 0;
|
||||||
buttonBalanced.FlatStyle = FlatStyle.Flat;
|
buttonBalanced.FlatStyle = FlatStyle.Flat;
|
||||||
|
buttonBalanced.ForeColor = SystemColors.ControlText;
|
||||||
buttonBalanced.Location = new Point(236, 12);
|
buttonBalanced.Location = new Point(236, 12);
|
||||||
buttonBalanced.Margin = new Padding(8, 12, 8, 12);
|
buttonBalanced.Margin = new Padding(8, 12, 8, 12);
|
||||||
buttonBalanced.Name = "buttonBalanced";
|
buttonBalanced.Name = "buttonBalanced";
|
||||||
@@ -432,12 +440,15 @@
|
|||||||
//
|
//
|
||||||
// buttonSilent
|
// buttonSilent
|
||||||
//
|
//
|
||||||
|
buttonSilent.Activated = false;
|
||||||
buttonSilent.BackColor = SystemColors.ControlLightLight;
|
buttonSilent.BackColor = SystemColors.ControlLightLight;
|
||||||
|
buttonSilent.BorderColor = Color.Transparent;
|
||||||
buttonSilent.CausesValidation = false;
|
buttonSilent.CausesValidation = false;
|
||||||
buttonSilent.Dock = DockStyle.Fill;
|
buttonSilent.Dock = DockStyle.Fill;
|
||||||
buttonSilent.FlatAppearance.BorderColor = Color.FromArgb(0, 192, 192);
|
buttonSilent.FlatAppearance.BorderColor = Color.FromArgb(0, 192, 192);
|
||||||
buttonSilent.FlatAppearance.BorderSize = 0;
|
buttonSilent.FlatAppearance.BorderSize = 0;
|
||||||
buttonSilent.FlatStyle = FlatStyle.Flat;
|
buttonSilent.FlatStyle = FlatStyle.Flat;
|
||||||
|
buttonSilent.ForeColor = SystemColors.ControlText;
|
||||||
buttonSilent.Location = new Point(8, 12);
|
buttonSilent.Location = new Point(8, 12);
|
||||||
buttonSilent.Margin = new Padding(8, 12, 8, 12);
|
buttonSilent.Margin = new Padding(8, 12, 8, 12);
|
||||||
buttonSilent.Name = "buttonSilent";
|
buttonSilent.Name = "buttonSilent";
|
||||||
@@ -527,10 +538,13 @@
|
|||||||
//
|
//
|
||||||
// buttonUltimate
|
// buttonUltimate
|
||||||
//
|
//
|
||||||
|
buttonUltimate.Activated = false;
|
||||||
buttonUltimate.BackColor = SystemColors.ControlLightLight;
|
buttonUltimate.BackColor = SystemColors.ControlLightLight;
|
||||||
|
buttonUltimate.BorderColor = Color.Transparent;
|
||||||
buttonUltimate.Dock = DockStyle.Fill;
|
buttonUltimate.Dock = DockStyle.Fill;
|
||||||
buttonUltimate.FlatAppearance.BorderSize = 0;
|
buttonUltimate.FlatAppearance.BorderSize = 0;
|
||||||
buttonUltimate.FlatStyle = FlatStyle.Flat;
|
buttonUltimate.FlatStyle = FlatStyle.Flat;
|
||||||
|
buttonUltimate.ForeColor = SystemColors.ControlText;
|
||||||
buttonUltimate.Location = new Point(464, 12);
|
buttonUltimate.Location = new Point(464, 12);
|
||||||
buttonUltimate.Margin = new Padding(8, 12, 8, 12);
|
buttonUltimate.Margin = new Padding(8, 12, 8, 12);
|
||||||
buttonUltimate.Name = "buttonUltimate";
|
buttonUltimate.Name = "buttonUltimate";
|
||||||
@@ -541,10 +555,13 @@
|
|||||||
//
|
//
|
||||||
// buttonStandard
|
// buttonStandard
|
||||||
//
|
//
|
||||||
|
buttonStandard.Activated = false;
|
||||||
buttonStandard.BackColor = SystemColors.ControlLightLight;
|
buttonStandard.BackColor = SystemColors.ControlLightLight;
|
||||||
|
buttonStandard.BorderColor = Color.Transparent;
|
||||||
buttonStandard.Dock = DockStyle.Fill;
|
buttonStandard.Dock = DockStyle.Fill;
|
||||||
buttonStandard.FlatAppearance.BorderSize = 0;
|
buttonStandard.FlatAppearance.BorderSize = 0;
|
||||||
buttonStandard.FlatStyle = FlatStyle.Flat;
|
buttonStandard.FlatStyle = FlatStyle.Flat;
|
||||||
|
buttonStandard.ForeColor = SystemColors.ControlText;
|
||||||
buttonStandard.Location = new Point(236, 12);
|
buttonStandard.Location = new Point(236, 12);
|
||||||
buttonStandard.Margin = new Padding(8, 12, 8, 12);
|
buttonStandard.Margin = new Padding(8, 12, 8, 12);
|
||||||
buttonStandard.Name = "buttonStandard";
|
buttonStandard.Name = "buttonStandard";
|
||||||
@@ -555,11 +572,14 @@
|
|||||||
//
|
//
|
||||||
// buttonEco
|
// buttonEco
|
||||||
//
|
//
|
||||||
|
buttonEco.Activated = false;
|
||||||
buttonEco.BackColor = SystemColors.ControlLightLight;
|
buttonEco.BackColor = SystemColors.ControlLightLight;
|
||||||
|
buttonEco.BorderColor = Color.Transparent;
|
||||||
buttonEco.CausesValidation = false;
|
buttonEco.CausesValidation = false;
|
||||||
buttonEco.Dock = DockStyle.Fill;
|
buttonEco.Dock = DockStyle.Fill;
|
||||||
buttonEco.FlatAppearance.BorderSize = 0;
|
buttonEco.FlatAppearance.BorderSize = 0;
|
||||||
buttonEco.FlatStyle = FlatStyle.Flat;
|
buttonEco.FlatStyle = FlatStyle.Flat;
|
||||||
|
buttonEco.ForeColor = SystemColors.ControlText;
|
||||||
buttonEco.Location = new Point(8, 12);
|
buttonEco.Location = new Point(8, 12);
|
||||||
buttonEco.Margin = new Padding(8, 12, 8, 12);
|
buttonEco.Margin = new Padding(8, 12, 8, 12);
|
||||||
buttonEco.Name = "buttonEco";
|
buttonEco.Name = "buttonEco";
|
||||||
@@ -614,11 +634,13 @@
|
|||||||
//
|
//
|
||||||
// button120Hz
|
// button120Hz
|
||||||
//
|
//
|
||||||
|
button120Hz.Activated = false;
|
||||||
button120Hz.BackColor = SystemColors.ControlLightLight;
|
button120Hz.BackColor = SystemColors.ControlLightLight;
|
||||||
|
button120Hz.BorderColor = Color.Transparent;
|
||||||
button120Hz.Dock = DockStyle.Fill;
|
button120Hz.Dock = DockStyle.Fill;
|
||||||
button120Hz.FlatAppearance.BorderColor = SystemColors.ActiveBorder;
|
|
||||||
button120Hz.FlatAppearance.BorderSize = 0;
|
button120Hz.FlatAppearance.BorderSize = 0;
|
||||||
button120Hz.FlatStyle = FlatStyle.Flat;
|
button120Hz.FlatStyle = FlatStyle.Flat;
|
||||||
|
button120Hz.ForeColor = SystemColors.ControlText;
|
||||||
button120Hz.Location = new Point(236, 12);
|
button120Hz.Location = new Point(236, 12);
|
||||||
button120Hz.Margin = new Padding(8, 12, 8, 12);
|
button120Hz.Margin = new Padding(8, 12, 8, 12);
|
||||||
button120Hz.Name = "button120Hz";
|
button120Hz.Name = "button120Hz";
|
||||||
@@ -629,10 +651,11 @@
|
|||||||
//
|
//
|
||||||
// button60Hz
|
// button60Hz
|
||||||
//
|
//
|
||||||
|
button60Hz.Activated = false;
|
||||||
button60Hz.BackColor = SystemColors.ControlLightLight;
|
button60Hz.BackColor = SystemColors.ControlLightLight;
|
||||||
|
button60Hz.BorderColor = Color.Transparent;
|
||||||
button60Hz.CausesValidation = false;
|
button60Hz.CausesValidation = false;
|
||||||
button60Hz.Dock = DockStyle.Fill;
|
button60Hz.Dock = DockStyle.Fill;
|
||||||
button60Hz.FlatAppearance.BorderColor = SystemColors.ActiveBorder;
|
|
||||||
button60Hz.FlatAppearance.BorderSize = 0;
|
button60Hz.FlatAppearance.BorderSize = 0;
|
||||||
button60Hz.FlatStyle = FlatStyle.Flat;
|
button60Hz.FlatStyle = FlatStyle.Flat;
|
||||||
button60Hz.ForeColor = SystemColors.ControlText;
|
button60Hz.ForeColor = SystemColors.ControlText;
|
||||||
@@ -774,10 +797,10 @@
|
|||||||
//
|
//
|
||||||
pictureKeyboard.BackgroundImage = Properties.Resources.icons8_keyboard_48;
|
pictureKeyboard.BackgroundImage = Properties.Resources.icons8_keyboard_48;
|
||||||
pictureKeyboard.BackgroundImageLayout = ImageLayout.Zoom;
|
pictureKeyboard.BackgroundImageLayout = ImageLayout.Zoom;
|
||||||
pictureKeyboard.Location = new Point(25, 16);
|
pictureKeyboard.Location = new Point(27, 16);
|
||||||
pictureKeyboard.Margin = new Padding(4, 2, 4, 2);
|
pictureKeyboard.Margin = new Padding(4, 2, 4, 2);
|
||||||
pictureKeyboard.Name = "pictureKeyboard";
|
pictureKeyboard.Name = "pictureKeyboard";
|
||||||
pictureKeyboard.Size = new Size(36, 36);
|
pictureKeyboard.Size = new Size(32, 36);
|
||||||
pictureKeyboard.TabIndex = 33;
|
pictureKeyboard.TabIndex = 33;
|
||||||
pictureKeyboard.TabStop = false;
|
pictureKeyboard.TabStop = false;
|
||||||
//
|
//
|
||||||
@@ -868,23 +891,23 @@
|
|||||||
private Label labelPerf;
|
private Label labelPerf;
|
||||||
private Label labelCPUFan;
|
private Label labelCPUFan;
|
||||||
private TableLayoutPanel tablePerf;
|
private TableLayoutPanel tablePerf;
|
||||||
private Button buttonTurbo;
|
private RoundedButton buttonTurbo;
|
||||||
private Button buttonBalanced;
|
private RoundedButton buttonBalanced;
|
||||||
private Button buttonSilent;
|
private RoundedButton buttonSilent;
|
||||||
private Panel panelGPU;
|
private Panel panelGPU;
|
||||||
private CheckBox checkGPU;
|
private CheckBox checkGPU;
|
||||||
private PictureBox pictureGPU;
|
private PictureBox pictureGPU;
|
||||||
private Label labelGPU;
|
private Label labelGPU;
|
||||||
private Label labelGPUFan;
|
private Label labelGPUFan;
|
||||||
private TableLayoutPanel tableGPU;
|
private TableLayoutPanel tableGPU;
|
||||||
private Button buttonUltimate;
|
private RoundedButton buttonUltimate;
|
||||||
private Button buttonStandard;
|
private RoundedButton buttonStandard;
|
||||||
private Button buttonEco;
|
private RoundedButton buttonEco;
|
||||||
private Panel panelScreen;
|
private Panel panelScreen;
|
||||||
private CheckBox checkScreen;
|
private CheckBox checkScreen;
|
||||||
private TableLayoutPanel tableScreen;
|
private TableLayoutPanel tableScreen;
|
||||||
private Button button120Hz;
|
private RoundedButton button120Hz;
|
||||||
private Button button60Hz;
|
private RoundedButton button60Hz;
|
||||||
private PictureBox pictureScreen;
|
private PictureBox pictureScreen;
|
||||||
private Label labelSreen;
|
private Label labelSreen;
|
||||||
private Panel panelKeyboard;
|
private Panel panelKeyboard;
|
||||||
|
|||||||
60
Settings.cs
60
Settings.cs
@@ -14,9 +14,6 @@ namespace GHelper
|
|||||||
static Color colorStandard = Color.FromArgb(255, 58, 174, 239);
|
static Color colorStandard = Color.FromArgb(255, 58, 174, 239);
|
||||||
static Color colorTurbo = Color.FromArgb(255, 255, 32, 32);
|
static Color colorTurbo = Color.FromArgb(255, 255, 32, 32);
|
||||||
|
|
||||||
static int buttonInactive = 0;
|
|
||||||
static int buttonActive = 5;
|
|
||||||
|
|
||||||
static System.Timers.Timer aTimer = default!;
|
static System.Timers.Timer aTimer = default!;
|
||||||
static System.Timers.Timer matrixTimer = default!;
|
static System.Timers.Timer matrixTimer = default!;
|
||||||
|
|
||||||
@@ -36,13 +33,16 @@ namespace GHelper
|
|||||||
|
|
||||||
FormClosing += SettingsForm_FormClosing;
|
FormClosing += SettingsForm_FormClosing;
|
||||||
|
|
||||||
buttonSilent.FlatAppearance.BorderColor = colorEco;
|
buttonSilent.BorderColor = colorEco;
|
||||||
buttonBalanced.FlatAppearance.BorderColor = colorStandard;
|
buttonBalanced.BorderColor = colorStandard;
|
||||||
buttonTurbo.FlatAppearance.BorderColor = colorTurbo;
|
buttonTurbo.BorderColor = colorTurbo;
|
||||||
|
|
||||||
buttonEco.FlatAppearance.BorderColor = colorEco;
|
buttonEco.BorderColor = colorEco;
|
||||||
buttonStandard.FlatAppearance.BorderColor = colorStandard;
|
buttonStandard.BorderColor = colorStandard;
|
||||||
buttonUltimate.FlatAppearance.BorderColor = colorTurbo;
|
buttonUltimate.BorderColor = colorTurbo;
|
||||||
|
|
||||||
|
button60Hz.BorderColor = SystemColors.ActiveBorder;
|
||||||
|
button120Hz.BorderColor = SystemColors.ActiveBorder;
|
||||||
|
|
||||||
buttonSilent.Click += ButtonSilent_Click;
|
buttonSilent.Click += ButtonSilent_Click;
|
||||||
buttonBalanced.Click += ButtonBalanced_Click;
|
buttonBalanced.Click += ButtonBalanced_Click;
|
||||||
@@ -599,12 +599,12 @@ namespace GHelper
|
|||||||
Logger.WriteLine("Screen Overdrive not supported");
|
Logger.WriteLine("Screen Overdrive not supported");
|
||||||
}
|
}
|
||||||
|
|
||||||
button60Hz.FlatAppearance.BorderSize = buttonInactive;
|
button60Hz.Activated = false;
|
||||||
button120Hz.FlatAppearance.BorderSize = buttonInactive;
|
button120Hz.Activated = false;
|
||||||
|
|
||||||
if (frequency == 60)
|
if (frequency == 60)
|
||||||
{
|
{
|
||||||
button60Hz.FlatAppearance.BorderSize = buttonActive;
|
button60Hz.Activated = true;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -612,7 +612,7 @@ namespace GHelper
|
|||||||
maxFrequency = frequency;
|
maxFrequency = frequency;
|
||||||
|
|
||||||
Program.config.setConfig("max_frequency", maxFrequency);
|
Program.config.setConfig("max_frequency", maxFrequency);
|
||||||
button120Hz.FlatAppearance.BorderSize = buttonActive;
|
button120Hz.Activated = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (maxFrequency > 60)
|
if (maxFrequency > 60)
|
||||||
@@ -779,22 +779,23 @@ namespace GHelper
|
|||||||
public void SetPerformanceMode(int PerformanceMode = ASUSWmi.PerformanceBalanced, bool notify = false)
|
public void SetPerformanceMode(int PerformanceMode = ASUSWmi.PerformanceBalanced, bool notify = false)
|
||||||
{
|
{
|
||||||
|
|
||||||
buttonSilent.FlatAppearance.BorderSize = buttonInactive;
|
|
||||||
buttonBalanced.FlatAppearance.BorderSize = buttonInactive;
|
buttonSilent.Activated = false;
|
||||||
buttonTurbo.FlatAppearance.BorderSize = buttonInactive;
|
buttonBalanced.Activated = false;
|
||||||
|
buttonTurbo.Activated = false;
|
||||||
|
|
||||||
switch (PerformanceMode)
|
switch (PerformanceMode)
|
||||||
{
|
{
|
||||||
case ASUSWmi.PerformanceSilent:
|
case ASUSWmi.PerformanceSilent:
|
||||||
buttonSilent.FlatAppearance.BorderSize = buttonActive;
|
buttonSilent.Activated = true;
|
||||||
perfName = "Silent";
|
perfName = "Silent";
|
||||||
break;
|
break;
|
||||||
case ASUSWmi.PerformanceTurbo:
|
case ASUSWmi.PerformanceTurbo:
|
||||||
buttonTurbo.FlatAppearance.BorderSize = buttonActive;
|
buttonTurbo.Activated = true;
|
||||||
perfName = "Turbo";
|
perfName = "Turbo";
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
buttonBalanced.FlatAppearance.BorderSize = buttonActive;
|
buttonBalanced.Activated = true;
|
||||||
PerformanceMode = ASUSWmi.PerformanceBalanced;
|
PerformanceMode = ASUSWmi.PerformanceBalanced;
|
||||||
perfName = "Balanced";
|
perfName = "Balanced";
|
||||||
break;
|
break;
|
||||||
@@ -943,7 +944,9 @@ namespace GHelper
|
|||||||
|
|
||||||
if (eco == 1)
|
if (eco == 1)
|
||||||
{
|
{
|
||||||
foreach (var process in Process.GetProcessesByName("EADesktop")) process.Kill();
|
string[] tokill = { "EADesktop" };
|
||||||
|
foreach (string kill in tokill)
|
||||||
|
foreach (var process in Process.GetProcessesByName(kill)) process.Kill();
|
||||||
}
|
}
|
||||||
|
|
||||||
Program.wmi.DeviceSet(ASUSWmi.GPUEco, eco);
|
Program.wmi.DeviceSet(ASUSWmi.GPUEco, eco);
|
||||||
@@ -954,7 +957,10 @@ namespace GHelper
|
|||||||
Thread.Sleep(500);
|
Thread.Sleep(500);
|
||||||
AutoScreen(SystemInformation.PowerStatus.PowerLineStatus);
|
AutoScreen(SystemInformation.PowerStatus.PowerLineStatus);
|
||||||
});
|
});
|
||||||
}).Start();
|
})
|
||||||
|
{
|
||||||
|
|
||||||
|
}.Start();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1037,24 +1043,24 @@ namespace GHelper
|
|||||||
GPUMode = Program.config.getConfig("gpu_mode");
|
GPUMode = Program.config.getConfig("gpu_mode");
|
||||||
}
|
}
|
||||||
|
|
||||||
buttonEco.FlatAppearance.BorderSize = buttonInactive;
|
buttonEco.Activated = false;
|
||||||
buttonStandard.FlatAppearance.BorderSize = buttonInactive;
|
buttonStandard.Activated = false;
|
||||||
buttonUltimate.FlatAppearance.BorderSize = buttonInactive;
|
buttonUltimate.Activated = false;
|
||||||
|
|
||||||
switch (GPUMode)
|
switch (GPUMode)
|
||||||
{
|
{
|
||||||
case ASUSWmi.GPUModeEco:
|
case ASUSWmi.GPUModeEco:
|
||||||
buttonEco.FlatAppearance.BorderSize = buttonActive;
|
buttonEco.Activated = true;
|
||||||
labelGPU.Text = "GPU Mode: iGPU only";
|
labelGPU.Text = "GPU Mode: iGPU only";
|
||||||
Program.trayIcon.Icon = GHelper.Properties.Resources.eco;
|
Program.trayIcon.Icon = GHelper.Properties.Resources.eco;
|
||||||
break;
|
break;
|
||||||
case ASUSWmi.GPUModeUltimate:
|
case ASUSWmi.GPUModeUltimate:
|
||||||
buttonUltimate.FlatAppearance.BorderSize = buttonActive;
|
buttonUltimate.Activated = true;
|
||||||
labelGPU.Text = "GPU Mode: dGPU exclusive";
|
labelGPU.Text = "GPU Mode: dGPU exclusive";
|
||||||
Program.trayIcon.Icon = GHelper.Properties.Resources.ultimate;
|
Program.trayIcon.Icon = GHelper.Properties.Resources.ultimate;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
buttonStandard.FlatAppearance.BorderSize = buttonActive;
|
buttonStandard.Activated = true;
|
||||||
labelGPU.Text = "GPU Mode: iGPU + dGPU";
|
labelGPU.Text = "GPU Mode: iGPU + dGPU";
|
||||||
Program.trayIcon.Icon = GHelper.Properties.Resources.standard;
|
Program.trayIcon.Icon = GHelper.Properties.Resources.standard;
|
||||||
break;
|
break;
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ sc STOP ASUSSoftwareManager
|
|||||||
sc STOP ASUSSwitch
|
sc STOP ASUSSwitch
|
||||||
sc STOP ASUSSystemAnalysis
|
sc STOP ASUSSystemAnalysis
|
||||||
sc STOP ASUSSystemDiagnosis
|
sc STOP ASUSSystemDiagnosis
|
||||||
|
sc STOP ArmouryCrateControlInterface
|
||||||
|
|
||||||
sc DELETE AsusAppService
|
sc DELETE AsusAppService
|
||||||
sc DELETE ASUSLinkNear
|
sc DELETE ASUSLinkNear
|
||||||
@@ -13,3 +14,4 @@ sc DELETE ASUSSoftwareManager
|
|||||||
sc DELETE ASUSSwitch
|
sc DELETE ASUSSwitch
|
||||||
sc DELETE ASUSSystemAnalysis
|
sc DELETE ASUSSystemAnalysis
|
||||||
sc DELETE ASUSSystemDiagnosis
|
sc DELETE ASUSSystemDiagnosis
|
||||||
|
sc DELETE ArmouryCrateControlInterface
|
||||||
|
|||||||
Reference in New Issue
Block a user