Compare commits

..

5 Commits

Author SHA1 Message Date
seerge
81a0019b42 Assure gpu mode and refresh rate are set at startup 2023-02-20 17:24:24 +01:00
seerge
3778c255bc Merge branch 'main' of https://github.com/seerge/g14-helper 2023-02-20 16:51:51 +01:00
seerge
a6b597affe Text adjustments 2023-02-20 16:51:49 +01:00
seerge
4aaba5cee7 Update README.md 2023-02-19 22:40:27 +01:00
seerge
cbbe944c2b New screenshot 2023-02-19 22:21:16 +01:00
6 changed files with 49 additions and 31 deletions

View File

@@ -506,7 +506,7 @@ namespace GHelper
{
trayIcon = new NotifyIcon
{
Text = "G14 Helper",
Text = "G-Helper",
Icon = GHelper.Properties.Resources.standard,
Visible = true
};
@@ -534,6 +534,10 @@ namespace GHelper
settingsForm.SetStartupCheck(scheduler.IsScheduled());
bool isPlugged = (SystemInformation.PowerStatus.PowerLineStatus == PowerLineStatus.Online);
settingsForm.AutoGPUMode(isPlugged ? 1 : 0);
settingsForm.AutoScreen(isPlugged ? 1 : 0);
Application.Run();
}

View File

@@ -10,8 +10,8 @@ Designed for Asus Zephyrus G14 2022 (with AMD Radeon iGPU and dGPU). But could a
Profiles are **same** as in Armory Crate, including default fan curves
1. Silent (minimal or no fans, 45W PPT to CPU)
2. Balanced (balanced fans, up to 45W PPT to CPU)
1. Silent (minimal or no fans, 70W PPT total, up to 45W PPT to CPU)
2. Balanced (balanced fans, 100W PPT total, up to 45W PPT to CPU)
3. Turbo (intense fans, 125W PPT total, up to 80W PPT to CPU)
## GPU Mode switching
@@ -28,7 +28,7 @@ Profiles are **same** as in Armory Crate, including default fan curves
4. Automatic switching of Standard/Eco GPU modes when laptop is plugged / unplugged!
5. FN+F5 an M4 (Rog) keys cycle through Performance modes
6. Screen resolution and display overdrive switching
7. Run on startup (optional)
7. CPU turbo boost switching
## Things still missing

46
Settings.Designer.cs generated
View File

@@ -108,7 +108,7 @@
//
this.labelBattery.AutoSize = true;
this.labelBattery.Font = new System.Drawing.Font("Segoe UI", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point);
this.labelBattery.Location = new System.Drawing.Point(82, 876);
this.labelBattery.Location = new System.Drawing.Point(77, 877);
this.labelBattery.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
this.labelBattery.Name = "labelBattery";
this.labelBattery.Size = new System.Drawing.Size(248, 32);
@@ -130,10 +130,10 @@
//
this.pictureBattery.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("pictureBattery.BackgroundImage")));
this.pictureBattery.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Zoom;
this.pictureBattery.Location = new System.Drawing.Point(30, 868);
this.pictureBattery.Location = new System.Drawing.Point(33, 875);
this.pictureBattery.Margin = new System.Windows.Forms.Padding(4, 2, 4, 2);
this.pictureBattery.Name = "pictureBattery";
this.pictureBattery.Size = new System.Drawing.Size(48, 47);
this.pictureBattery.Size = new System.Drawing.Size(38, 38);
this.pictureBattery.TabIndex = 6;
this.pictureBattery.TabStop = false;
//
@@ -214,7 +214,7 @@
//
this.labelGPU.AutoSize = true;
this.labelGPU.Font = new System.Drawing.Font("Segoe UI", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point);
this.labelGPU.Location = new System.Drawing.Point(84, 265);
this.labelGPU.Location = new System.Drawing.Point(77, 265);
this.labelGPU.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
this.labelGPU.Name = "labelGPU";
this.labelGPU.Size = new System.Drawing.Size(136, 32);
@@ -225,10 +225,10 @@
//
this.pictureGPU.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("pictureGPU.BackgroundImage")));
this.pictureGPU.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Zoom;
this.pictureGPU.Location = new System.Drawing.Point(32, 256);
this.pictureGPU.Location = new System.Drawing.Point(33, 263);
this.pictureGPU.Margin = new System.Windows.Forms.Padding(4, 2, 4, 2);
this.pictureGPU.Name = "pictureGPU";
this.pictureGPU.Size = new System.Drawing.Size(48, 47);
this.pictureGPU.Size = new System.Drawing.Size(38, 38);
this.pictureGPU.TabIndex = 10;
this.pictureGPU.TabStop = false;
//
@@ -254,7 +254,7 @@
this.tablePerf.Controls.Add(this.buttonTurbo, 2, 0);
this.tablePerf.Controls.Add(this.buttonBalanced, 1, 0);
this.tablePerf.Controls.Add(this.buttonSilent, 0, 0);
this.tablePerf.Location = new System.Drawing.Point(22, 79);
this.tablePerf.Location = new System.Drawing.Point(22, 76);
this.tablePerf.Margin = new System.Windows.Forms.Padding(4, 2, 4, 2);
this.tablePerf.Name = "tablePerf";
this.tablePerf.RowCount = 1;
@@ -313,10 +313,10 @@
this.picturePerf.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("picturePerf.BackgroundImage")));
this.picturePerf.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Zoom;
this.picturePerf.InitialImage = null;
this.picturePerf.Location = new System.Drawing.Point(32, 32);
this.picturePerf.Location = new System.Drawing.Point(33, 36);
this.picturePerf.Margin = new System.Windows.Forms.Padding(4, 2, 4, 2);
this.picturePerf.Name = "picturePerf";
this.picturePerf.Size = new System.Drawing.Size(48, 47);
this.picturePerf.Size = new System.Drawing.Size(38, 38);
this.picturePerf.TabIndex = 14;
this.picturePerf.TabStop = false;
//
@@ -324,7 +324,7 @@
//
this.labelPerf.AutoSize = true;
this.labelPerf.Font = new System.Drawing.Font("Segoe UI", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point);
this.labelPerf.Location = new System.Drawing.Point(84, 41);
this.labelPerf.Location = new System.Drawing.Point(77, 38);
this.labelPerf.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
this.labelPerf.Name = "labelPerf";
this.labelPerf.Size = new System.Drawing.Size(234, 32);
@@ -335,7 +335,7 @@
//
this.checkGPU.AutoSize = true;
this.checkGPU.ForeColor = System.Drawing.SystemColors.GrayText;
this.checkGPU.Location = new System.Drawing.Point(33, 410);
this.checkGPU.Location = new System.Drawing.Point(33, 411);
this.checkGPU.Margin = new System.Windows.Forms.Padding(4, 2, 4, 2);
this.checkGPU.Name = "checkGPU";
this.checkGPU.Size = new System.Drawing.Size(550, 36);
@@ -360,10 +360,10 @@
//
this.pictureScreen.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("pictureScreen.BackgroundImage")));
this.pictureScreen.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Zoom;
this.pictureScreen.Location = new System.Drawing.Point(32, 489);
this.pictureScreen.Location = new System.Drawing.Point(33, 496);
this.pictureScreen.Margin = new System.Windows.Forms.Padding(4, 2, 4, 2);
this.pictureScreen.Name = "pictureScreen";
this.pictureScreen.Size = new System.Drawing.Size(48, 47);
this.pictureScreen.Size = new System.Drawing.Size(38, 38);
this.pictureScreen.TabIndex = 18;
this.pictureScreen.TabStop = false;
//
@@ -371,7 +371,7 @@
//
this.labelSreen.AutoSize = true;
this.labelSreen.Font = new System.Drawing.Font("Segoe UI", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point);
this.labelSreen.Location = new System.Drawing.Point(84, 497);
this.labelSreen.Location = new System.Drawing.Point(77, 496);
this.labelSreen.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
this.labelSreen.Name = "labelSreen";
this.labelSreen.Size = new System.Drawing.Size(176, 32);
@@ -388,7 +388,7 @@
this.tableScreen.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 33.33333F));
this.tableScreen.Controls.Add(this.button120Hz, 1, 0);
this.tableScreen.Controls.Add(this.button60Hz, 0, 0);
this.tableScreen.Location = new System.Drawing.Point(22, 535);
this.tableScreen.Location = new System.Drawing.Point(22, 536);
this.tableScreen.Margin = new System.Windows.Forms.Padding(4, 2, 4, 2);
this.tableScreen.Name = "tableScreen";
this.tableScreen.RowCount = 1;
@@ -432,7 +432,7 @@
//
this.checkScreen.AutoSize = true;
this.checkScreen.ForeColor = System.Drawing.SystemColors.GrayText;
this.checkScreen.Location = new System.Drawing.Point(33, 638);
this.checkScreen.Location = new System.Drawing.Point(33, 639);
this.checkScreen.Margin = new System.Windows.Forms.Padding(4, 2, 4, 2);
this.checkScreen.Name = "checkScreen";
this.checkScreen.Size = new System.Drawing.Size(527, 36);
@@ -444,7 +444,7 @@
//
this.checkBoost.AutoSize = true;
this.checkBoost.ForeColor = System.Drawing.SystemColors.GrayText;
this.checkBoost.Location = new System.Drawing.Point(33, 186);
this.checkBoost.Location = new System.Drawing.Point(33, 184);
this.checkBoost.Margin = new System.Windows.Forms.Padding(4, 2, 4, 2);
this.checkBoost.Name = "checkBoost";
this.checkBoost.Size = new System.Drawing.Size(250, 36);
@@ -456,10 +456,10 @@
//
this.pictureBox1.BackgroundImage = global::GHelper.Properties.Resources.icons8_keyboard_48;
this.pictureBox1.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Zoom;
this.pictureBox1.Location = new System.Drawing.Point(33, 720);
this.pictureBox1.Location = new System.Drawing.Point(33, 725);
this.pictureBox1.Margin = new System.Windows.Forms.Padding(4, 2, 4, 2);
this.pictureBox1.Name = "pictureBox1";
this.pictureBox1.Size = new System.Drawing.Size(42, 42);
this.pictureBox1.Size = new System.Drawing.Size(36, 36);
this.pictureBox1.TabIndex = 23;
this.pictureBox1.TabStop = false;
//
@@ -467,7 +467,7 @@
//
this.label1.AutoSize = true;
this.label1.Font = new System.Drawing.Font("Segoe UI", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point);
this.label1.Location = new System.Drawing.Point(84, 723);
this.label1.Location = new System.Drawing.Point(77, 726);
this.label1.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(210, 32);
@@ -484,9 +484,9 @@
"Breathe",
"Strobe",
"Rainbow"});
this.comboKeyboard.Location = new System.Drawing.Point(40, 778);
this.comboKeyboard.Location = new System.Drawing.Point(38, 778);
this.comboKeyboard.Name = "comboKeyboard";
this.comboKeyboard.Size = new System.Drawing.Size(198, 40);
this.comboKeyboard.Size = new System.Drawing.Size(200, 40);
this.comboKeyboard.TabIndex = 24;
this.comboKeyboard.TabStop = false;
//
@@ -554,7 +554,7 @@
this.ShowIcon = false;
this.ShowInTaskbar = false;
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
this.Text = "G14 Helper";
this.Text = "G-Helper";
this.Load += new System.EventHandler(this.Settings_Load);
((System.ComponentModel.ISupportInitialize)(this.trackBattery)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.pictureBattery)).EndInit();

View File

@@ -179,8 +179,15 @@ namespace GHelper
if (frequency > 0)
NativeMethods.SetRefreshRate(frequency);
if (overdrive > 0)
Program.wmi.DeviceSet(ASUSWmi.ScreenOverdrive, overdrive);
try
{
if (overdrive > 0)
Program.wmi.DeviceSet(ASUSWmi.ScreenOverdrive, overdrive);
} catch
{
Debug.WriteLine("Screen Overdrive not supported");
}
InitScreen();
}
@@ -215,7 +222,14 @@ namespace GHelper
labelSreen.Text = "Laptop Screen";
}
int overdrive = Program.wmi.DeviceGet(ASUSWmi.ScreenOverdrive);
int overdrive = 0;
try
{
overdrive = Program.wmi.DeviceGet(ASUSWmi.ScreenOverdrive);
} catch
{
Debug.WriteLine("Screen Overdrive not supported");
}
button60Hz.FlatAppearance.BorderSize = buttonInactive;
button120Hz.FlatAppearance.BorderSize = buttonInactive;
@@ -310,7 +324,7 @@ namespace GHelper
}
}
public void SetPerformanceMode(int PerformanceMode = ASUSWmi.PerformanceBalanced)
public void SetPerformanceMode(int PerformanceMode = ASUSWmi.PerformanceBalanced, bool notify = false)
{
buttonSilent.FlatAppearance.BorderSize = buttonInactive;

BIN
null

Binary file not shown.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 813 KiB

After

Width:  |  Height:  |  Size: 1.6 MiB