Fixes for scaling, and layout

This commit is contained in:
seerge
2023-03-18 15:13:34 +01:00
parent 74846097db
commit 5767320437
8 changed files with 455 additions and 239 deletions

View File

@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8" ?> <?xml version="1.0" encoding="utf-8" ?>
<configuration> <configuration>
<System.Windows.Forms.ApplicationConfigurationSection> <System.Windows.Forms.ApplicationConfigurationSection>
<add key="DpiAwareness" value="System" /> <add key="DpiAwareness" value="PerMonitorV2" />
</System.Windows.Forms.ApplicationConfigurationSection> </System.Windows.Forms.ApplicationConfigurationSection>
<appSettings> <appSettings>
<add key="EnableWindowsFormsHighDpiAutoResizing" value="true" /> <add key="EnableWindowsFormsHighDpiAutoResizing" value="true" />

View File

@@ -126,7 +126,7 @@ namespace GHelper
{ {
int boost = NativeMethods.GetCPUBoost(); int boost = NativeMethods.GetCPUBoost();
if (boost >= 0) if (boost >= 0)
comboBoost.SelectedIndex = boost; comboBoost.SelectedIndex = Math.Min(boost,5);
} }
private void ComboBoost_Changed(object? sender, EventArgs e) private void ComboBoost_Changed(object? sender, EventArgs e)

View File

@@ -16,9 +16,15 @@
<PlatformTarget>x64</PlatformTarget> <PlatformTarget>x64</PlatformTarget>
<ProduceReferenceAssembly>False</ProduceReferenceAssembly> <ProduceReferenceAssembly>False</ProduceReferenceAssembly>
<AllowUnsafeBlocks>True</AllowUnsafeBlocks> <AllowUnsafeBlocks>True</AllowUnsafeBlocks>
<AssemblyVersion>0.30</AssemblyVersion> <AssemblyVersion>0.31</AssemblyVersion>
</PropertyGroup> </PropertyGroup>
<ItemGroup>
<Compile Remove="screenshots\**" />
<EmbeddedResource Remove="screenshots\**" />
<None Remove="screenshots\**" />
</ItemGroup>
<ItemGroup> <ItemGroup>
<None Remove="Resources\eco.ico" /> <None Remove="Resources\eco.ico" />
<None Remove="Resources\icons8-charging-battery-48.png" /> <None Remove="Resources\icons8-charging-battery-48.png" />
@@ -102,8 +108,4 @@
</None> </None>
</ItemGroup> </ItemGroup>
<ItemGroup>
<Folder Include="screenshots\" />
</ItemGroup>
</Project> </Project>

67
app/HighDpiHelper.cs Normal file
View File

@@ -0,0 +1,67 @@
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,5 @@
using System.ComponentModel; using System.ComponentModel;
using System.Drawing;
using System.Drawing.Drawing2D; using System.Drawing.Drawing2D;
namespace CustomControls namespace CustomControls
@@ -33,6 +34,7 @@ namespace CustomControls
} }
} }
public RoundedButton() public RoundedButton()
{ {
this.FlatStyle = FlatStyle.Flat; this.FlatStyle = FlatStyle.Flat;
@@ -53,19 +55,23 @@ namespace CustomControls
return path; return path;
} }
protected override void OnPaint(PaintEventArgs pevent) protected override void OnPaint(PaintEventArgs pevent)
{ {
base.OnPaint(pevent); base.OnPaint(pevent);
float ratio = pevent.Graphics.DpiX / 192.0f;
int border = (int)(ratio * borderSize);
Rectangle rectSurface = this.ClientRectangle; Rectangle rectSurface = this.ClientRectangle;
Rectangle rectBorder = Rectangle.Inflate(rectSurface, -borderSize, -borderSize); Rectangle rectBorder = Rectangle.Inflate(rectSurface, -border, -border);
Color borderDrawColor = activated ? borderColor : Color.Transparent; Color borderDrawColor = activated ? borderColor : Color.Transparent;
using (GraphicsPath pathSurface = GetFigurePath(rectSurface, borderRadius+borderSize)) using (GraphicsPath pathSurface = GetFigurePath(rectSurface, borderRadius+ border))
using (GraphicsPath pathBorder = GetFigurePath(rectBorder, borderRadius)) using (GraphicsPath pathBorder = GetFigurePath(rectBorder, borderRadius))
using (Pen penSurface = new Pen(this.Parent.BackColor, borderSize)) using (Pen penSurface = new Pen(this.Parent.BackColor, border))
using (Pen penBorder = new Pen(borderDrawColor, borderSize)) using (Pen penBorder = new Pen(borderDrawColor, border))
{ {
penBorder.Alignment = PenAlignment.Outset; penBorder.Alignment = PenAlignment.Outset;
pevent.Graphics.SmoothingMode = SmoothingMode.AntiAlias; pevent.Graphics.SmoothingMode = SmoothingMode.AntiAlias;

458
app/Settings.Designer.cs generated
View File

@@ -34,9 +34,9 @@ namespace GHelper
panelMatrix = new Panel(); panelMatrix = new Panel();
checkMatrix = new CheckBox(); checkMatrix = new CheckBox();
tableLayoutMatrix = new TableLayoutPanel(); tableLayoutMatrix = new TableLayoutPanel();
comboMatrix = new ComboBox();
buttonMatrix = new Button(); buttonMatrix = new Button();
comboMatrixRunning = new ComboBox(); comboMatrixRunning = new ComboBox();
comboMatrix = new ComboBox();
pictureMatrix = new PictureBox(); pictureMatrix = new PictureBox();
labelMatrix = new Label(); labelMatrix = new Label();
panelBattery = new Panel(); panelBattery = new Panel();
@@ -58,15 +58,17 @@ namespace GHelper
buttonTurbo = new RoundedButton(); buttonTurbo = new RoundedButton();
buttonFans = new Button(); buttonFans = new Button();
panelGPU = new Panel(); panelGPU = new Panel();
labelTipGPU = new Label();
pictureGPU = new PictureBox(); pictureGPU = new PictureBox();
labelGPU = new Label(); labelGPU = new Label();
labelGPUFan = new Label(); labelGPUFan = new Label();
tableGPU = new TableLayoutPanel(); tableGPU = new TableLayoutPanel();
buttonOptimized = new RoundedButton();
buttonEco = new RoundedButton(); buttonEco = new RoundedButton();
buttonStandard = new RoundedButton(); buttonStandard = new RoundedButton();
buttonOptimized = new RoundedButton();
buttonUltimate = new RoundedButton(); buttonUltimate = new RoundedButton();
panelScreen = new Panel(); panelScreen = new Panel();
labelTipScreen = new Label();
tableScreen = new TableLayoutPanel(); tableScreen = new TableLayoutPanel();
buttonScreenAuto = new RoundedButton(); buttonScreenAuto = new RoundedButton();
button60Hz = new RoundedButton(); button60Hz = new RoundedButton();
@@ -82,7 +84,7 @@ namespace GHelper
pictureColor = new PictureBox(); pictureColor = new PictureBox();
buttonKeyboardColor = new Button(); buttonKeyboardColor = new Button();
pictureKeyboard = new PictureBox(); pictureKeyboard = new PictureBox();
label1 = new Label(); labelKeyboard = new Label();
panelMatrix.SuspendLayout(); panelMatrix.SuspendLayout();
tableLayoutMatrix.SuspendLayout(); tableLayoutMatrix.SuspendLayout();
((System.ComponentModel.ISupportInitialize)pictureMatrix).BeginInit(); ((System.ComponentModel.ISupportInitialize)pictureMatrix).BeginInit();
@@ -109,23 +111,26 @@ namespace GHelper
// //
// panelMatrix // panelMatrix
// //
panelMatrix.AutoSize = true;
panelMatrix.AutoSizeMode = AutoSizeMode.GrowAndShrink;
panelMatrix.Controls.Add(checkMatrix); panelMatrix.Controls.Add(checkMatrix);
panelMatrix.Controls.Add(tableLayoutMatrix); panelMatrix.Controls.Add(tableLayoutMatrix);
panelMatrix.Controls.Add(pictureMatrix); panelMatrix.Controls.Add(pictureMatrix);
panelMatrix.Controls.Add(labelMatrix); panelMatrix.Controls.Add(labelMatrix);
panelMatrix.Dock = DockStyle.Top; panelMatrix.Dock = DockStyle.Top;
panelMatrix.Location = new Point(16, 764); panelMatrix.Location = new Point(10, 758);
panelMatrix.Margin = new Padding(4); panelMatrix.Margin = new Padding(8);
panelMatrix.Name = "panelMatrix"; panelMatrix.Name = "panelMatrix";
panelMatrix.Size = new Size(818, 180); panelMatrix.Padding = new Padding(0, 0, 0, 12);
panelMatrix.Size = new Size(816, 168);
panelMatrix.TabIndex = 33; panelMatrix.TabIndex = 33;
// //
// checkMatrix // checkMatrix
// //
checkMatrix.AutoSize = true; checkMatrix.AutoSize = true;
checkMatrix.ForeColor = SystemColors.GrayText; checkMatrix.ForeColor = SystemColors.GrayText;
checkMatrix.Location = new Point(28, 109); checkMatrix.Location = new Point(24, 116);
checkMatrix.Margin = new Padding(4, 2, 4, 2); checkMatrix.Margin = new Padding(8, 4, 8, 4);
checkMatrix.Name = "checkMatrix"; checkMatrix.Name = "checkMatrix";
checkMatrix.Size = new Size(249, 36); checkMatrix.Size = new Size(249, 36);
checkMatrix.TabIndex = 44; checkMatrix.TabIndex = 44;
@@ -135,71 +140,73 @@ namespace GHelper
// tableLayoutMatrix // tableLayoutMatrix
// //
tableLayoutMatrix.Anchor = AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right; tableLayoutMatrix.Anchor = AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right;
tableLayoutMatrix.AutoSize = true;
tableLayoutMatrix.AutoSizeMode = AutoSizeMode.GrowAndShrink;
tableLayoutMatrix.ColumnCount = 4; tableLayoutMatrix.ColumnCount = 4;
tableLayoutMatrix.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 25F)); tableLayoutMatrix.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 25F));
tableLayoutMatrix.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 25F)); tableLayoutMatrix.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 25F));
tableLayoutMatrix.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 25F)); tableLayoutMatrix.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 25F));
tableLayoutMatrix.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 25F)); tableLayoutMatrix.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 25F));
tableLayoutMatrix.Controls.Add(buttonMatrix, 0, 0);
tableLayoutMatrix.Controls.Add(comboMatrixRunning, 0, 0);
tableLayoutMatrix.Controls.Add(comboMatrix, 0, 0); tableLayoutMatrix.Controls.Add(comboMatrix, 0, 0);
tableLayoutMatrix.Location = new Point(15, 52); tableLayoutMatrix.Controls.Add(buttonMatrix, 2, 0);
tableLayoutMatrix.Margin = new Padding(4); tableLayoutMatrix.Controls.Add(comboMatrixRunning, 1, 0);
tableLayoutMatrix.Location = new Point(16, 52);
tableLayoutMatrix.Margin = new Padding(8);
tableLayoutMatrix.Name = "tableLayoutMatrix"; tableLayoutMatrix.Name = "tableLayoutMatrix";
tableLayoutMatrix.RowCount = 1; tableLayoutMatrix.RowCount = 1;
tableLayoutMatrix.RowStyles.Add(new RowStyle(SizeType.Percent, 100F)); tableLayoutMatrix.RowStyles.Add(new RowStyle(SizeType.Percent, 100F));
tableLayoutMatrix.Size = new Size(780, 62); tableLayoutMatrix.Size = new Size(780, 60);
tableLayoutMatrix.TabIndex = 43; tableLayoutMatrix.TabIndex = 43;
// //
// comboMatrix
//
comboMatrix.Dock = DockStyle.Top;
comboMatrix.Font = new Font("Segoe UI", 9F, FontStyle.Regular, GraphicsUnit.Point);
comboMatrix.FormattingEnabled = true;
comboMatrix.ItemHeight = 32;
comboMatrix.Items.AddRange(new object[] { "Off", "Dim", "Medium", "Bright" });
comboMatrix.Location = new Point(4, 10);
comboMatrix.Margin = new Padding(4, 10, 4, 8);
comboMatrix.Name = "comboMatrix";
comboMatrix.Size = new Size(187, 40);
comboMatrix.TabIndex = 41;
comboMatrix.TabStop = false;
//
// buttonMatrix // buttonMatrix
// //
buttonMatrix.BackColor = SystemColors.ButtonFace; buttonMatrix.BackColor = SystemColors.ButtonFace;
buttonMatrix.Dock = DockStyle.Top; buttonMatrix.Dock = DockStyle.Top;
buttonMatrix.FlatAppearance.BorderSize = 0; buttonMatrix.FlatAppearance.BorderSize = 0;
buttonMatrix.Location = new Point(395, 10); buttonMatrix.Location = new Point(394, 8);
buttonMatrix.Margin = new Padding(5, 10, 5, 10); buttonMatrix.Margin = new Padding(4, 8, 4, 8);
buttonMatrix.Name = "buttonMatrix"; buttonMatrix.Name = "buttonMatrix";
buttonMatrix.Size = new Size(185, 42); buttonMatrix.Size = new Size(187, 44);
buttonMatrix.TabIndex = 43; buttonMatrix.TabIndex = 43;
buttonMatrix.Text = "Picture / Gif"; buttonMatrix.Text = "Picture / Gif";
buttonMatrix.UseVisualStyleBackColor = false; buttonMatrix.UseVisualStyleBackColor = false;
// //
// comboMatrixRunning // comboMatrixRunning
// //
comboMatrixRunning.Dock = DockStyle.Fill; comboMatrixRunning.Dock = DockStyle.Top;
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" });
comboMatrixRunning.Location = new Point(200, 10); comboMatrixRunning.Location = new Point(199, 10);
comboMatrixRunning.Margin = new Padding(5, 10, 5, 10); comboMatrixRunning.Margin = new Padding(4, 10, 4, 8);
comboMatrixRunning.Name = "comboMatrixRunning"; comboMatrixRunning.Name = "comboMatrixRunning";
comboMatrixRunning.Size = new Size(185, 40); comboMatrixRunning.Size = new Size(187, 40);
comboMatrixRunning.TabIndex = 42; comboMatrixRunning.TabIndex = 42;
comboMatrixRunning.TabStop = false; comboMatrixRunning.TabStop = false;
// //
// comboMatrix
//
comboMatrix.Dock = DockStyle.Fill;
comboMatrix.Font = new Font("Segoe UI", 9F, FontStyle.Regular, GraphicsUnit.Point);
comboMatrix.FormattingEnabled = true;
comboMatrix.ItemHeight = 32;
comboMatrix.Items.AddRange(new object[] { "Off", "Dim", "Medium", "Bright" });
comboMatrix.Location = new Point(5, 10);
comboMatrix.Margin = new Padding(5, 10, 5, 10);
comboMatrix.Name = "comboMatrix";
comboMatrix.Size = new Size(185, 40);
comboMatrix.TabIndex = 41;
comboMatrix.TabStop = false;
//
// pictureMatrix // pictureMatrix
// //
pictureMatrix.BackgroundImage = Properties.Resources.icons8_matrix_desktop_48; pictureMatrix.BackgroundImage = Properties.Resources.icons8_matrix_desktop_48;
pictureMatrix.BackgroundImageLayout = ImageLayout.Zoom; pictureMatrix.BackgroundImageLayout = ImageLayout.Zoom;
pictureMatrix.Location = new Point(25, 10); pictureMatrix.Location = new Point(24, 15);
pictureMatrix.Margin = new Padding(4, 2, 4, 2); pictureMatrix.Margin = new Padding(4);
pictureMatrix.Name = "pictureMatrix"; pictureMatrix.Name = "pictureMatrix";
pictureMatrix.Size = new Size(36, 36); pictureMatrix.Size = new Size(32, 32);
pictureMatrix.TabIndex = 39; pictureMatrix.TabIndex = 39;
pictureMatrix.TabStop = false; pictureMatrix.TabStop = false;
// //
@@ -207,8 +214,8 @@ namespace GHelper
// //
labelMatrix.AutoSize = true; labelMatrix.AutoSize = true;
labelMatrix.Font = new Font("Segoe UI", 9F, FontStyle.Bold, GraphicsUnit.Point); labelMatrix.Font = new Font("Segoe UI", 9F, FontStyle.Bold, GraphicsUnit.Point);
labelMatrix.Location = new Point(64, 12); labelMatrix.Location = new Point(60, 14);
labelMatrix.Margin = new Padding(4, 0, 4, 0); labelMatrix.Margin = new Padding(8, 0, 8, 0);
labelMatrix.Name = "labelMatrix"; labelMatrix.Name = "labelMatrix";
labelMatrix.Size = new Size(170, 32); labelMatrix.Size = new Size(170, 32);
labelMatrix.TabIndex = 38; labelMatrix.TabIndex = 38;
@@ -216,16 +223,19 @@ namespace GHelper
// //
// panelBattery // panelBattery
// //
panelBattery.AutoSize = true;
panelBattery.AutoSizeMode = AutoSizeMode.GrowAndShrink;
panelBattery.Controls.Add(labelVersion); panelBattery.Controls.Add(labelVersion);
panelBattery.Controls.Add(labelBattery); panelBattery.Controls.Add(labelBattery);
panelBattery.Controls.Add(pictureBattery); panelBattery.Controls.Add(pictureBattery);
panelBattery.Controls.Add(labelBatteryTitle); panelBattery.Controls.Add(labelBatteryTitle);
panelBattery.Controls.Add(trackBattery); panelBattery.Controls.Add(trackBattery);
panelBattery.Dock = DockStyle.Top; panelBattery.Dock = DockStyle.Top;
panelBattery.Location = new Point(16, 944); panelBattery.Location = new Point(10, 926);
panelBattery.Margin = new Padding(4); panelBattery.Margin = new Padding(8);
panelBattery.Name = "panelBattery"; panelBattery.Name = "panelBattery";
panelBattery.Size = new Size(818, 148); panelBattery.Padding = new Padding(0, 0, 0, 12);
panelBattery.Size = new Size(816, 158);
panelBattery.TabIndex = 34; panelBattery.TabIndex = 34;
// //
// labelVersion // labelVersion
@@ -233,8 +243,8 @@ namespace GHelper
labelVersion.AutoSize = true; labelVersion.AutoSize = true;
labelVersion.Font = new Font("Segoe UI", 9F, FontStyle.Underline, GraphicsUnit.Point); labelVersion.Font = new Font("Segoe UI", 9F, FontStyle.Underline, GraphicsUnit.Point);
labelVersion.ForeColor = SystemColors.ControlDark; labelVersion.ForeColor = SystemColors.ControlDark;
labelVersion.Location = new Point(26, 102); labelVersion.Location = new Point(25, 109);
labelVersion.Margin = new Padding(4, 0, 4, 0); labelVersion.Margin = new Padding(8, 0, 8, 0);
labelVersion.Name = "labelVersion"; labelVersion.Name = "labelVersion";
labelVersion.Size = new Size(44, 32); labelVersion.Size = new Size(44, 32);
labelVersion.TabIndex = 37; labelVersion.TabIndex = 37;
@@ -243,10 +253,10 @@ namespace GHelper
// labelBattery // labelBattery
// //
labelBattery.Anchor = AnchorStyles.Top | AnchorStyles.Right; labelBattery.Anchor = AnchorStyles.Top | AnchorStyles.Right;
labelBattery.Location = new Point(528, 12); labelBattery.Location = new Point(428, 9);
labelBattery.Margin = new Padding(4, 0, 4, 0); labelBattery.Margin = new Padding(8, 0, 8, 0);
labelBattery.Name = "labelBattery"; labelBattery.Name = "labelBattery";
labelBattery.Size = new Size(258, 32); labelBattery.Size = new Size(364, 44);
labelBattery.TabIndex = 36; labelBattery.TabIndex = 36;
labelBattery.Text = " "; labelBattery.Text = " ";
labelBattery.TextAlign = ContentAlignment.TopRight; labelBattery.TextAlign = ContentAlignment.TopRight;
@@ -255,34 +265,34 @@ namespace GHelper
// //
pictureBattery.BackgroundImage = (Image)resources.GetObject("pictureBattery.BackgroundImage"); pictureBattery.BackgroundImage = (Image)resources.GetObject("pictureBattery.BackgroundImage");
pictureBattery.BackgroundImageLayout = ImageLayout.Zoom; pictureBattery.BackgroundImageLayout = ImageLayout.Zoom;
pictureBattery.Location = new Point(25, 10); pictureBattery.Location = new Point(24, 16);
pictureBattery.Margin = new Padding(4, 2, 4, 2); pictureBattery.Margin = new Padding(4);
pictureBattery.Name = "pictureBattery"; pictureBattery.Name = "pictureBattery";
pictureBattery.Size = new Size(36, 38); pictureBattery.Size = new Size(32, 32);
pictureBattery.TabIndex = 35; pictureBattery.TabIndex = 35;
pictureBattery.TabStop = false; pictureBattery.TabStop = false;
// //
// labelBatteryTitle // labelBatteryTitle
// //
labelBatteryTitle.Font = new Font("Segoe UI", 9F, FontStyle.Bold, GraphicsUnit.Point); labelBatteryTitle.Font = new Font("Segoe UI", 9F, FontStyle.Bold, GraphicsUnit.Point);
labelBatteryTitle.Location = new Point(66, 12); labelBatteryTitle.Location = new Point(60, 15);
labelBatteryTitle.Margin = new Padding(4, 0, 4, 0); labelBatteryTitle.Margin = new Padding(8, 0, 8, 0);
labelBatteryTitle.Name = "labelBatteryTitle"; labelBatteryTitle.Name = "labelBatteryTitle";
labelBatteryTitle.Size = new Size(408, 36); labelBatteryTitle.Size = new Size(393, 36);
labelBatteryTitle.TabIndex = 34; labelBatteryTitle.TabIndex = 34;
labelBatteryTitle.Text = "Battery Charge Limit"; labelBatteryTitle.Text = "Battery Charge Limit";
// //
// trackBattery // trackBattery
// //
trackBattery.Anchor = AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right; trackBattery.Anchor = AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right;
trackBattery.LargeChange = 20; trackBattery.LargeChange = 10;
trackBattery.Location = new Point(15, 48); trackBattery.Location = new Point(20, 52);
trackBattery.Margin = new Padding(4, 2, 4, 2); trackBattery.Margin = new Padding(8, 4, 8, 4);
trackBattery.Maximum = 100; trackBattery.Maximum = 100;
trackBattery.Minimum = 50; trackBattery.Minimum = 50;
trackBattery.Name = "trackBattery"; trackBattery.Name = "trackBattery";
trackBattery.Size = new Size(780, 90); trackBattery.Size = new Size(772, 90);
trackBattery.SmallChange = 10; trackBattery.SmallChange = 5;
trackBattery.TabIndex = 33; trackBattery.TabIndex = 33;
trackBattery.TickFrequency = 10; trackBattery.TickFrequency = 10;
trackBattery.TickStyle = TickStyle.TopLeft; trackBattery.TickStyle = TickStyle.TopLeft;
@@ -290,23 +300,26 @@ namespace GHelper
// //
// panelFooter // panelFooter
// //
panelFooter.AutoSize = true;
panelFooter.AutoSizeMode = AutoSizeMode.GrowAndShrink;
panelFooter.Controls.Add(buttonQuit); panelFooter.Controls.Add(buttonQuit);
panelFooter.Controls.Add(checkStartup); panelFooter.Controls.Add(checkStartup);
panelFooter.Dock = DockStyle.Top; panelFooter.Dock = DockStyle.Top;
panelFooter.Location = new Point(16, 1092); panelFooter.Location = new Point(10, 1084);
panelFooter.Margin = new Padding(4); panelFooter.Margin = new Padding(8);
panelFooter.Name = "panelFooter"; panelFooter.Name = "panelFooter";
panelFooter.Size = new Size(818, 64); panelFooter.Padding = new Padding(0, 0, 0, 10);
panelFooter.Size = new Size(816, 74);
panelFooter.TabIndex = 35; panelFooter.TabIndex = 35;
// //
// buttonQuit // buttonQuit
// //
buttonQuit.Anchor = AnchorStyles.Top | AnchorStyles.Right; buttonQuit.Anchor = AnchorStyles.Top | AnchorStyles.Right;
buttonQuit.BackColor = SystemColors.ButtonFace; buttonQuit.BackColor = SystemColors.ButtonFace;
buttonQuit.Location = new Point(684, 9); buttonQuit.Location = new Point(584, 16);
buttonQuit.Margin = new Padding(4, 2, 4, 2); buttonQuit.Margin = new Padding(8, 4, 8, 4);
buttonQuit.Name = "buttonQuit"; buttonQuit.Name = "buttonQuit";
buttonQuit.Size = new Size(116, 40); buttonQuit.Size = new Size(208, 44);
buttonQuit.TabIndex = 18; buttonQuit.TabIndex = 18;
buttonQuit.Text = "Quit"; buttonQuit.Text = "Quit";
buttonQuit.UseVisualStyleBackColor = false; buttonQuit.UseVisualStyleBackColor = false;
@@ -314,8 +327,8 @@ namespace GHelper
// checkStartup // checkStartup
// //
checkStartup.AutoSize = true; checkStartup.AutoSize = true;
checkStartup.Location = new Point(27, 15); checkStartup.Location = new Point(24, 21);
checkStartup.Margin = new Padding(4, 2, 4, 2); checkStartup.Margin = new Padding(8, 4, 8, 4);
checkStartup.Name = "checkStartup"; checkStartup.Name = "checkStartup";
checkStartup.Size = new Size(206, 36); checkStartup.Size = new Size(206, 36);
checkStartup.TabIndex = 17; checkStartup.TabIndex = 17;
@@ -324,15 +337,18 @@ namespace GHelper
// //
// panelPerformance // panelPerformance
// //
panelPerformance.AutoSize = true;
panelPerformance.AutoSizeMode = AutoSizeMode.GrowAndShrink;
panelPerformance.Controls.Add(picturePerf); panelPerformance.Controls.Add(picturePerf);
panelPerformance.Controls.Add(labelPerf); panelPerformance.Controls.Add(labelPerf);
panelPerformance.Controls.Add(labelCPUFan); panelPerformance.Controls.Add(labelCPUFan);
panelPerformance.Controls.Add(tablePerf); panelPerformance.Controls.Add(tablePerf);
panelPerformance.Dock = DockStyle.Top; panelPerformance.Dock = DockStyle.Top;
panelPerformance.Location = new Point(16, 16); panelPerformance.Location = new Point(10, 10);
panelPerformance.Margin = new Padding(0); panelPerformance.Margin = new Padding(0);
panelPerformance.Name = "panelPerformance"; panelPerformance.Name = "panelPerformance";
panelPerformance.Size = new Size(818, 210); panelPerformance.Padding = new Padding(0, 0, 0, 12);
panelPerformance.Size = new Size(816, 200);
panelPerformance.TabIndex = 36; panelPerformance.TabIndex = 36;
// //
// picturePerf // picturePerf
@@ -340,10 +356,10 @@ namespace GHelper
picturePerf.BackgroundImage = (Image)resources.GetObject("picturePerf.BackgroundImage"); picturePerf.BackgroundImage = (Image)resources.GetObject("picturePerf.BackgroundImage");
picturePerf.BackgroundImageLayout = ImageLayout.Zoom; picturePerf.BackgroundImageLayout = ImageLayout.Zoom;
picturePerf.InitialImage = null; picturePerf.InitialImage = null;
picturePerf.Location = new Point(25, 10); picturePerf.Location = new Point(24, 20);
picturePerf.Margin = new Padding(4, 2, 4, 2); picturePerf.Margin = new Padding(4);
picturePerf.Name = "picturePerf"; picturePerf.Name = "picturePerf";
picturePerf.Size = new Size(36, 38); picturePerf.Size = new Size(32, 32);
picturePerf.TabIndex = 32; picturePerf.TabIndex = 32;
picturePerf.TabStop = false; picturePerf.TabStop = false;
// //
@@ -351,8 +367,8 @@ namespace GHelper
// //
labelPerf.AutoSize = true; labelPerf.AutoSize = true;
labelPerf.Font = new Font("Segoe UI", 9F, FontStyle.Bold, GraphicsUnit.Point); labelPerf.Font = new Font("Segoe UI", 9F, FontStyle.Bold, GraphicsUnit.Point);
labelPerf.Location = new Point(64, 12); labelPerf.Location = new Point(60, 18);
labelPerf.Margin = new Padding(4, 0, 4, 0); labelPerf.Margin = new Padding(8, 0, 8, 0);
labelPerf.Name = "labelPerf"; labelPerf.Name = "labelPerf";
labelPerf.Size = new Size(234, 32); labelPerf.Size = new Size(234, 32);
labelPerf.TabIndex = 31; labelPerf.TabIndex = 31;
@@ -361,10 +377,10 @@ namespace GHelper
// labelCPUFan // labelCPUFan
// //
labelCPUFan.Anchor = AnchorStyles.Top | AnchorStyles.Right; labelCPUFan.Anchor = AnchorStyles.Top | AnchorStyles.Right;
labelCPUFan.Location = new Point(422, 10); labelCPUFan.Location = new Point(456, 16);
labelCPUFan.Margin = new Padding(4, 0, 4, 0); labelCPUFan.Margin = new Padding(8, 0, 8, 0);
labelCPUFan.Name = "labelCPUFan"; labelCPUFan.Name = "labelCPUFan";
labelCPUFan.Size = new Size(366, 32); labelCPUFan.Size = new Size(336, 36);
labelCPUFan.TabIndex = 30; labelCPUFan.TabIndex = 30;
labelCPUFan.Text = " "; labelCPUFan.Text = " ";
labelCPUFan.TextAlign = ContentAlignment.TopRight; labelCPUFan.TextAlign = ContentAlignment.TopRight;
@@ -372,7 +388,7 @@ namespace GHelper
// tablePerf // tablePerf
// //
tablePerf.Anchor = AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right; tablePerf.Anchor = AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right;
tablePerf.AutoScroll = true; tablePerf.AutoSize = true;
tablePerf.AutoSizeMode = AutoSizeMode.GrowAndShrink; tablePerf.AutoSizeMode = AutoSizeMode.GrowAndShrink;
tablePerf.ColumnCount = 4; tablePerf.ColumnCount = 4;
tablePerf.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 25F)); tablePerf.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 25F));
@@ -383,12 +399,12 @@ namespace GHelper
tablePerf.Controls.Add(buttonBalanced, 1, 0); tablePerf.Controls.Add(buttonBalanced, 1, 0);
tablePerf.Controls.Add(buttonTurbo, 2, 0); tablePerf.Controls.Add(buttonTurbo, 2, 0);
tablePerf.Controls.Add(buttonFans, 3, 0); tablePerf.Controls.Add(buttonFans, 3, 0);
tablePerf.Location = new Point(15, 48); tablePerf.Location = new Point(16, 56);
tablePerf.Margin = new Padding(4, 2, 4, 2); tablePerf.Margin = new Padding(8, 4, 8, 4);
tablePerf.Name = "tablePerf"; tablePerf.Name = "tablePerf";
tablePerf.RowCount = 1; tablePerf.RowCount = 1;
tablePerf.RowStyles.Add(new RowStyle(SizeType.Absolute, 108F)); tablePerf.RowStyles.Add(new RowStyle(SizeType.Absolute, 128F));
tablePerf.Size = new Size(780, 150); tablePerf.Size = new Size(780, 128);
tablePerf.TabIndex = 29; tablePerf.TabIndex = 29;
// //
// buttonSilent // buttonSilent
@@ -399,16 +415,15 @@ namespace GHelper
buttonSilent.BorderColor = Color.Transparent; 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.BorderSize = 0; buttonSilent.FlatAppearance.BorderSize = 0;
buttonSilent.FlatStyle = FlatStyle.Flat; buttonSilent.FlatStyle = FlatStyle.Flat;
buttonSilent.ForeColor = SystemColors.ControlText; buttonSilent.ForeColor = SystemColors.ControlText;
buttonSilent.Image = Properties.Resources.icons8_bicycle_48__1_; buttonSilent.Image = Properties.Resources.icons8_bicycle_48__1_;
buttonSilent.ImageAlign = ContentAlignment.BottomCenter; buttonSilent.ImageAlign = ContentAlignment.BottomCenter;
buttonSilent.Location = new Point(4, 12); buttonSilent.Location = new Point(4, 4);
buttonSilent.Margin = new Padding(4, 12, 4, 12); buttonSilent.Margin = new Padding(4);
buttonSilent.Name = "buttonSilent"; buttonSilent.Name = "buttonSilent";
buttonSilent.Size = new Size(187, 126); buttonSilent.Size = new Size(187, 120);
buttonSilent.TabIndex = 0; buttonSilent.TabIndex = 0;
buttonSilent.Text = "Silent"; buttonSilent.Text = "Silent";
buttonSilent.TextImageRelation = TextImageRelation.ImageAboveText; buttonSilent.TextImageRelation = TextImageRelation.ImageAboveText;
@@ -420,16 +435,15 @@ namespace GHelper
buttonBalanced.BackColor = SystemColors.ControlLightLight; buttonBalanced.BackColor = SystemColors.ControlLightLight;
buttonBalanced.BorderColor = Color.Transparent; buttonBalanced.BorderColor = Color.Transparent;
buttonBalanced.Dock = DockStyle.Fill; buttonBalanced.Dock = DockStyle.Fill;
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.ForeColor = SystemColors.ControlText;
buttonBalanced.Image = Properties.Resources.icons8_fiat_500_48; buttonBalanced.Image = Properties.Resources.icons8_fiat_500_48;
buttonBalanced.ImageAlign = ContentAlignment.BottomCenter; buttonBalanced.ImageAlign = ContentAlignment.BottomCenter;
buttonBalanced.Location = new Point(199, 12); buttonBalanced.Location = new Point(199, 4);
buttonBalanced.Margin = new Padding(4, 12, 4, 12); buttonBalanced.Margin = new Padding(4);
buttonBalanced.Name = "buttonBalanced"; buttonBalanced.Name = "buttonBalanced";
buttonBalanced.Size = new Size(187, 126); buttonBalanced.Size = new Size(187, 120);
buttonBalanced.TabIndex = 1; buttonBalanced.TabIndex = 1;
buttonBalanced.Text = "Balanced"; buttonBalanced.Text = "Balanced";
buttonBalanced.TextImageRelation = TextImageRelation.ImageAboveText; buttonBalanced.TextImageRelation = TextImageRelation.ImageAboveText;
@@ -441,16 +455,15 @@ namespace GHelper
buttonTurbo.BackColor = SystemColors.ControlLightLight; buttonTurbo.BackColor = SystemColors.ControlLightLight;
buttonTurbo.BorderColor = Color.Transparent; buttonTurbo.BorderColor = Color.Transparent;
buttonTurbo.Dock = DockStyle.Fill; buttonTurbo.Dock = DockStyle.Fill;
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.ForeColor = SystemColors.ControlText;
buttonTurbo.Image = Properties.Resources.icons8_rocket_48; buttonTurbo.Image = Properties.Resources.icons8_rocket_48;
buttonTurbo.ImageAlign = ContentAlignment.BottomCenter; buttonTurbo.ImageAlign = ContentAlignment.BottomCenter;
buttonTurbo.Location = new Point(394, 12); buttonTurbo.Location = new Point(394, 4);
buttonTurbo.Margin = new Padding(4, 12, 4, 12); buttonTurbo.Margin = new Padding(4);
buttonTurbo.Name = "buttonTurbo"; buttonTurbo.Name = "buttonTurbo";
buttonTurbo.Size = new Size(187, 126); buttonTurbo.Size = new Size(187, 120);
buttonTurbo.TabIndex = 2; buttonTurbo.TabIndex = 2;
buttonTurbo.Text = "Turbo"; buttonTurbo.Text = "Turbo";
buttonTurbo.TextImageRelation = TextImageRelation.ImageAboveText; buttonTurbo.TextImageRelation = TextImageRelation.ImageAboveText;
@@ -463,10 +476,10 @@ namespace GHelper
buttonFans.FlatAppearance.BorderSize = 0; buttonFans.FlatAppearance.BorderSize = 0;
buttonFans.Image = Properties.Resources.icons8_fan_48; buttonFans.Image = Properties.Resources.icons8_fan_48;
buttonFans.ImageAlign = ContentAlignment.BottomCenter; buttonFans.ImageAlign = ContentAlignment.BottomCenter;
buttonFans.Location = new Point(589, 12); buttonFans.Location = new Point(589, 4);
buttonFans.Margin = new Padding(4, 12, 4, 12); buttonFans.Margin = new Padding(4);
buttonFans.Name = "buttonFans"; buttonFans.Name = "buttonFans";
buttonFans.Size = new Size(187, 126); buttonFans.Size = new Size(187, 120);
buttonFans.TabIndex = 35; buttonFans.TabIndex = 35;
buttonFans.Text = "Fans + Power"; buttonFans.Text = "Fans + Power";
buttonFans.TextImageRelation = TextImageRelation.ImageAboveText; buttonFans.TextImageRelation = TextImageRelation.ImageAboveText;
@@ -474,25 +487,39 @@ namespace GHelper
// //
// panelGPU // panelGPU
// //
panelGPU.AutoSize = true;
panelGPU.AutoSizeMode = AutoSizeMode.GrowAndShrink;
panelGPU.Controls.Add(labelTipGPU);
panelGPU.Controls.Add(pictureGPU); panelGPU.Controls.Add(pictureGPU);
panelGPU.Controls.Add(labelGPU); panelGPU.Controls.Add(labelGPU);
panelGPU.Controls.Add(labelGPUFan); panelGPU.Controls.Add(labelGPUFan);
panelGPU.Controls.Add(tableGPU); panelGPU.Controls.Add(tableGPU);
panelGPU.Dock = DockStyle.Top; panelGPU.Dock = DockStyle.Top;
panelGPU.Location = new Point(16, 226); panelGPU.Location = new Point(10, 210);
panelGPU.Margin = new Padding(4); panelGPU.Margin = new Padding(8);
panelGPU.Name = "panelGPU"; panelGPU.Name = "panelGPU";
panelGPU.Size = new Size(818, 210); panelGPU.Padding = new Padding(0, 0, 0, 10);
panelGPU.Size = new Size(816, 237);
panelGPU.TabIndex = 37; panelGPU.TabIndex = 37;
// //
// labelTipGPU
//
labelTipGPU.ForeColor = SystemColors.GrayText;
labelTipGPU.Location = new Point(24, 191);
labelTipGPU.Margin = new Padding(4, 0, 4, 0);
labelTipGPU.Name = "labelTipGPU";
labelTipGPU.Size = new Size(720, 36);
labelTipGPU.TabIndex = 20;
labelTipGPU.Text = " ";
//
// pictureGPU // pictureGPU
// //
pictureGPU.BackgroundImage = (Image)resources.GetObject("pictureGPU.BackgroundImage"); pictureGPU.BackgroundImage = (Image)resources.GetObject("pictureGPU.BackgroundImage");
pictureGPU.BackgroundImageLayout = ImageLayout.Zoom; pictureGPU.BackgroundImageLayout = ImageLayout.Zoom;
pictureGPU.Location = new Point(25, 10); pictureGPU.Location = new Point(24, 20);
pictureGPU.Margin = new Padding(4, 2, 4, 2); pictureGPU.Margin = new Padding(4);
pictureGPU.Name = "pictureGPU"; pictureGPU.Name = "pictureGPU";
pictureGPU.Size = new Size(36, 38); pictureGPU.Size = new Size(32, 32);
pictureGPU.TabIndex = 19; pictureGPU.TabIndex = 19;
pictureGPU.TabStop = false; pictureGPU.TabStop = false;
// //
@@ -500,8 +527,8 @@ namespace GHelper
// //
labelGPU.AutoSize = true; labelGPU.AutoSize = true;
labelGPU.Font = new Font("Segoe UI", 9F, FontStyle.Bold, GraphicsUnit.Point); labelGPU.Font = new Font("Segoe UI", 9F, FontStyle.Bold, GraphicsUnit.Point);
labelGPU.Location = new Point(66, 12); labelGPU.Location = new Point(60, 20);
labelGPU.Margin = new Padding(4, 0, 4, 0); labelGPU.Margin = new Padding(8, 0, 8, 0);
labelGPU.Name = "labelGPU"; labelGPU.Name = "labelGPU";
labelGPU.Size = new Size(136, 32); labelGPU.Size = new Size(136, 32);
labelGPU.TabIndex = 18; labelGPU.TabIndex = 18;
@@ -510,10 +537,10 @@ namespace GHelper
// labelGPUFan // labelGPUFan
// //
labelGPUFan.Anchor = AnchorStyles.Top | AnchorStyles.Right; labelGPUFan.Anchor = AnchorStyles.Top | AnchorStyles.Right;
labelGPUFan.Location = new Point(442, 10); labelGPUFan.Location = new Point(244, 12);
labelGPUFan.Margin = new Padding(4, 0, 4, 0); labelGPUFan.Margin = new Padding(8, 0, 8, 0);
labelGPUFan.Name = "labelGPUFan"; labelGPUFan.Name = "labelGPUFan";
labelGPUFan.Size = new Size(348, 32); labelGPUFan.Size = new Size(548, 44);
labelGPUFan.TabIndex = 17; labelGPUFan.TabIndex = 17;
labelGPUFan.Text = " "; labelGPUFan.Text = " ";
labelGPUFan.TextAlign = ContentAlignment.TopRight; labelGPUFan.TextAlign = ContentAlignment.TopRight;
@@ -521,7 +548,7 @@ namespace GHelper
// tableGPU // tableGPU
// //
tableGPU.Anchor = AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right; tableGPU.Anchor = AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right;
tableGPU.AutoScroll = true; tableGPU.AutoSize = true;
tableGPU.AutoSizeMode = AutoSizeMode.GrowAndShrink; tableGPU.AutoSizeMode = AutoSizeMode.GrowAndShrink;
tableGPU.ColumnCount = 4; tableGPU.ColumnCount = 4;
tableGPU.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 25F)); tableGPU.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 25F));
@@ -530,52 +557,32 @@ namespace GHelper
tableGPU.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 25F)); tableGPU.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 25F));
tableGPU.Controls.Add(buttonEco, 0, 0); tableGPU.Controls.Add(buttonEco, 0, 0);
tableGPU.Controls.Add(buttonStandard, 1, 0); tableGPU.Controls.Add(buttonStandard, 1, 0);
tableGPU.Controls.Add(buttonOptimized, 2, 0);
tableGPU.Controls.Add(buttonUltimate, 2, 0); tableGPU.Controls.Add(buttonUltimate, 2, 0);
tableGPU.Controls.Add(buttonOptimized, 3, 0); tableGPU.Location = new Point(16, 60);
tableGPU.Location = new Point(15, 48); tableGPU.Margin = new Padding(8, 4, 8, 4);
tableGPU.Margin = new Padding(4, 2, 4, 2);
tableGPU.Name = "tableGPU"; tableGPU.Name = "tableGPU";
tableGPU.RowCount = 1; tableGPU.RowCount = 1;
tableGPU.RowStyles.Add(new RowStyle(SizeType.Absolute, 108F)); tableGPU.RowStyles.Add(new RowStyle(SizeType.Absolute, 128F));
tableGPU.Size = new Size(776, 150); tableGPU.Size = new Size(780, 128);
tableGPU.TabIndex = 16; tableGPU.TabIndex = 16;
// //
// buttonOptimized
//
buttonOptimized.Activated = false;
buttonOptimized.BackColor = SystemColors.ControlLightLight;
buttonOptimized.BorderColor = Color.Transparent;
buttonOptimized.Dock = DockStyle.Fill;
buttonOptimized.FlatAppearance.BorderSize = 0;
buttonOptimized.FlatStyle = FlatStyle.Flat;
buttonOptimized.ForeColor = SystemColors.ControlText;
buttonOptimized.Image = Properties.Resources.icons8_project_management_48__1_;
buttonOptimized.ImageAlign = ContentAlignment.BottomCenter;
buttonOptimized.Location = new Point(4, 12);
buttonOptimized.Margin = new Padding(4, 12, 4, 12);
buttonOptimized.Name = "buttonOptimized";
buttonOptimized.Size = new Size(186, 126);
buttonOptimized.TabIndex = 3;
buttonOptimized.Text = "Optimized";
buttonOptimized.TextImageRelation = TextImageRelation.ImageAboveText;
buttonOptimized.UseVisualStyleBackColor = false;
//
// buttonEco // buttonEco
// //
buttonEco.Activated = false; buttonEco.Activated = false;
buttonEco.BackColor = SystemColors.ControlLightLight; buttonEco.BackColor = SystemColors.ControlLightLight;
buttonEco.BorderColor = Color.Transparent; buttonEco.BorderColor = Color.Transparent;
buttonEco.CausesValidation = false; buttonEco.CausesValidation = false;
buttonEco.Dock = DockStyle.Fill; buttonEco.Dock = DockStyle.Top;
buttonEco.FlatAppearance.BorderSize = 0; buttonEco.FlatAppearance.BorderSize = 0;
buttonEco.FlatStyle = FlatStyle.Flat; buttonEco.FlatStyle = FlatStyle.Flat;
buttonEco.ForeColor = SystemColors.ControlText; buttonEco.ForeColor = SystemColors.ControlText;
buttonEco.Image = Properties.Resources.icons8_leaf_48; buttonEco.Image = Properties.Resources.icons8_leaf_48;
buttonEco.ImageAlign = ContentAlignment.BottomCenter; buttonEco.ImageAlign = ContentAlignment.BottomCenter;
buttonEco.Location = new Point(198, 12); buttonEco.Location = new Point(4, 4);
buttonEco.Margin = new Padding(4, 12, 4, 12); buttonEco.Margin = new Padding(4);
buttonEco.Name = "buttonEco"; buttonEco.Name = "buttonEco";
buttonEco.Size = new Size(186, 126); buttonEco.Size = new Size(187, 120);
buttonEco.TabIndex = 0; buttonEco.TabIndex = 0;
buttonEco.Text = "Eco"; buttonEco.Text = "Eco";
buttonEco.TextImageRelation = TextImageRelation.ImageAboveText; buttonEco.TextImageRelation = TextImageRelation.ImageAboveText;
@@ -586,36 +593,56 @@ 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.Dock = DockStyle.Fill; buttonStandard.Dock = DockStyle.Top;
buttonStandard.FlatAppearance.BorderSize = 0; buttonStandard.FlatAppearance.BorderSize = 0;
buttonStandard.FlatStyle = FlatStyle.Flat; buttonStandard.FlatStyle = FlatStyle.Flat;
buttonStandard.ForeColor = SystemColors.ControlText; buttonStandard.ForeColor = SystemColors.ControlText;
buttonStandard.Image = Properties.Resources.icons8_spa_flower_48; buttonStandard.Image = Properties.Resources.icons8_spa_flower_48;
buttonStandard.ImageAlign = ContentAlignment.BottomCenter; buttonStandard.ImageAlign = ContentAlignment.BottomCenter;
buttonStandard.Location = new Point(392, 12); buttonStandard.Location = new Point(199, 4);
buttonStandard.Margin = new Padding(4, 12, 4, 12); buttonStandard.Margin = new Padding(4);
buttonStandard.Name = "buttonStandard"; buttonStandard.Name = "buttonStandard";
buttonStandard.Size = new Size(186, 126); buttonStandard.Size = new Size(187, 120);
buttonStandard.TabIndex = 1; buttonStandard.TabIndex = 1;
buttonStandard.Text = "Standard"; buttonStandard.Text = "Standard";
buttonStandard.TextImageRelation = TextImageRelation.ImageAboveText; buttonStandard.TextImageRelation = TextImageRelation.ImageAboveText;
buttonStandard.UseVisualStyleBackColor = false; buttonStandard.UseVisualStyleBackColor = false;
// //
// buttonOptimized
//
buttonOptimized.Activated = false;
buttonOptimized.BackColor = SystemColors.ControlLightLight;
buttonOptimized.BorderColor = Color.Transparent;
buttonOptimized.Dock = DockStyle.Top;
buttonOptimized.FlatAppearance.BorderSize = 0;
buttonOptimized.FlatStyle = FlatStyle.Flat;
buttonOptimized.ForeColor = SystemColors.ControlText;
buttonOptimized.Image = Properties.Resources.icons8_project_management_48__1_;
buttonOptimized.ImageAlign = ContentAlignment.BottomCenter;
buttonOptimized.Location = new Point(589, 4);
buttonOptimized.Margin = new Padding(4);
buttonOptimized.Name = "buttonOptimized";
buttonOptimized.Size = new Size(187, 120);
buttonOptimized.TabIndex = 3;
buttonOptimized.Text = "Optimized";
buttonOptimized.TextImageRelation = TextImageRelation.ImageAboveText;
buttonOptimized.UseVisualStyleBackColor = false;
//
// buttonUltimate // buttonUltimate
// //
buttonUltimate.Activated = false; buttonUltimate.Activated = false;
buttonUltimate.BackColor = SystemColors.ControlLightLight; buttonUltimate.BackColor = SystemColors.ControlLightLight;
buttonUltimate.BorderColor = Color.Transparent; buttonUltimate.BorderColor = Color.Transparent;
buttonUltimate.Dock = DockStyle.Fill; buttonUltimate.Dock = DockStyle.Top;
buttonUltimate.FlatAppearance.BorderSize = 0; buttonUltimate.FlatAppearance.BorderSize = 0;
buttonUltimate.FlatStyle = FlatStyle.Flat; buttonUltimate.FlatStyle = FlatStyle.Flat;
buttonUltimate.ForeColor = SystemColors.ControlText; buttonUltimate.ForeColor = SystemColors.ControlText;
buttonUltimate.Image = Properties.Resources.icons8_game_controller_48; buttonUltimate.Image = Properties.Resources.icons8_game_controller_48;
buttonUltimate.ImageAlign = ContentAlignment.BottomCenter; buttonUltimate.ImageAlign = ContentAlignment.BottomCenter;
buttonUltimate.Location = new Point(586, 12); buttonUltimate.Location = new Point(394, 4);
buttonUltimate.Margin = new Padding(4, 12, 4, 12); buttonUltimate.Margin = new Padding(4);
buttonUltimate.Name = "buttonUltimate"; buttonUltimate.Name = "buttonUltimate";
buttonUltimate.Size = new Size(186, 126); buttonUltimate.Size = new Size(187, 120);
buttonUltimate.TabIndex = 2; buttonUltimate.TabIndex = 2;
buttonUltimate.Text = "Ultimate"; buttonUltimate.Text = "Ultimate";
buttonUltimate.TextImageRelation = TextImageRelation.ImageAboveText; buttonUltimate.TextImageRelation = TextImageRelation.ImageAboveText;
@@ -623,16 +650,29 @@ namespace GHelper
// //
// panelScreen // panelScreen
// //
panelScreen.AutoSize = true;
panelScreen.AutoSizeMode = AutoSizeMode.GrowAndShrink;
panelScreen.Controls.Add(labelTipScreen);
panelScreen.Controls.Add(tableScreen); panelScreen.Controls.Add(tableScreen);
panelScreen.Controls.Add(pictureScreen); panelScreen.Controls.Add(pictureScreen);
panelScreen.Controls.Add(labelSreen); panelScreen.Controls.Add(labelSreen);
panelScreen.Dock = DockStyle.Top; panelScreen.Dock = DockStyle.Top;
panelScreen.Location = new Point(16, 436); panelScreen.Location = new Point(10, 447);
panelScreen.Margin = new Padding(4); panelScreen.Margin = new Padding(8);
panelScreen.Name = "panelScreen"; panelScreen.Name = "panelScreen";
panelScreen.Size = new Size(818, 182); panelScreen.Padding = new Padding(0, 0, 0, 10);
panelScreen.Size = new Size(816, 181);
panelScreen.TabIndex = 38; panelScreen.TabIndex = 38;
// //
// labelTipScreen
//
labelTipScreen.ForeColor = SystemColors.GrayText;
labelTipScreen.Location = new Point(20, 135);
labelTipScreen.Margin = new Padding(4, 0, 4, 0);
labelTipScreen.Name = "labelTipScreen";
labelTipScreen.Size = new Size(724, 36);
labelTipScreen.TabIndex = 24;
//
// tableScreen // tableScreen
// //
tableScreen.Anchor = AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right; tableScreen.Anchor = AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right;
@@ -646,12 +686,12 @@ namespace GHelper
tableScreen.Controls.Add(buttonScreenAuto, 0, 0); tableScreen.Controls.Add(buttonScreenAuto, 0, 0);
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.Location = new Point(15, 48); tableScreen.Location = new Point(16, 51);
tableScreen.Margin = new Padding(4, 2, 4, 2); tableScreen.Margin = new Padding(8, 4, 8, 4);
tableScreen.Name = "tableScreen"; tableScreen.Name = "tableScreen";
tableScreen.RowCount = 1; tableScreen.RowCount = 1;
tableScreen.RowStyles.Add(new RowStyle(SizeType.Absolute, 108F)); tableScreen.RowStyles.Add(new RowStyle(SizeType.Absolute, 80F));
tableScreen.Size = new Size(776, 108); tableScreen.Size = new Size(780, 80);
tableScreen.TabIndex = 23; tableScreen.TabIndex = 23;
// //
// buttonScreenAuto // buttonScreenAuto
@@ -663,10 +703,10 @@ namespace GHelper
buttonScreenAuto.FlatAppearance.BorderSize = 0; buttonScreenAuto.FlatAppearance.BorderSize = 0;
buttonScreenAuto.FlatStyle = FlatStyle.Flat; buttonScreenAuto.FlatStyle = FlatStyle.Flat;
buttonScreenAuto.ForeColor = SystemColors.ControlText; buttonScreenAuto.ForeColor = SystemColors.ControlText;
buttonScreenAuto.Location = new Point(4, 12); buttonScreenAuto.Location = new Point(4, 4);
buttonScreenAuto.Margin = new Padding(4, 12, 4, 12); buttonScreenAuto.Margin = new Padding(4);
buttonScreenAuto.Name = "buttonScreenAuto"; buttonScreenAuto.Name = "buttonScreenAuto";
buttonScreenAuto.Size = new Size(186, 84); buttonScreenAuto.Size = new Size(187, 72);
buttonScreenAuto.TabIndex = 0; buttonScreenAuto.TabIndex = 0;
buttonScreenAuto.Text = "Auto"; buttonScreenAuto.Text = "Auto";
buttonScreenAuto.UseVisualStyleBackColor = false; buttonScreenAuto.UseVisualStyleBackColor = false;
@@ -681,10 +721,10 @@ namespace GHelper
button60Hz.FlatAppearance.BorderSize = 0; button60Hz.FlatAppearance.BorderSize = 0;
button60Hz.FlatStyle = FlatStyle.Flat; button60Hz.FlatStyle = FlatStyle.Flat;
button60Hz.ForeColor = SystemColors.ControlText; button60Hz.ForeColor = SystemColors.ControlText;
button60Hz.Location = new Point(198, 12); button60Hz.Location = new Point(199, 4);
button60Hz.Margin = new Padding(4, 12, 4, 12); button60Hz.Margin = new Padding(4);
button60Hz.Name = "button60Hz"; button60Hz.Name = "button60Hz";
button60Hz.Size = new Size(186, 84); button60Hz.Size = new Size(187, 72);
button60Hz.TabIndex = 1; button60Hz.TabIndex = 1;
button60Hz.Text = "60Hz"; button60Hz.Text = "60Hz";
button60Hz.UseVisualStyleBackColor = false; button60Hz.UseVisualStyleBackColor = false;
@@ -698,10 +738,10 @@ namespace GHelper
button120Hz.FlatAppearance.BorderSize = 0; button120Hz.FlatAppearance.BorderSize = 0;
button120Hz.FlatStyle = FlatStyle.Flat; button120Hz.FlatStyle = FlatStyle.Flat;
button120Hz.ForeColor = SystemColors.ControlText; button120Hz.ForeColor = SystemColors.ControlText;
button120Hz.Location = new Point(392, 12); button120Hz.Location = new Point(394, 4);
button120Hz.Margin = new Padding(4, 12, 4, 12); button120Hz.Margin = new Padding(4);
button120Hz.Name = "button120Hz"; button120Hz.Name = "button120Hz";
button120Hz.Size = new Size(186, 84); button120Hz.Size = new Size(187, 72);
button120Hz.TabIndex = 2; button120Hz.TabIndex = 2;
button120Hz.Text = "120Hz + OD"; button120Hz.Text = "120Hz + OD";
button120Hz.UseVisualStyleBackColor = false; button120Hz.UseVisualStyleBackColor = false;
@@ -710,10 +750,10 @@ namespace GHelper
// //
pictureScreen.BackgroundImage = (Image)resources.GetObject("pictureScreen.BackgroundImage"); pictureScreen.BackgroundImage = (Image)resources.GetObject("pictureScreen.BackgroundImage");
pictureScreen.BackgroundImageLayout = ImageLayout.Zoom; pictureScreen.BackgroundImageLayout = ImageLayout.Zoom;
pictureScreen.Location = new Point(25, 8); pictureScreen.Location = new Point(24, 11);
pictureScreen.Margin = new Padding(4, 2, 4, 2); pictureScreen.Margin = new Padding(4);
pictureScreen.Name = "pictureScreen"; pictureScreen.Name = "pictureScreen";
pictureScreen.Size = new Size(36, 38); pictureScreen.Size = new Size(32, 32);
pictureScreen.TabIndex = 22; pictureScreen.TabIndex = 22;
pictureScreen.TabStop = false; pictureScreen.TabStop = false;
// //
@@ -721,8 +761,8 @@ namespace GHelper
// //
labelSreen.AutoSize = true; labelSreen.AutoSize = true;
labelSreen.Font = new Font("Segoe UI", 9F, FontStyle.Bold, GraphicsUnit.Point); labelSreen.Font = new Font("Segoe UI", 9F, FontStyle.Bold, GraphicsUnit.Point);
labelSreen.Location = new Point(68, 10); labelSreen.Location = new Point(60, 9);
labelSreen.Margin = new Padding(4, 0, 4, 0); labelSreen.Margin = new Padding(8, 0, 8, 0);
labelSreen.Name = "labelSreen"; labelSreen.Name = "labelSreen";
labelSreen.Size = new Size(176, 32); labelSreen.Size = new Size(176, 32);
labelSreen.TabIndex = 21; labelSreen.TabIndex = 21;
@@ -730,19 +770,24 @@ namespace GHelper
// //
// panelKeyboard // panelKeyboard
// //
panelKeyboard.AutoSize = true;
panelKeyboard.AutoSizeMode = AutoSizeMode.GrowAndShrink;
panelKeyboard.Controls.Add(tableLayoutKeyboard); panelKeyboard.Controls.Add(tableLayoutKeyboard);
panelKeyboard.Controls.Add(pictureKeyboard); panelKeyboard.Controls.Add(pictureKeyboard);
panelKeyboard.Controls.Add(label1); panelKeyboard.Controls.Add(labelKeyboard);
panelKeyboard.Dock = DockStyle.Top; panelKeyboard.Dock = DockStyle.Top;
panelKeyboard.Location = new Point(16, 618); panelKeyboard.Location = new Point(10, 628);
panelKeyboard.Margin = new Padding(4); panelKeyboard.Margin = new Padding(8);
panelKeyboard.Name = "panelKeyboard"; panelKeyboard.Name = "panelKeyboard";
panelKeyboard.Size = new Size(818, 146); panelKeyboard.Padding = new Padding(0, 0, 0, 12);
panelKeyboard.Size = new Size(816, 130);
panelKeyboard.TabIndex = 39; panelKeyboard.TabIndex = 39;
// //
// tableLayoutKeyboard // tableLayoutKeyboard
// //
tableLayoutKeyboard.Anchor = AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right; tableLayoutKeyboard.Anchor = AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right;
tableLayoutKeyboard.AutoSize = true;
tableLayoutKeyboard.AutoSizeMode = AutoSizeMode.GrowAndShrink;
tableLayoutKeyboard.ColumnCount = 4; tableLayoutKeyboard.ColumnCount = 4;
tableLayoutKeyboard.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 25F)); tableLayoutKeyboard.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 25F));
tableLayoutKeyboard.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 25F)); tableLayoutKeyboard.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 25F));
@@ -751,12 +796,12 @@ namespace GHelper
tableLayoutKeyboard.Controls.Add(buttonKeyboard, 2, 0); tableLayoutKeyboard.Controls.Add(buttonKeyboard, 2, 0);
tableLayoutKeyboard.Controls.Add(comboKeyboard, 0, 0); tableLayoutKeyboard.Controls.Add(comboKeyboard, 0, 0);
tableLayoutKeyboard.Controls.Add(panelColor, 1, 0); tableLayoutKeyboard.Controls.Add(panelColor, 1, 0);
tableLayoutKeyboard.Location = new Point(15, 56); tableLayoutKeyboard.Location = new Point(16, 50);
tableLayoutKeyboard.Margin = new Padding(4); tableLayoutKeyboard.Margin = new Padding(8);
tableLayoutKeyboard.Name = "tableLayoutKeyboard"; tableLayoutKeyboard.Name = "tableLayoutKeyboard";
tableLayoutKeyboard.RowCount = 1; tableLayoutKeyboard.RowCount = 1;
tableLayoutKeyboard.RowStyles.Add(new RowStyle(SizeType.Percent, 100F)); tableLayoutKeyboard.RowStyles.Add(new RowStyle(SizeType.Percent, 100F));
tableLayoutKeyboard.Size = new Size(780, 66); tableLayoutKeyboard.Size = new Size(780, 60);
tableLayoutKeyboard.TabIndex = 39; tableLayoutKeyboard.TabIndex = 39;
// //
// buttonKeyboard // buttonKeyboard
@@ -764,45 +809,46 @@ namespace GHelper
buttonKeyboard.BackColor = SystemColors.ButtonFace; buttonKeyboard.BackColor = SystemColors.ButtonFace;
buttonKeyboard.Dock = DockStyle.Top; buttonKeyboard.Dock = DockStyle.Top;
buttonKeyboard.FlatAppearance.BorderSize = 0; buttonKeyboard.FlatAppearance.BorderSize = 0;
buttonKeyboard.Location = new Point(395, 10); buttonKeyboard.Location = new Point(394, 8);
buttonKeyboard.Margin = new Padding(5, 10, 5, 10); buttonKeyboard.Margin = new Padding(4, 8, 4, 8);
buttonKeyboard.Name = "buttonKeyboard"; buttonKeyboard.Name = "buttonKeyboard";
buttonKeyboard.Size = new Size(185, 42); buttonKeyboard.Size = new Size(187, 44);
buttonKeyboard.TabIndex = 37; buttonKeyboard.TabIndex = 37;
buttonKeyboard.Text = "Extra"; buttonKeyboard.Text = "Extra";
buttonKeyboard.UseVisualStyleBackColor = false; buttonKeyboard.UseVisualStyleBackColor = false;
// //
// comboKeyboard // comboKeyboard
// //
comboKeyboard.Dock = DockStyle.Fill; comboKeyboard.Dock = DockStyle.Top;
comboKeyboard.Font = new Font("Segoe UI", 9F, FontStyle.Regular, GraphicsUnit.Point); comboKeyboard.Font = new Font("Segoe UI", 9F, FontStyle.Regular, GraphicsUnit.Point);
comboKeyboard.FormattingEnabled = true; comboKeyboard.FormattingEnabled = true;
comboKeyboard.ItemHeight = 32; comboKeyboard.ItemHeight = 32;
comboKeyboard.Items.AddRange(new object[] { "Static", "Breathe", "Strobe", "Rainbow", "Dingding" }); comboKeyboard.Items.AddRange(new object[] { "Static", "Breathe", "Strobe", "Rainbow", "Dingding" });
comboKeyboard.Location = new Point(5, 10); comboKeyboard.Location = new Point(4, 10);
comboKeyboard.Margin = new Padding(5, 10, 5, 10); comboKeyboard.Margin = new Padding(4, 10, 4, 8);
comboKeyboard.Name = "comboKeyboard"; comboKeyboard.Name = "comboKeyboard";
comboKeyboard.Size = new Size(185, 40); comboKeyboard.Size = new Size(187, 40);
comboKeyboard.TabIndex = 35; comboKeyboard.TabIndex = 35;
comboKeyboard.TabStop = false; comboKeyboard.TabStop = false;
// //
// panelColor // panelColor
// //
panelColor.AutoSize = true;
panelColor.Controls.Add(pictureColor2); panelColor.Controls.Add(pictureColor2);
panelColor.Controls.Add(pictureColor); panelColor.Controls.Add(pictureColor);
panelColor.Controls.Add(buttonKeyboardColor); panelColor.Controls.Add(buttonKeyboardColor);
panelColor.Dock = DockStyle.Fill; panelColor.Dock = DockStyle.Fill;
panelColor.Location = new Point(200, 10); panelColor.Location = new Point(199, 8);
panelColor.Margin = new Padding(5, 10, 5, 10); panelColor.Margin = new Padding(4, 8, 4, 8);
panelColor.Name = "panelColor"; panelColor.Name = "panelColor";
panelColor.Size = new Size(185, 46); panelColor.Size = new Size(187, 44);
panelColor.TabIndex = 36; panelColor.TabIndex = 36;
// //
// pictureColor2 // pictureColor2
// //
pictureColor2.Anchor = AnchorStyles.Top | AnchorStyles.Right; pictureColor2.Anchor = AnchorStyles.Top | AnchorStyles.Right;
pictureColor2.Location = new Point(125, 12); pictureColor2.Location = new Point(125, 12);
pictureColor2.Margin = new Padding(4); pictureColor2.Margin = new Padding(8);
pictureColor2.Name = "pictureColor2"; pictureColor2.Name = "pictureColor2";
pictureColor2.Size = new Size(20, 20); pictureColor2.Size = new Size(20, 20);
pictureColor2.TabIndex = 41; pictureColor2.TabIndex = 41;
@@ -812,7 +858,7 @@ namespace GHelper
// //
pictureColor.Anchor = AnchorStyles.Top | AnchorStyles.Right; pictureColor.Anchor = AnchorStyles.Top | AnchorStyles.Right;
pictureColor.Location = new Point(153, 12); pictureColor.Location = new Point(153, 12);
pictureColor.Margin = new Padding(4); pictureColor.Margin = new Padding(8);
pictureColor.Name = "pictureColor"; pictureColor.Name = "pictureColor";
pictureColor.Size = new Size(20, 20); pictureColor.Size = new Size(20, 20);
pictureColor.TabIndex = 40; pictureColor.TabIndex = 40;
@@ -826,9 +872,9 @@ namespace GHelper
buttonKeyboardColor.FlatAppearance.BorderSize = 2; buttonKeyboardColor.FlatAppearance.BorderSize = 2;
buttonKeyboardColor.ForeColor = SystemColors.ControlText; buttonKeyboardColor.ForeColor = SystemColors.ControlText;
buttonKeyboardColor.Location = new Point(0, 0); buttonKeyboardColor.Location = new Point(0, 0);
buttonKeyboardColor.Margin = new Padding(0); buttonKeyboardColor.Margin = new Padding(4, 8, 4, 8);
buttonKeyboardColor.Name = "buttonKeyboardColor"; buttonKeyboardColor.Name = "buttonKeyboardColor";
buttonKeyboardColor.Size = new Size(185, 42); buttonKeyboardColor.Size = new Size(187, 44);
buttonKeyboardColor.TabIndex = 39; buttonKeyboardColor.TabIndex = 39;
buttonKeyboardColor.Text = "Color "; buttonKeyboardColor.Text = "Color ";
buttonKeyboardColor.UseVisualStyleBackColor = false; buttonKeyboardColor.UseVisualStyleBackColor = false;
@@ -837,23 +883,23 @@ namespace GHelper
// //
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(27, 16); pictureKeyboard.Location = new Point(24, 14);
pictureKeyboard.Margin = new Padding(4, 2, 4, 2); pictureKeyboard.Margin = new Padding(4);
pictureKeyboard.Name = "pictureKeyboard"; pictureKeyboard.Name = "pictureKeyboard";
pictureKeyboard.Size = new Size(32, 36); pictureKeyboard.Size = new Size(32, 32);
pictureKeyboard.TabIndex = 33; pictureKeyboard.TabIndex = 33;
pictureKeyboard.TabStop = false; pictureKeyboard.TabStop = false;
// //
// label1 // labelKeyboard
// //
label1.AutoSize = true; labelKeyboard.AutoSize = true;
label1.Font = new Font("Segoe UI", 9F, FontStyle.Bold, GraphicsUnit.Point); labelKeyboard.Font = new Font("Segoe UI", 9F, FontStyle.Bold, GraphicsUnit.Point);
label1.Location = new Point(68, 16); labelKeyboard.Location = new Point(60, 13);
label1.Margin = new Padding(4, 0, 4, 0); labelKeyboard.Margin = new Padding(8, 0, 8, 0);
label1.Name = "label1"; labelKeyboard.Name = "labelKeyboard";
label1.Size = new Size(210, 32); labelKeyboard.Size = new Size(210, 32);
label1.TabIndex = 32; labelKeyboard.TabIndex = 32;
label1.Text = "Laptop Keyboard"; labelKeyboard.Text = "Laptop Keyboard";
// //
// SettingsForm // SettingsForm
// //
@@ -861,7 +907,7 @@ namespace GHelper
AutoScaleMode = AutoScaleMode.Dpi; AutoScaleMode = AutoScaleMode.Dpi;
AutoSize = true; AutoSize = true;
AutoSizeMode = AutoSizeMode.GrowAndShrink; AutoSizeMode = AutoSizeMode.GrowAndShrink;
ClientSize = new Size(850, 1217); ClientSize = new Size(836, 1173);
Controls.Add(panelFooter); Controls.Add(panelFooter);
Controls.Add(panelBattery); Controls.Add(panelBattery);
Controls.Add(panelMatrix); Controls.Add(panelMatrix);
@@ -869,13 +915,13 @@ namespace GHelper
Controls.Add(panelScreen); Controls.Add(panelScreen);
Controls.Add(panelGPU); Controls.Add(panelGPU);
Controls.Add(panelPerformance); Controls.Add(panelPerformance);
Margin = new Padding(4, 2, 4, 2); Margin = new Padding(8, 4, 8, 4);
MaximizeBox = false; MaximizeBox = false;
MdiChildrenMinimizedAnchorBottom = false; MdiChildrenMinimizedAnchorBottom = false;
MinimizeBox = false; MinimizeBox = false;
MinimumSize = new Size(850, 0); MinimumSize = new Size(850, 71);
Name = "SettingsForm"; Name = "SettingsForm";
Padding = new Padding(16); Padding = new Padding(10);
ShowIcon = false; ShowIcon = false;
StartPosition = FormStartPosition.CenterScreen; StartPosition = FormStartPosition.CenterScreen;
Text = "G-Helper"; Text = "G-Helper";
@@ -905,11 +951,13 @@ namespace GHelper
panelKeyboard.ResumeLayout(false); panelKeyboard.ResumeLayout(false);
panelKeyboard.PerformLayout(); panelKeyboard.PerformLayout();
tableLayoutKeyboard.ResumeLayout(false); tableLayoutKeyboard.ResumeLayout(false);
tableLayoutKeyboard.PerformLayout();
panelColor.ResumeLayout(false); panelColor.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)pictureColor2).EndInit(); ((System.ComponentModel.ISupportInitialize)pictureColor2).EndInit();
((System.ComponentModel.ISupportInitialize)pictureColor).EndInit(); ((System.ComponentModel.ISupportInitialize)pictureColor).EndInit();
((System.ComponentModel.ISupportInitialize)pictureKeyboard).EndInit(); ((System.ComponentModel.ISupportInitialize)pictureKeyboard).EndInit();
ResumeLayout(false); ResumeLayout(false);
PerformLayout();
} }
#endregion #endregion
@@ -949,7 +997,7 @@ namespace GHelper
private Label labelSreen; private Label labelSreen;
private Panel panelKeyboard; private Panel panelKeyboard;
private PictureBox pictureKeyboard; private PictureBox pictureKeyboard;
private Label label1; private Label labelKeyboard;
private TableLayoutPanel tableLayoutMatrix; private TableLayoutPanel tableLayoutMatrix;
private Button buttonMatrix; private Button buttonMatrix;
private ComboBox comboMatrixRunning; private ComboBox comboMatrixRunning;
@@ -965,5 +1013,7 @@ namespace GHelper
private RoundedButton button120Hz; private RoundedButton button120Hz;
private Button buttonFans; private Button buttonFans;
private RoundedButton buttonOptimized; private RoundedButton buttonOptimized;
private Label labelTipGPU;
private Label labelTipScreen;
} }
} }

View File

@@ -3,7 +3,6 @@ using System.Diagnostics;
using System.Drawing.Imaging; using System.Drawing.Imaging;
using System.Timers; using System.Timers;
namespace GHelper namespace GHelper
{ {
@@ -28,23 +27,24 @@ namespace GHelper
public SettingsForm() public SettingsForm()
{ {
InitializeComponent(); InitializeComponent();
HighDpiHelper.AdjustControlImagesDpiScale(this, 2);
FormClosing += SettingsForm_FormClosing; FormClosing += SettingsForm_FormClosing;
buttonSilent.BorderColor = colorEco; buttonSilent.BorderColor = colorEco;
buttonBalanced.BorderColor = colorStandard; buttonBalanced.BorderColor = colorStandard;
buttonTurbo.BorderColor = colorTurbo; buttonTurbo.BorderColor = colorTurbo;
buttonOptimized.BorderColor = colorEco;
buttonEco.BorderColor = colorEco; buttonEco.BorderColor = colorEco;
buttonStandard.BorderColor = colorStandard; buttonStandard.BorderColor = colorStandard;
buttonUltimate.BorderColor = colorTurbo; buttonUltimate.BorderColor = colorTurbo;
buttonOptimized.BorderColor = colorEco;
button60Hz.BorderColor = SystemColors.ActiveBorder; button60Hz.BorderColor = SystemColors.ActiveBorder;
button120Hz.BorderColor = SystemColors.ActiveBorder; button120Hz.BorderColor = SystemColors.ActiveBorder;
buttonScreenAuto.BorderColor = colorEco; buttonScreenAuto.BorderColor = SystemColors.ActiveBorder;
buttonOptimized.Click += ButtonOptimized_Click; buttonOptimized.Click += ButtonOptimized_Click;
buttonSilent.Click += ButtonSilent_Click; buttonSilent.Click += ButtonSilent_Click;
@@ -94,10 +94,79 @@ namespace GHelper
labelVersion.Click += LabelVersion_Click; labelVersion.Click += LabelVersion_Click;
buttonOptimized.MouseMove += ButtonOptimized_MouseHover;
buttonOptimized.MouseLeave += ButtonGPU_MouseLeave;
buttonEco.MouseMove += ButtonEco_MouseHover;
buttonEco.MouseLeave += ButtonGPU_MouseLeave;
buttonStandard.MouseMove += ButtonStandard_MouseHover;
buttonStandard.MouseLeave += ButtonGPU_MouseLeave;
buttonUltimate.MouseMove += ButtonUltimate_MouseHover;
buttonUltimate.MouseLeave += ButtonGPU_MouseLeave;
buttonScreenAuto.MouseMove += ButtonScreenAuto_MouseHover;
buttonScreenAuto.MouseLeave += ButtonScreen_MouseLeave;
button60Hz.MouseMove += Button60Hz_MouseHover;
button60Hz.MouseLeave += ButtonScreen_MouseLeave;
button120Hz.MouseMove += Button120Hz_MouseHover;
button120Hz.MouseLeave += ButtonScreen_MouseLeave;
//buttonStandard.Image = (Image)(new Bitmap(buttonStandard.Image, new Size(16, 16)));
SetTimer(); SetTimer();
} }
private void Button120Hz_MouseHover(object? sender, EventArgs e)
{
labelTipScreen.Text = "Max refresh rate + screen overdrive for lower latency";
}
private void Button60Hz_MouseHover(object? sender, EventArgs e)
{
labelTipScreen.Text = "60Hz refresh rate to save battery";
}
private void ButtonScreen_MouseLeave(object? sender, EventArgs e)
{
labelTipScreen.Text = "";
}
private void ButtonScreenAuto_MouseHover(object? sender, EventArgs e)
{
labelTipScreen.Text = "Sets 60Hz to save battery, and back when plugged";
}
private void ButtonUltimate_MouseHover(object? sender, EventArgs e)
{
labelTipGPU.Text = "Routes laptop screen to dGPU, maximizing FPS";
}
private void ButtonStandard_MouseHover(object? sender, EventArgs e)
{
labelTipGPU.Text = "Enables dGPU for standard use";
}
private void ButtonEco_MouseHover(object? sender, EventArgs e)
{
labelTipGPU.Text = "Disables dGPU for battery savings";
}
private void ButtonOptimized_MouseHover(object? sender, EventArgs e)
{
labelTipGPU.Text = "Switch to Eco on battery and to Standard when plugged";
}
private void ButtonGPU_MouseLeave(object? sender, EventArgs e)
{
labelTipGPU.Text = "";
}
private void ButtonOptimized_Click(object? sender, EventArgs e) private void ButtonOptimized_Click(object? sender, EventArgs e)
{ {
Program.config.setConfig("gpu_auto", (Program.config.getConfig("gpu_auto") == 1) ? 0 : 1); Program.config.setConfig("gpu_auto", (Program.config.getConfig("gpu_auto") == 1) ? 0 : 1);
@@ -567,7 +636,7 @@ namespace GHelper
if (frequency <= 0) return; if (frequency <= 0) return;
NativeMethods.SetRefreshRate(frequency); NativeMethods.SetRefreshRate(frequency);
if (overdrive > 0) if (overdrive >= 0)
Program.wmi.DeviceSet(ASUSWmi.ScreenOverdrive, overdrive); Program.wmi.DeviceSet(ASUSWmi.ScreenOverdrive, overdrive);
InitScreen(); InitScreen();
@@ -584,23 +653,6 @@ namespace GHelper
bool screenAuto = (Program.config.getConfig("screen_auto") == 1); bool screenAuto = (Program.config.getConfig("screen_auto") == 1);
if (frequency < 0)
{
button60Hz.Enabled = false;
button120Hz.Enabled = false;
labelSreen.Text = "Laptop Screen: Turned off";
button60Hz.BackColor = SystemColors.ControlLight;
button120Hz.BackColor = SystemColors.ControlLight;
}
else
{
button60Hz.Enabled = true;
button120Hz.Enabled = true;
button60Hz.BackColor = SystemColors.ControlLightLight;
button120Hz.BackColor = SystemColors.ControlLightLight;
labelSreen.Text = "Laptop Screen: " + frequency + "Hz";
}
int overdrive = 0; int overdrive = 0;
try try
{ {
@@ -611,6 +663,28 @@ namespace GHelper
Logger.WriteLine("Screen Overdrive not supported"); Logger.WriteLine("Screen Overdrive not supported");
} }
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" : "");
}
button60Hz.Activated = false; button60Hz.Activated = false;
button120Hz.Activated = false; button120Hz.Activated = false;
buttonScreenAuto.Activated = false; buttonScreenAuto.Activated = false;
@@ -913,6 +987,22 @@ namespace GHelper
} }
private void NoUltimateUI()
{
tableGPU.Controls.Remove(buttonUltimate);
buttonFans.Image = null;
buttonFans.Height = 50;
tablePerf.ColumnCount = 3;
tablePerf.ColumnCount = 3;
tableGPU.ColumnCount = 0;
tableLayoutKeyboard.ColumnCount = 0;
tableScreen.ColumnCount = 0;
tableLayoutMatrix.ColumnCount = 0;
}
public int InitGPUMode() public int InitGPUMode()
{ {
@@ -930,7 +1020,8 @@ namespace GHelper
else else
GpuMode = ASUSWmi.GPUModeStandard; GpuMode = ASUSWmi.GPUModeStandard;
buttonUltimate.Visible = (mux == 1); if (mux != 1) NoUltimateUI();
} }
ButtonEnabled(buttonOptimized, true); ButtonEnabled(buttonOptimized, true);

View File

@@ -54,8 +54,8 @@
<application xmlns="urn:schemas-microsoft-com:asm.v3"> <application xmlns="urn:schemas-microsoft-com:asm.v3">
<windowsSettings> <windowsSettings>
<!--<dpiAwareness xmlns="http://schemas.microsoft.com/SMI/2016/WindowsSettings">PerMonitor/dpiAwareness>--> <!--<dpiAwareness xmlns="http://schemas.microsoft.com/SMI/2016/WindowsSettings">PerMonitor/dpiAwareness>-->
<dpiAware xmlns="http://schemas.microsoft.com/SMI/2005/WindowsSettings">true</dpiAware>
<dpiAwareness xmlns="http://schemas.microsoft.com/SMI/2016/WindowsSettings">System</dpiAwareness> <dpiAwareness xmlns="http://schemas.microsoft.com/SMI/2016/WindowsSettings">System</dpiAwareness>
<dpiAware xmlns="http://schemas.microsoft.com/SMI/2005/WindowsSettings">true</dpiAware>
</windowsSettings> </windowsSettings>
</application> </application>