mirror of
https://github.com/jkocon/g-helper.git
synced 2026-02-23 13:00:52 +01:00
Compare commits
9 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
81a0019b42 | ||
|
|
3778c255bc | ||
|
|
a6b597affe | ||
|
|
4aaba5cee7 | ||
|
|
cbbe944c2b | ||
|
|
f4d066d407 | ||
|
|
cc96ca9946 | ||
|
|
fb95d9abb2 | ||
|
|
15112cb5c8 |
21
Program.cs
21
Program.cs
@@ -429,11 +429,10 @@ public class Aura
|
||||
static byte[] MESSAGE_APPLY = { 0x5d, 0xb4 };
|
||||
|
||||
public const int Static = 0;
|
||||
public const int Breathe = 0;
|
||||
public const int Strobe = 0;
|
||||
public const int Rainbow = 0;
|
||||
public const int Breathe = 1;
|
||||
public const int Strobe = 2;
|
||||
public const int Rainbow = 3;
|
||||
|
||||
|
||||
public const int SpeedSlow = 0;
|
||||
public const int SpeedMedium = 1;
|
||||
public const int SpeedHigh = 2;
|
||||
@@ -507,7 +506,7 @@ namespace GHelper
|
||||
{
|
||||
trayIcon = new NotifyIcon
|
||||
{
|
||||
Text = "G14 Helper",
|
||||
Text = "G-Helper",
|
||||
Icon = GHelper.Properties.Resources.standard,
|
||||
Visible = true
|
||||
};
|
||||
@@ -535,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();
|
||||
|
||||
}
|
||||
@@ -559,6 +562,12 @@ namespace GHelper
|
||||
settingsForm.CyclePerformanceMode();
|
||||
});
|
||||
return;
|
||||
case 179: // FN+F4
|
||||
settingsForm.BeginInvoke(delegate
|
||||
{
|
||||
settingsForm.CycleAuraMode();
|
||||
});
|
||||
return;
|
||||
case 87: // Battery
|
||||
settingsForm.BeginInvoke(delegate
|
||||
{
|
||||
@@ -591,6 +600,8 @@ namespace GHelper
|
||||
settingsForm.Show();
|
||||
settingsForm.Activate();
|
||||
}
|
||||
|
||||
trayIcon.Icon = trayIcon.Icon; // refreshing icon as it get's blurred when screen resolution changes
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
22
README.md
22
README.md
@@ -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
|
||||
@@ -22,18 +22,18 @@ Profiles are **same** as in Armory Crate, including default fan curves
|
||||
|
||||
## Extras
|
||||
|
||||
1. **Maximum battery charge rate** limit (60% / 80% / 100%) to preserve your battery
|
||||
2. CPU and GPU relative fan speed monitoring
|
||||
3. Automatic switching of Standard/Eco GPU modes when laptop is plugged / unplugged!
|
||||
4. FN+F5 an M4 (Rog) keys cycle through Performance modes
|
||||
5. Screen resolution and display overdrive switching
|
||||
6. Run on startup (optional)
|
||||
1. Keyboard backlight control (basic aura modes and colors)
|
||||
2. **Maximum battery charge rate** limit (60% / 80% / 100%) to preserve your battery
|
||||
3. CPU and GPU relative fan speed monitoring
|
||||
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. CPU turbo boost switching
|
||||
|
||||
## Things still missing
|
||||
|
||||
1. Keyboard backlight control
|
||||
2. Custom fan profiles
|
||||
3. Anime matrix control
|
||||
1. Custom fan profiles
|
||||
2. Anime matrix control
|
||||
|
||||
## How to install
|
||||
|
||||
|
||||
64
Settings.Designer.cs
generated
64
Settings.Designer.cs
generated
@@ -61,6 +61,7 @@
|
||||
this.label1 = new System.Windows.Forms.Label();
|
||||
this.comboKeyboard = new System.Windows.Forms.ComboBox();
|
||||
this.buttonKeyboardColor = new System.Windows.Forms.Button();
|
||||
this.pictureBox2 = new System.Windows.Forms.PictureBox();
|
||||
((System.ComponentModel.ISupportInitialize)(this.trackBattery)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.pictureBattery)).BeginInit();
|
||||
this.tableGPU.SuspendLayout();
|
||||
@@ -70,6 +71,7 @@
|
||||
((System.ComponentModel.ISupportInitialize)(this.pictureScreen)).BeginInit();
|
||||
this.tableScreen.SuspendLayout();
|
||||
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.pictureBox2)).BeginInit();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// checkStartup
|
||||
@@ -106,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);
|
||||
@@ -128,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;
|
||||
//
|
||||
@@ -212,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);
|
||||
@@ -223,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;
|
||||
//
|
||||
@@ -252,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;
|
||||
@@ -311,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;
|
||||
//
|
||||
@@ -322,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);
|
||||
@@ -333,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);
|
||||
@@ -358,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;
|
||||
//
|
||||
@@ -369,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);
|
||||
@@ -386,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;
|
||||
@@ -430,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);
|
||||
@@ -442,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);
|
||||
@@ -454,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;
|
||||
//
|
||||
@@ -465,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);
|
||||
@@ -482,10 +484,11 @@
|
||||
"Breathe",
|
||||
"Strobe",
|
||||
"Rainbow"});
|
||||
this.comboKeyboard.Location = new System.Drawing.Point(31, 778);
|
||||
this.comboKeyboard.Location = new System.Drawing.Point(38, 778);
|
||||
this.comboKeyboard.Name = "comboKeyboard";
|
||||
this.comboKeyboard.Size = new System.Drawing.Size(212, 40);
|
||||
this.comboKeyboard.Size = new System.Drawing.Size(200, 40);
|
||||
this.comboKeyboard.TabIndex = 24;
|
||||
this.comboKeyboard.TabStop = false;
|
||||
//
|
||||
// buttonKeyboardColor
|
||||
//
|
||||
@@ -497,11 +500,19 @@
|
||||
this.buttonKeyboardColor.Location = new System.Drawing.Point(261, 773);
|
||||
this.buttonKeyboardColor.Margin = new System.Windows.Forms.Padding(0);
|
||||
this.buttonKeyboardColor.Name = "buttonKeyboardColor";
|
||||
this.buttonKeyboardColor.Size = new System.Drawing.Size(212, 49);
|
||||
this.buttonKeyboardColor.Size = new System.Drawing.Size(212, 50);
|
||||
this.buttonKeyboardColor.TabIndex = 25;
|
||||
this.buttonKeyboardColor.Text = "Color";
|
||||
this.buttonKeyboardColor.UseVisualStyleBackColor = false;
|
||||
this.buttonKeyboardColor.Click += new System.EventHandler(this.buttonKeyboard_Click);
|
||||
//
|
||||
// pictureBox2
|
||||
//
|
||||
this.pictureBox2.BackColor = System.Drawing.SystemColors.ControlLightLight;
|
||||
this.pictureBox2.Location = new System.Drawing.Point(32, 773);
|
||||
this.pictureBox2.Name = "pictureBox2";
|
||||
this.pictureBox2.Size = new System.Drawing.Size(212, 50);
|
||||
this.pictureBox2.TabIndex = 26;
|
||||
this.pictureBox2.TabStop = false;
|
||||
//
|
||||
// SettingsForm
|
||||
//
|
||||
@@ -532,6 +543,7 @@
|
||||
this.Controls.Add(this.labelBattery);
|
||||
this.Controls.Add(this.trackBattery);
|
||||
this.Controls.Add(this.checkStartup);
|
||||
this.Controls.Add(this.pictureBox2);
|
||||
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
|
||||
this.Margin = new System.Windows.Forms.Padding(4, 2, 4, 2);
|
||||
this.MaximizeBox = false;
|
||||
@@ -542,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();
|
||||
@@ -553,6 +565,7 @@
|
||||
((System.ComponentModel.ISupportInitialize)(this.pictureScreen)).EndInit();
|
||||
this.tableScreen.ResumeLayout(false);
|
||||
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.pictureBox2)).EndInit();
|
||||
this.ResumeLayout(false);
|
||||
this.PerformLayout();
|
||||
|
||||
@@ -591,5 +604,6 @@
|
||||
private Label label1;
|
||||
private ComboBox comboKeyboard;
|
||||
private Button buttonKeyboardColor;
|
||||
private PictureBox pictureBox2;
|
||||
}
|
||||
}
|
||||
135
Settings.cs
135
Settings.cs
@@ -1,4 +1,5 @@
|
||||
using System.Diagnostics;
|
||||
using Microsoft.VisualBasic.ApplicationServices;
|
||||
using System.Diagnostics;
|
||||
using System.Management;
|
||||
using System.Timers;
|
||||
using System.Windows.Forms;
|
||||
@@ -55,42 +56,16 @@ namespace GHelper
|
||||
|
||||
comboKeyboard.DropDownStyle = ComboBoxStyle.DropDownList;
|
||||
comboKeyboard.SelectedIndex = 0;
|
||||
|
||||
comboKeyboard.SelectedValueChanged += ComboKeyboard_SelectedValueChanged;
|
||||
|
||||
buttonKeyboardColor.Click += ButtonKeyboardColor_Click;
|
||||
|
||||
SetTimer();
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
public void InitAura()
|
||||
{
|
||||
int mode = Program.config.getConfig("aura_mode");
|
||||
int color = Program.config.getConfig("aura_color");
|
||||
int speed = Program.config.getConfig("aura_speed");
|
||||
|
||||
if (mode == -1) mode = 0;
|
||||
if (color == -1) color = Color.FromArgb(255, 255, 255).ToArgb();
|
||||
|
||||
Aura.Mode = mode;
|
||||
Aura.Color1 = Color.FromArgb(color);
|
||||
|
||||
comboKeyboard.SelectedIndex = Aura.Mode;
|
||||
buttonKeyboardColor.FlatAppearance.BorderColor = Aura.Color1;
|
||||
|
||||
}
|
||||
|
||||
private void ComboKeyboard_SelectedValueChanged(object? sender, EventArgs e)
|
||||
{
|
||||
ComboBox cmb = (ComboBox)sender;
|
||||
int selectedIndex = cmb.SelectedIndex;
|
||||
Aura.Mode = (byte)selectedIndex;
|
||||
Aura.ApplyAura();
|
||||
Program.config.setConfig("aura_mode", selectedIndex);
|
||||
}
|
||||
|
||||
|
||||
private void buttonKeyboard_Click(object sender, EventArgs e)
|
||||
private void ButtonKeyboardColor_Click(object? sender, EventArgs e)
|
||||
{
|
||||
|
||||
Button but = (Button)sender;
|
||||
@@ -101,13 +76,72 @@ namespace GHelper
|
||||
|
||||
if (colorDlg.ShowDialog() == DialogResult.OK)
|
||||
{
|
||||
but.FlatAppearance.BorderColor = colorDlg.Color;
|
||||
Aura.Color1 = colorDlg.Color;
|
||||
Aura.ApplyAura();
|
||||
Program.config.setConfig("aura_color", colorDlg.Color.ToArgb());
|
||||
SetAuraColor(colorDlg.Color);
|
||||
}
|
||||
}
|
||||
|
||||
public void InitAura()
|
||||
{
|
||||
int mode = Program.config.getConfig("aura_mode");
|
||||
int colorCode = Program.config.getConfig("aura_color");
|
||||
int speed = Program.config.getConfig("aura_speed");
|
||||
|
||||
Color color = Color.FromArgb(255, 255, 255);
|
||||
|
||||
if (mode == -1)
|
||||
mode = 0;
|
||||
|
||||
if (colorCode != -1)
|
||||
color = Color.FromArgb(colorCode);
|
||||
|
||||
|
||||
SetAuraColor(color, false);
|
||||
SetAuraMode(mode, false);
|
||||
|
||||
Aura.Mode = mode;
|
||||
|
||||
|
||||
}
|
||||
|
||||
public void SetAuraColor(Color color, bool apply = true)
|
||||
{
|
||||
Aura.Color1 = color;
|
||||
Program.config.setConfig("aura_color", color.ToArgb());
|
||||
|
||||
if (apply)
|
||||
Aura.ApplyAura();
|
||||
|
||||
buttonKeyboardColor.FlatAppearance.BorderColor = color;
|
||||
}
|
||||
|
||||
public void SetAuraMode (int mode = 0, bool apply = true)
|
||||
{
|
||||
|
||||
if (mode > 3) mode = 0;
|
||||
|
||||
if (Aura.Mode == mode) return; // same mode
|
||||
|
||||
Aura.Mode = mode;
|
||||
Program.config.setConfig("aura_mode", mode);
|
||||
|
||||
if (apply)
|
||||
Aura.ApplyAura();
|
||||
else
|
||||
comboKeyboard.SelectedIndex = mode;
|
||||
}
|
||||
|
||||
public void CycleAuraMode ()
|
||||
{
|
||||
SetAuraMode(Program.config.getConfig("aura_mode") + 1);
|
||||
}
|
||||
|
||||
private void ComboKeyboard_SelectedValueChanged(object? sender, EventArgs e)
|
||||
{
|
||||
ComboBox cmb = (ComboBox)sender;
|
||||
SetAuraMode(cmb.SelectedIndex);
|
||||
}
|
||||
|
||||
|
||||
private void CheckBoost_Click(object? sender, EventArgs e)
|
||||
{
|
||||
CheckBox chk = (CheckBox)sender;
|
||||
@@ -145,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();
|
||||
}
|
||||
@@ -181,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;
|
||||
@@ -276,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;
|
||||
@@ -538,7 +586,13 @@ namespace GHelper
|
||||
|
||||
labelBatteryLimit.Text = limit.ToString() + "%";
|
||||
trackBattery.Value = limit;
|
||||
Program.wmi.DeviceSet(ASUSWmi.BatteryLimit, limit);
|
||||
try
|
||||
{
|
||||
Program.wmi.DeviceSet(ASUSWmi.BatteryLimit, limit);
|
||||
} catch
|
||||
{
|
||||
Debug.WriteLine("Can't set battery charge limit");
|
||||
}
|
||||
Program.config.setConfig("charge_limit", limit);
|
||||
|
||||
}
|
||||
@@ -568,6 +622,7 @@ namespace GHelper
|
||||
Program.config.setConfig("screen_auto", 0);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -61,7 +61,7 @@
|
||||
<data name="pictureBattery.BackgroundImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAL
|
||||
DwAACw8BkvkDpQAAAY1JREFUaEPtlz1OAzEQhVdIFFyCH0EFDQ1wAhDcgxPACYCOA/BzGTo6aKGKFOAE
|
||||
DAAACwwBP0AiyAAAAY1JREFUaEPtlz1OAzEQhVdIFFyCH0EFDQ1wAhDcgxPACYCOA/BzGTo6aKGKFOAE
|
||||
0FCABO9FsbSK3uI8J9kFMZ/0FdmMZ+xovLGrIAiCIAiCQLIMr+EL/IRfM5Y1WOsKsvZE7ME3qAq1IWvv
|
||||
wiJWYJeTT77CJWjDtlEJu/AS2rAPVbIufII2bWzYceVcbFQix1V4CKe1j2xUEscEN+ANVDGONiqJY505
|
||||
eATfoYp15N48gFnUYEfFOryDKt7xGWZRA0flhHbgOewNnyWbmIcn8APW412zqEGj8u9+ASY24Rl8GHz6
|
||||
@@ -74,7 +74,7 @@
|
||||
<data name="pictureGPU.BackgroundImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAL
|
||||
DwAACw8BkvkDpQAAAZVJREFUaEPtmTtOxDAURYcGGtgAsCJo6PisACE2ALTAvvgVsB0KQBRwT2HJGl3y
|
||||
DAAACwwBP0AiyAAAAZVJREFUaEPtmTtOxDAURYcGGtgAsCJo6PisACE2ALTAvvgVsB0KQBRwT2HJGl3y
|
||||
EtloHPCRjiKNfJ/sOLGV8aLT6XSa4Fa+ya/MD3kjm2dNvsq888l3OQu408szkJwlfQCr5k8NoAVZEV/k
|
||||
vhyFK9KKBzLEBVvxWYa4YCuO2ptcsCVDXKim9/JQbst1uSOP5IN07ZcNcaEafspTOcSZpJ3LJ0NcCC8k
|
||||
d8zB75fS5ZJR5xMMwuWTIS6Em3KILelyeCen8ChdHQxxIeQOD83AlXQ55JmfwrF0dTDEhUrlhZ0CL7ar
|
||||
@@ -87,7 +87,7 @@
|
||||
<data name="picturePerf.BackgroundImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAL
|
||||
DwAACw8BkvkDpQAAA31JREFUaEPt2NnrTkEcx/HHmj37hTWJP0BCSe5ESSnklivJUsiuXFiSIlsS98qW
|
||||
DAAACwwBP0AiyAAAA31JREFUaEPt2NnrTkEcx/HHmj37hTWJP0BCSe5ESSnklivJUsiuXFiSIlsS98qW
|
||||
CLmTP0FKUkqkrNn37f2p39T07fucmfM85/eQzqdexW/mzJlzzpyZeU6jTp06df6L9MQsbMdF3MVrfOui
|
||||
f+tvF7ANM6Fj/nrGYT+e4HdJj7EPY9HxjMBJfIXXuTK+4ASGoyNZjpfwOtOOF1iGbktv6K57J6/Scehc
|
||||
laY/rsI7YfADt7EReqFHow8GYCJmYzNu4ju8NoIr0Dkrie5GUec/4QDU4dzMh9dWTBdRyZMoGjbnMR5l
|
||||
@@ -108,7 +108,7 @@
|
||||
<data name="pictureScreen.BackgroundImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAL
|
||||
DwAACw8BkvkDpQAAANBJREFUaEPt2DESAUEUhOF1PQQuxd1wHAGi1U8galU9ktej+qv6M71myyZriYiI
|
||||
DAAACwwBP0AiyAAAANBJREFUaEPt2DESAUEUhOF1PQQuxd1wHAGi1U8galU9ktej+qv6M71myyZriYiI
|
||||
+Fd7dEFPtDZV311n2KEhdXh2wc4OSHZF7CKdnZGs87H51gPJ2AUckrGxQzI2dkjGxg7J2NghGRs7JGNj
|
||||
h2Rs7JCMjR2SsbFDMjZ2SMbGDsnY2CEZGzskY2OHZGzskIyNHZKxsUOy6V8pp3+pr/9h2EU626IhdRN1
|
||||
191/bNUZhg8fMeiE7og9h47VWY/obYNuiH3QuTrzR93NtL9ARET8aFleMDJURjd/4/oAAAAASUVORK5C
|
||||
|
||||
BIN
screenshot.png
BIN
screenshot.png
Binary file not shown.
|
Before Width: | Height: | Size: 813 KiB After Width: | Height: | Size: 1.6 MiB |
Reference in New Issue
Block a user