mirror of
https://github.com/jkocon/g-helper.git
synced 2026-02-23 13:00:52 +01:00
Compare commits
12 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
1ebc2021f6 | ||
|
|
52b165f250 | ||
|
|
b2ed390bdf | ||
|
|
1588f84c97 | ||
|
|
a3a2fdfe14 | ||
|
|
2c867eb960 | ||
|
|
6fbf4f2a49 | ||
|
|
d4ecb2bcf3 | ||
|
|
c70c6ef4d6 | ||
|
|
5d77d5c700 | ||
|
|
89f096778d | ||
|
|
2b9fc913ad |
@@ -48,6 +48,7 @@ public class ASUSWmi
|
||||
public const int PPT_APUC1 = 0x001200C1; // Actual Power Limit (PPT_LIMIT_FAST) AND Sustained Power Limit (STAPM_LIMIT)
|
||||
public const int PPT_APUC2 = 0x001200C2; // does nothing on G14 2022
|
||||
|
||||
public const int TUF_KB_BRIGHTNESS = 0x00050021;
|
||||
public const int TUF_KB = 0x00100056;
|
||||
public const int TUF_KB_STATE = 0x00100057;
|
||||
|
||||
@@ -260,11 +261,17 @@ public class ASUSWmi
|
||||
|
||||
}
|
||||
|
||||
public void TUFKeyboardBrightness(int brightness)
|
||||
{
|
||||
int param = 0x80 | (brightness & 0x7F);
|
||||
DeviceSet(TUF_KB_BRIGHTNESS, param, "TUF Brightness");
|
||||
}
|
||||
|
||||
public void TUFKeyboardRGB(int mode, Color color, int speed)
|
||||
{
|
||||
|
||||
byte[] setting = new byte[12];
|
||||
setting[0] = (byte)1;
|
||||
setting[0] = (byte)0xB4;
|
||||
setting[1] = (byte)mode;
|
||||
setting[2] = color.R;
|
||||
setting[3] = color.G;
|
||||
|
||||
15
app/Aura.cs
15
app/Aura.cs
@@ -1,5 +1,6 @@
|
||||
using HidLibrary;
|
||||
using System.Diagnostics;
|
||||
using static Starlight.AnimeMatrix.BuiltInAnimation;
|
||||
|
||||
namespace GHelper
|
||||
{
|
||||
@@ -195,6 +196,9 @@ namespace GHelper
|
||||
}
|
||||
|
||||
Logger.WriteLine("USB-KB = " + BitConverter.ToString(msg));
|
||||
|
||||
if (Program.config.ContainsModel("TUF"))
|
||||
Program.wmi.TUFKeyboardBrightness(brightness);
|
||||
}
|
||||
|
||||
|
||||
@@ -209,6 +213,17 @@ namespace GHelper
|
||||
if (sleep) flags.Add(AuraDev19b6.SleepKeyb);
|
||||
if (shutdown) flags.Add(AuraDev19b6.ShutdownKeyb);
|
||||
|
||||
flags.Add(AuraDev19b6.AwakeBar);
|
||||
flags.Add(AuraDev19b6.BootBar);
|
||||
flags.Add(AuraDev19b6.SleepBar);
|
||||
flags.Add(AuraDev19b6.ShutdownBar);
|
||||
|
||||
flags.Add(AuraDev19b6.AwakeLid);
|
||||
flags.Add(AuraDev19b6.BootLid);
|
||||
flags.Add(AuraDev19b6.SleepLid);
|
||||
flags.Add(AuraDev19b6.ShutdownLid);
|
||||
|
||||
|
||||
byte[] msg = AuraDev19b6Extensions.ToBytes(flags.ToArray());
|
||||
|
||||
Debug.WriteLine(BitConverter.ToString(msg));
|
||||
|
||||
2
app/Fans.Designer.cs
generated
2
app/Fans.Designer.cs
generated
@@ -441,7 +441,7 @@ namespace GHelper
|
||||
MaximizeBox = false;
|
||||
MdiChildrenMinimizedAnchorBottom = false;
|
||||
MinimizeBox = false;
|
||||
MinimumSize = new Size(26, 1230);
|
||||
MinimumSize = new Size(26, 1260);
|
||||
Name = "Fans";
|
||||
ShowIcon = false;
|
||||
ShowInTaskbar = false;
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
<PlatformTarget>x64</PlatformTarget>
|
||||
<ProduceReferenceAssembly>False</ProduceReferenceAssembly>
|
||||
<AllowUnsafeBlocks>True</AllowUnsafeBlocks>
|
||||
<AssemblyVersion>0.53</AssemblyVersion>
|
||||
<AssemblyVersion>0.55</AssemblyVersion>
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
|
||||
|
||||
79
app/Keyboard.Designer.cs
generated
79
app/Keyboard.Designer.cs
generated
@@ -31,6 +31,7 @@ namespace GHelper
|
||||
private void InitializeComponent()
|
||||
{
|
||||
groupBox1 = new GroupBox();
|
||||
pictureHelp = new PictureBox();
|
||||
textFNF4 = new TextBox();
|
||||
comboFNF4 = new RComboBox();
|
||||
labelFNF4 = new Label();
|
||||
@@ -41,6 +42,8 @@ namespace GHelper
|
||||
comboM3 = new RComboBox();
|
||||
labelM3 = new Label();
|
||||
groupLight = new GroupBox();
|
||||
labelBrightness = new Label();
|
||||
trackBrightness = new TrackBar();
|
||||
labelSpeed = new Label();
|
||||
comboKeyboardSpeed = new RComboBox();
|
||||
checkShutdown = new CheckBox();
|
||||
@@ -51,11 +54,11 @@ namespace GHelper
|
||||
checkNoOverdrive = new CheckBox();
|
||||
checkKeyboardAuto = new CheckBox();
|
||||
checkTopmost = new CheckBox();
|
||||
pictureHelp = new PictureBox();
|
||||
groupBox1.SuspendLayout();
|
||||
groupLight.SuspendLayout();
|
||||
groupOther.SuspendLayout();
|
||||
((System.ComponentModel.ISupportInitialize)pictureHelp).BeginInit();
|
||||
groupLight.SuspendLayout();
|
||||
((System.ComponentModel.ISupportInitialize)trackBrightness).BeginInit();
|
||||
groupOther.SuspendLayout();
|
||||
SuspendLayout();
|
||||
//
|
||||
// groupBox1
|
||||
@@ -73,11 +76,22 @@ namespace GHelper
|
||||
groupBox1.Dock = DockStyle.Top;
|
||||
groupBox1.Location = new Point(10, 10);
|
||||
groupBox1.Name = "groupBox1";
|
||||
groupBox1.Size = new Size(810, 242);
|
||||
groupBox1.Size = new Size(840, 242);
|
||||
groupBox1.TabIndex = 0;
|
||||
groupBox1.TabStop = false;
|
||||
groupBox1.Text = Properties.Strings.KeyBindings;
|
||||
//
|
||||
// pictureHelp
|
||||
//
|
||||
pictureHelp.BackgroundImage = Properties.Resources.icons8_help_64;
|
||||
pictureHelp.BackgroundImageLayout = ImageLayout.Zoom;
|
||||
pictureHelp.Cursor = Cursors.Hand;
|
||||
pictureHelp.Location = new Point(744, 57);
|
||||
pictureHelp.Name = "pictureHelp";
|
||||
pictureHelp.Size = new Size(32, 32);
|
||||
pictureHelp.TabIndex = 9;
|
||||
pictureHelp.TabStop = false;
|
||||
//
|
||||
// textFNF4
|
||||
//
|
||||
textFNF4.Location = new Point(415, 176);
|
||||
@@ -88,12 +102,13 @@ namespace GHelper
|
||||
//
|
||||
// comboFNF4
|
||||
//
|
||||
comboFNF4.BorderColor = Color.White;
|
||||
comboFNF4.ButtonColor = Color.FromArgb(255, 255, 255);
|
||||
comboFNF4.FormattingEnabled = true;
|
||||
comboFNF4.Location = new Point(93, 175);
|
||||
comboFNF4.Name = "comboFNF4";
|
||||
comboFNF4.Size = new Size(312, 40);
|
||||
comboFNF4.TabIndex = 7;
|
||||
comboFNF4.BorderColor = Color.White;
|
||||
//
|
||||
// labelFNF4
|
||||
//
|
||||
@@ -122,14 +137,14 @@ namespace GHelper
|
||||
//
|
||||
// comboM4
|
||||
//
|
||||
comboM4.BorderColor = Color.White;
|
||||
comboM4.ButtonColor = Color.FromArgb(255, 255, 255);
|
||||
comboM4.FormattingEnabled = true;
|
||||
comboM4.Items.AddRange(new object[] { Properties.Strings.PerformanceMode, Properties.Strings.OpenGHelper, Properties.Strings.Custom });
|
||||
comboM4.Location = new Point(93, 112);
|
||||
comboM4.Name = "comboM4";
|
||||
comboM4.Size = new Size(312, 40);
|
||||
comboM4.TabIndex = 3;
|
||||
comboM4.BorderColor = Color.White;
|
||||
|
||||
//
|
||||
// labelM4
|
||||
//
|
||||
@@ -142,14 +157,14 @@ namespace GHelper
|
||||
//
|
||||
// comboM3
|
||||
//
|
||||
comboM3.BorderColor = Color.White;
|
||||
comboM3.ButtonColor = Color.FromArgb(255, 255, 255);
|
||||
comboM3.FormattingEnabled = true;
|
||||
comboM3.Items.AddRange(new object[] { Properties.Strings.Default, Properties.Strings.VolumeMute, Properties.Strings.PlayPause, Properties.Strings.PrintScreen, Properties.Strings.ToggleAura, Properties.Strings.Custom });
|
||||
comboM3.Location = new Point(93, 54);
|
||||
comboM3.Name = "comboM3";
|
||||
comboM3.Size = new Size(312, 40);
|
||||
comboM3.TabIndex = 1;
|
||||
comboM3.BorderColor = Color.White;
|
||||
|
||||
//
|
||||
// labelM3
|
||||
//
|
||||
@@ -162,6 +177,8 @@ namespace GHelper
|
||||
//
|
||||
// groupLight
|
||||
//
|
||||
groupLight.Controls.Add(labelBrightness);
|
||||
groupLight.Controls.Add(trackBrightness);
|
||||
groupLight.Controls.Add(labelSpeed);
|
||||
groupLight.Controls.Add(comboKeyboardSpeed);
|
||||
groupLight.Controls.Add(checkShutdown);
|
||||
@@ -171,15 +188,30 @@ namespace GHelper
|
||||
groupLight.Dock = DockStyle.Top;
|
||||
groupLight.Location = new Point(10, 252);
|
||||
groupLight.Name = "groupLight";
|
||||
groupLight.Size = new Size(810, 320);
|
||||
groupLight.Size = new Size(840, 374);
|
||||
groupLight.TabIndex = 1;
|
||||
groupLight.TabStop = false;
|
||||
groupLight.Text = Properties.Strings.KeyboardBacklight;
|
||||
//
|
||||
// labelBrightness
|
||||
//
|
||||
labelBrightness.Location = new Point(25, 284);
|
||||
labelBrightness.Name = "labelBrightness";
|
||||
labelBrightness.Size = new Size(197, 49);
|
||||
labelBrightness.TabIndex = 0;
|
||||
labelBrightness.Text = "Brightness";
|
||||
//
|
||||
// trackBrightness
|
||||
//
|
||||
trackBrightness.Location = new Point(228, 284);
|
||||
trackBrightness.Name = "trackBrightness";
|
||||
trackBrightness.Size = new Size(612, 90);
|
||||
trackBrightness.TabIndex = 1;
|
||||
//
|
||||
// labelSpeed
|
||||
//
|
||||
labelSpeed.AutoSize = true;
|
||||
labelSpeed.Location = new Point(25, 237);
|
||||
labelSpeed.Location = new Point(25, 235);
|
||||
labelSpeed.MaximumSize = new Size(200, 0);
|
||||
labelSpeed.Name = "labelSpeed";
|
||||
labelSpeed.Size = new Size(198, 32);
|
||||
@@ -195,7 +227,7 @@ namespace GHelper
|
||||
comboKeyboardSpeed.FormattingEnabled = true;
|
||||
comboKeyboardSpeed.ItemHeight = 32;
|
||||
comboKeyboardSpeed.Items.AddRange(new object[] { "Slow", "Normal", "Fast" });
|
||||
comboKeyboardSpeed.Location = new Point(230, 234);
|
||||
comboKeyboardSpeed.Location = new Point(230, 232);
|
||||
comboKeyboardSpeed.Margin = new Padding(4, 10, 4, 8);
|
||||
comboKeyboardSpeed.Name = "comboKeyboardSpeed";
|
||||
comboKeyboardSpeed.Size = new Size(291, 40);
|
||||
@@ -248,9 +280,9 @@ namespace GHelper
|
||||
groupOther.Controls.Add(checkKeyboardAuto);
|
||||
groupOther.Controls.Add(checkTopmost);
|
||||
groupOther.Dock = DockStyle.Top;
|
||||
groupOther.Location = new Point(10, 572);
|
||||
groupOther.Location = new Point(10, 626);
|
||||
groupOther.Name = "groupOther";
|
||||
groupOther.Size = new Size(810, 225);
|
||||
groupOther.Size = new Size(840, 225);
|
||||
groupOther.TabIndex = 2;
|
||||
groupOther.TabStop = false;
|
||||
groupOther.Text = Properties.Strings.Other;
|
||||
@@ -267,7 +299,6 @@ namespace GHelper
|
||||
//
|
||||
// checkKeyboardAuto
|
||||
//
|
||||
checkKeyboardAuto.AutoEllipsis = true;
|
||||
checkKeyboardAuto.AutoSize = true;
|
||||
checkKeyboardAuto.Location = new Point(25, 51);
|
||||
checkKeyboardAuto.MaximumSize = new Size(780, 0);
|
||||
@@ -287,22 +318,11 @@ namespace GHelper
|
||||
checkTopmost.Text = Properties.Strings.WindowTop;
|
||||
checkTopmost.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// pictureHelp
|
||||
//
|
||||
pictureHelp.BackgroundImageLayout = ImageLayout.Zoom;
|
||||
pictureHelp.Cursor = Cursors.Hand;
|
||||
pictureHelp.BackgroundImage = Properties.Resources.icons8_help_64;
|
||||
pictureHelp.Location = new Point(744, 57);
|
||||
pictureHelp.Name = "pictureHelp";
|
||||
pictureHelp.Size = new Size(32, 32);
|
||||
pictureHelp.TabIndex = 9;
|
||||
pictureHelp.TabStop = false;
|
||||
//
|
||||
// Keyboard
|
||||
//
|
||||
AutoScaleDimensions = new SizeF(13F, 32F);
|
||||
AutoScaleMode = AutoScaleMode.Font;
|
||||
ClientSize = new Size(830, 858);
|
||||
ClientSize = new Size(860, 890);
|
||||
Controls.Add(groupOther);
|
||||
Controls.Add(groupLight);
|
||||
Controls.Add(groupBox1);
|
||||
@@ -317,11 +337,12 @@ namespace GHelper
|
||||
Text = Properties.Strings.ExtraSettings;
|
||||
groupBox1.ResumeLayout(false);
|
||||
groupBox1.PerformLayout();
|
||||
((System.ComponentModel.ISupportInitialize)pictureHelp).EndInit();
|
||||
groupLight.ResumeLayout(false);
|
||||
groupLight.PerformLayout();
|
||||
((System.ComponentModel.ISupportInitialize)trackBrightness).EndInit();
|
||||
groupOther.ResumeLayout(false);
|
||||
groupOther.PerformLayout();
|
||||
((System.ComponentModel.ISupportInitialize)pictureHelp).EndInit();
|
||||
ResumeLayout(false);
|
||||
}
|
||||
|
||||
@@ -349,5 +370,7 @@ namespace GHelper
|
||||
private CheckBox checkKeyboardAuto;
|
||||
private CheckBox checkNoOverdrive;
|
||||
private PictureBox pictureHelp;
|
||||
private TrackBar trackBrightness;
|
||||
private Label labelBrightness;
|
||||
}
|
||||
}
|
||||
@@ -88,8 +88,18 @@ namespace GHelper
|
||||
checkNoOverdrive.Checked = (Program.config.getConfig("no_overdrive") == 1);
|
||||
checkNoOverdrive.CheckedChanged += CheckNoOverdrive_CheckedChanged;
|
||||
|
||||
pictureHelp.Click += PictureHelp_Click;
|
||||
int kb_brightness = Program.config.getConfig("keyboard_brightness");
|
||||
trackBrightness.Value = (kb_brightness >= 0 && kb_brightness <= 3) ? kb_brightness : 3;
|
||||
|
||||
pictureHelp.Click += PictureHelp_Click;
|
||||
trackBrightness.Scroll += TrackBrightness_Scroll;
|
||||
|
||||
}
|
||||
|
||||
private void TrackBrightness_Scroll(object? sender, EventArgs e)
|
||||
{
|
||||
Program.config.setConfig("keyboard_brightness", trackBrightness.Value);
|
||||
Aura.ApplyBrightness(trackBrightness.Value);
|
||||
}
|
||||
|
||||
private void PictureHelp_Click(object? sender, EventArgs e)
|
||||
|
||||
10
app/Properties/Resources.Designer.cs
generated
10
app/Properties/Resources.Designer.cs
generated
@@ -330,6 +330,16 @@ namespace GHelper.Properties {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
||||
/// </summary>
|
||||
internal static System.Drawing.Bitmap icons8_video_48 {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("icons8_video_48", resourceCulture);
|
||||
return ((System.Drawing.Bitmap)(obj));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
||||
/// </summary>
|
||||
|
||||
@@ -211,4 +211,7 @@
|
||||
<data name="icons8-help-64" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\icons8-help-64.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="icons8_video_48" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\icons8-video-48.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
</root>
|
||||
@@ -118,7 +118,7 @@
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<data name="ACPIError" xml:space="preserve">
|
||||
<value>无法连接到ASUS ACPI。 没有它,应用程序将无法运行。 请尝试安装Asus System Control Interface驱动。</value>
|
||||
<value>无法连接到ASUS ACPI。 没有它应用程序将无法运行。 请尝试安装Asus System Control Interface驱动。</value>
|
||||
</data>
|
||||
<data name="AlertDGPU" xml:space="preserve">
|
||||
<value>看起来 GPU 正在大量耗电,是否禁用?</value>
|
||||
@@ -142,7 +142,7 @@
|
||||
<value>Anime Matrix 光显矩阵屏</value>
|
||||
</data>
|
||||
<data name="AppAlreadyRunning" xml:space="preserve">
|
||||
<value>应用已经运行</value>
|
||||
<value>应用已经在运行</value>
|
||||
</data>
|
||||
<data name="AppAlreadyRunningText" xml:space="preserve">
|
||||
<value>G-Helper已经在运行。 请查看系统托盘中的图标。</value>
|
||||
@@ -187,7 +187,7 @@
|
||||
<value>唤醒时</value>
|
||||
</data>
|
||||
<data name="Balanced" xml:space="preserve">
|
||||
<value>平衡</value>
|
||||
<value>平衡模式</value>
|
||||
</data>
|
||||
<data name="BatteryChargeLimit" xml:space="preserve">
|
||||
<value>电池充电限制</value>
|
||||
@@ -256,7 +256,7 @@
|
||||
<value>切换中...</value>
|
||||
</data>
|
||||
<data name="GPUMode" xml:space="preserve">
|
||||
<value>独显模式</value>
|
||||
<value>显卡模式</value>
|
||||
</data>
|
||||
<data name="GPUModeEco" xml:space="preserve">
|
||||
<value>仅限核显</value>
|
||||
@@ -265,7 +265,7 @@
|
||||
<value>核显 + 独显</value>
|
||||
</data>
|
||||
<data name="GPUModeUltimate" xml:space="preserve">
|
||||
<value>独显优先</value>
|
||||
<value>独显直连</value>
|
||||
</data>
|
||||
<data name="KeyBindings" xml:space="preserve">
|
||||
<value>按键绑定</value>
|
||||
@@ -280,10 +280,10 @@
|
||||
<value>键盘背光</value>
|
||||
</data>
|
||||
<data name="LaptopKeyboard" xml:space="preserve">
|
||||
<value>键盘</value>
|
||||
<value>笔记本键盘</value>
|
||||
</data>
|
||||
<data name="LaptopScreen" xml:space="preserve">
|
||||
<value>屏幕显示</value>
|
||||
<value>笔记本屏幕</value>
|
||||
</data>
|
||||
<data name="MatrixBanner" xml:space="preserve">
|
||||
<value>Anime Matrix 标识</value>
|
||||
@@ -382,7 +382,7 @@
|
||||
<value>切换 Aura 模式</value>
|
||||
</data>
|
||||
<data name="Turbo" xml:space="preserve">
|
||||
<value>增强</value>
|
||||
<value>增强模式</value>
|
||||
</data>
|
||||
<data name="TurnedOff" xml:space="preserve">
|
||||
<value>已关闭</value>
|
||||
@@ -394,7 +394,7 @@
|
||||
<value>开启独显直连获得最佳帧率</value>
|
||||
</data>
|
||||
<data name="UltimateMode" xml:space="preserve">
|
||||
<value>独显输出</value>
|
||||
<value>独显直连</value>
|
||||
</data>
|
||||
<data name="VersionLabel" xml:space="preserve">
|
||||
<value>版本</value>
|
||||
|
||||
BIN
app/Resources/icons8-video-48.png
Normal file
BIN
app/Resources/icons8-video-48.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 635 B |
35
app/Settings.Designer.cs
generated
35
app/Settings.Designer.cs
generated
@@ -68,6 +68,7 @@ namespace GHelper
|
||||
buttonStandard = new RButton();
|
||||
buttonOptimized = new RButton();
|
||||
buttonUltimate = new RButton();
|
||||
buttonXGM = new RButton();
|
||||
panelScreen = new Panel();
|
||||
labelMidFan = new Label();
|
||||
labelTipScreen = new Label();
|
||||
@@ -534,19 +535,21 @@ namespace GHelper
|
||||
panelGPU.Location = new Point(10, 210);
|
||||
panelGPU.Margin = new Padding(8);
|
||||
panelGPU.Name = "panelGPU";
|
||||
panelGPU.Padding = new Padding(0, 0, 0, 10);
|
||||
panelGPU.Padding = new Padding(0, 0, 0, 45);
|
||||
panelGPU.Size = new Size(810, 237);
|
||||
panelGPU.TabIndex = 37;
|
||||
//
|
||||
// labelTipGPU
|
||||
//
|
||||
labelTipGPU.ForeColor = SystemColors.GrayText;
|
||||
labelTipGPU.Location = new Point(24, 191);
|
||||
labelTipGPU.Location = new Point(44, 191);
|
||||
labelTipGPU.Margin = new Padding(4, 0, 4, 0);
|
||||
labelTipGPU.Name = "labelTipGPU";
|
||||
labelTipGPU.Size = new Size(760, 36);
|
||||
labelTipGPU.TabIndex = 20;
|
||||
labelTipGPU.Text = " ";
|
||||
labelTipGPU.Text = "";
|
||||
labelTipGPU.Anchor = AnchorStyles.Right | AnchorStyles.Bottom;
|
||||
|
||||
//
|
||||
// pictureGPU
|
||||
//
|
||||
@@ -593,6 +596,7 @@ namespace GHelper
|
||||
tableGPU.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 25F));
|
||||
tableGPU.Controls.Add(buttonEco, 0, 0);
|
||||
tableGPU.Controls.Add(buttonStandard, 1, 0);
|
||||
tableGPU.Controls.Add(buttonXGM, 2, 0);
|
||||
tableGPU.Controls.Add(buttonOptimized, 2, 0);
|
||||
tableGPU.Controls.Add(buttonUltimate, 2, 0);
|
||||
tableGPU.Location = new Point(16, 60);
|
||||
@@ -691,6 +695,30 @@ namespace GHelper
|
||||
buttonUltimate.Text = Properties.Strings.UltimateMode;
|
||||
buttonUltimate.TextImageRelation = TextImageRelation.ImageAboveText;
|
||||
buttonUltimate.UseVisualStyleBackColor = false;
|
||||
//
|
||||
// buttonXGM
|
||||
//
|
||||
buttonXGM.Activated = false;
|
||||
buttonXGM.BackColor = SystemColors.ControlLightLight;
|
||||
buttonXGM.BorderColor = Color.Transparent;
|
||||
buttonXGM.BorderRadius = 5;
|
||||
buttonXGM.Dock = DockStyle.Top;
|
||||
buttonXGM.FlatAppearance.BorderSize = 0;
|
||||
buttonXGM.FlatStyle = FlatStyle.Flat;
|
||||
buttonXGM.ForeColor = SystemColors.ControlText;
|
||||
buttonXGM.Image = Properties.Resources.icons8_video_48;
|
||||
buttonXGM.ImageAlign = ContentAlignment.BottomCenter;
|
||||
buttonXGM.Location = new Point(390, 4);
|
||||
buttonXGM.Margin = new Padding(4);
|
||||
buttonXGM.Name = "buttonXGM";
|
||||
buttonXGM.Secondary = false;
|
||||
buttonXGM.Size = new Size(185, 120);
|
||||
buttonXGM.TabIndex = 2;
|
||||
buttonXGM.Text = "XG Mobile";
|
||||
buttonXGM.TextImageRelation = TextImageRelation.ImageAboveText;
|
||||
buttonXGM.UseVisualStyleBackColor = false;
|
||||
buttonXGM.Visible = false;
|
||||
|
||||
//
|
||||
// panelScreen
|
||||
//
|
||||
@@ -1078,6 +1106,7 @@ namespace GHelper
|
||||
private Label labelGPU;
|
||||
private Label labelGPUFan;
|
||||
private TableLayoutPanel tableGPU;
|
||||
private RButton buttonXGM;
|
||||
private RButton buttonUltimate;
|
||||
private RButton buttonStandard;
|
||||
private RButton buttonEco;
|
||||
|
||||
@@ -50,6 +50,7 @@ namespace GHelper
|
||||
buttonStandard.BorderColor = colorStandard;
|
||||
buttonUltimate.BorderColor = colorTurbo;
|
||||
buttonOptimized.BorderColor = colorEco;
|
||||
buttonXGM.BorderColor = colorTurbo;
|
||||
|
||||
button60Hz.BorderColor = SystemColors.ActiveBorder;
|
||||
button120Hz.BorderColor = SystemColors.ActiveBorder;
|
||||
@@ -112,6 +113,8 @@ namespace GHelper
|
||||
buttonUltimate.MouseMove += ButtonUltimate_MouseHover;
|
||||
buttonUltimate.MouseLeave += ButtonGPU_MouseLeave;
|
||||
|
||||
buttonXGM.Click += ButtonXGM_Click;
|
||||
|
||||
buttonScreenAuto.MouseMove += ButtonScreenAuto_MouseHover;
|
||||
buttonScreenAuto.MouseLeave += ButtonScreen_MouseLeave;
|
||||
|
||||
@@ -146,6 +149,18 @@ namespace GHelper
|
||||
|
||||
}
|
||||
|
||||
private void ButtonXGM_Click(object? sender, EventArgs e)
|
||||
{
|
||||
if (Program.wmi.DeviceGet(ASUSWmi.GPUXG) == 1)
|
||||
{
|
||||
Program.wmi.DeviceSet(ASUSWmi.GPUXG, 0, "GPU XGM");
|
||||
} else
|
||||
{
|
||||
Program.wmi.DeviceSet(ASUSWmi.GPUXG, 1, "GPU XGM");
|
||||
}
|
||||
InitXGM();
|
||||
}
|
||||
|
||||
private void SliderBattery_ValueChanged(object? sender, EventArgs e)
|
||||
{
|
||||
SetBatteryChargeLimit(sliderBattery.Value);
|
||||
@@ -758,6 +773,10 @@ namespace GHelper
|
||||
if (maxFrequency > 60)
|
||||
{
|
||||
button120Hz.Text = maxFrequency.ToString() + "Hz" + (overdriveSetting ? " + OD" : "");
|
||||
panelScreen.Visible = true;
|
||||
} else if (maxFrequency > 0)
|
||||
{
|
||||
panelScreen.Visible = false;
|
||||
}
|
||||
|
||||
if (miniled >= 0)
|
||||
@@ -852,6 +871,7 @@ namespace GHelper
|
||||
if (this.Visible)
|
||||
{
|
||||
InitScreen();
|
||||
InitXGM();
|
||||
|
||||
this.Left = Screen.FromControl(this).WorkingArea.Width - 10 - this.Width;
|
||||
this.Top = Screen.FromControl(this).WorkingArea.Height - 10 - this.Height;
|
||||
@@ -1161,12 +1181,20 @@ namespace GHelper
|
||||
tableScreen.ColumnCount = 0;
|
||||
|
||||
}
|
||||
|
||||
//tableLayoutMatrix.ColumnCount = 0;
|
||||
}
|
||||
|
||||
public void InitXGM()
|
||||
{
|
||||
int connected = Program.wmi.DeviceGet(ASUSWmi.GPUXGConnected);
|
||||
int enabled = Program.wmi.DeviceGet(ASUSWmi.GPUXG);
|
||||
|
||||
buttonXGM.Visible = (connected == 1);
|
||||
buttonXGM.Activated = (enabled == 1);
|
||||
|
||||
}
|
||||
|
||||
|
||||
public int InitGPUMode()
|
||||
{
|
||||
|
||||
@@ -1198,6 +1226,8 @@ namespace GHelper
|
||||
ButtonEnabled(buttonStandard, true);
|
||||
ButtonEnabled(buttonUltimate, true);
|
||||
|
||||
InitXGM();
|
||||
|
||||
VisualiseGPUMode(GpuMode);
|
||||
|
||||
return GpuMode;
|
||||
@@ -1228,6 +1258,9 @@ namespace GHelper
|
||||
|
||||
Program.wmi.DeviceSet(ASUSWmi.GPUEco, eco, "GPUEco");
|
||||
|
||||
if (eco == 0)
|
||||
HardwareMonitor.RecreateGpuTemperatureProviderWithDelay();
|
||||
|
||||
Program.settingsForm.BeginInvoke(delegate
|
||||
{
|
||||
Thread.Sleep(500);
|
||||
|
||||
@@ -104,6 +104,9 @@ This function is handled by Asus Optimization Service (therefore G-helper doesn'
|
||||
#### How do I set different "Visual styles"?
|
||||
Personally, i'm not a big fan of them, as they make colors very inaccurate. But if you want so - you can adjust display colors using either Nvidia Control panel or AMD Adrenaline (appropriate display sections). If you really want you can also use [own ASUS utility from MS Store](https://apps.microsoft.com/store/detail/gamevisual/9P4K1LFTXSH8?hl=nl-nl&gl=nl&rtc=1)
|
||||
|
||||
#### Can I overclock Nvidia GPU core / memory?
|
||||
I don't own nvidia GPU at the moment, so can't safely add overclocking to the app. But you can use "msi afterburner" to do that and much more with your GPU, as it's much more specialized on this aspect :)
|
||||
|
||||
#### How do I uninstall G-helper?
|
||||
G-helper is a single exe, and it doesn't install anything in the system. To remove it - you can simply delete exe :) If you have applied any custom fan profiles or PPTs - before removing I would recommend selecting your favorite performance mode (for example balanced) and clicking "Factory defaults" under Fans + Power.
|
||||
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
|
||||
## [:floppy_disk: 下载应用](https://github.com/seerge/g-helper/releases/latest/download/GHelper.zip)
|
||||
|
||||
如果你喜欢这个应用,请给这个项目 [:star: 在Github上Star](https://github.com/seerge/g-helper) 或者向别人推荐它!
|
||||
如果你喜欢这个应用,请[给这个项目:star:](https://github.com/seerge/g-helper) 或者向别人推荐它!
|
||||
|
||||
_如果你在别的地方提到这个软件-请记得加上这个项目的网址。十分感谢。_
|
||||
|
||||
|
||||
Reference in New Issue
Block a user