mirror of
https://github.com/jkocon/g-helper.git
synced 2026-02-23 13:00:52 +01:00
Compare commits
17 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
801096299b | ||
|
|
5ed1de0fcf | ||
|
|
0ec0a382e9 | ||
|
|
e810adb358 | ||
|
|
dc6c94fe4a | ||
|
|
8479c129ff | ||
|
|
3173c2e688 | ||
|
|
730ba0a2f9 | ||
|
|
d26a83287d | ||
|
|
47deb669d1 | ||
|
|
a30f5d801b | ||
|
|
75f4b9f2c5 | ||
|
|
2289f36ba5 | ||
|
|
6322e25e78 | ||
|
|
62c0147548 | ||
|
|
9bd2688da2 | ||
|
|
9649814085 |
13
.github/FUNDING.yml
vendored
Normal file
13
.github/FUNDING.yml
vendored
Normal file
@@ -0,0 +1,13 @@
|
||||
# These are supported funding model platforms
|
||||
|
||||
github: # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2]
|
||||
patreon: # Replace with a single Patreon username
|
||||
open_collective: # Replace with a single Open Collective username
|
||||
ko_fi: # Replace with a single Ko-fi username
|
||||
tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
|
||||
community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
|
||||
liberapay: # Replace with a single Liberapay username
|
||||
issuehunt: # Replace with a single IssueHunt username
|
||||
otechie: # Replace with a single Otechie username
|
||||
lfx_crowdfunding: # Replace with a single LFX Crowdfunding project-name e.g., cloud-foundry
|
||||
custom: https://www.paypal.com/donate/?hosted_button_id=4HMSHS4EBQWTA
|
||||
@@ -14,6 +14,11 @@ public class ASUSWmi
|
||||
public const int KB_Light_Up = 0xc4;
|
||||
public const int KB_Light_Down = 0xc5;
|
||||
|
||||
public const int ChargerMode = 0x0012006C;
|
||||
|
||||
public const int ChargerUSB = 2;
|
||||
public const int ChargerBarrel = 1;
|
||||
|
||||
public const uint CPU_Fan = 0x00110013;
|
||||
public const uint GPU_Fan = 0x00110014;
|
||||
public const uint Mid_Fan = 0x00110031;
|
||||
@@ -316,4 +321,5 @@ public class ASUSWmi
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -6,6 +6,9 @@ using System.Drawing.Drawing2D;
|
||||
using System.Text;
|
||||
using System.Globalization;
|
||||
using System;
|
||||
using System.Drawing;
|
||||
using OSD;
|
||||
using System.Diagnostics;
|
||||
|
||||
namespace Starlight.AnimeMatrix
|
||||
{
|
||||
@@ -107,9 +110,6 @@ namespace Starlight.AnimeMatrix
|
||||
MaxColumns = 33;
|
||||
dx = 1;
|
||||
|
||||
//FullRows = 7;
|
||||
//FullEvenRows = 3;
|
||||
|
||||
MaxRows = 55;
|
||||
LedCount = 1245;
|
||||
|
||||
@@ -177,17 +177,8 @@ namespace Starlight.AnimeMatrix
|
||||
{
|
||||
return (y + 1) / 2 - 3;
|
||||
}
|
||||
case AnimeType.GA402:
|
||||
if (y < 11)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
return (y) / 2 - 5;
|
||||
}
|
||||
default:
|
||||
throw new ArgumentException("Invalid anime type", nameof(_model));
|
||||
return (int)Math.Ceiling(Math.Max(0, y - 11) / 2F);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -197,10 +188,8 @@ namespace Starlight.AnimeMatrix
|
||||
{
|
||||
case AnimeType.GA401:
|
||||
return 33;
|
||||
case AnimeType.GA402:
|
||||
return 34;
|
||||
default:
|
||||
throw new ArgumentException("Invalid anime type", nameof(_model));
|
||||
return 34;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -221,36 +210,15 @@ namespace Starlight.AnimeMatrix
|
||||
default:
|
||||
return 36 - y / 2;
|
||||
}
|
||||
case AnimeType.GA402:
|
||||
return Width(y) - FirstX(y);
|
||||
default:
|
||||
throw new ArgumentException("Invalid anime type", nameof(_model));
|
||||
return Width(y) - FirstX(y);
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
public int XStart(int row)
|
||||
{
|
||||
return (int)Math.Ceiling(Math.Max(0, row - FullRows) / 2.0);
|
||||
}
|
||||
|
||||
public int XEnd(int row)
|
||||
{
|
||||
if (row <= FullEvenRows)
|
||||
{
|
||||
if (row % 2 == 1) return MaxColumns + 2;
|
||||
else return MaxColumns;
|
||||
}
|
||||
return MaxColumns;
|
||||
}
|
||||
*/
|
||||
|
||||
public int RowToLinearAddress(int y)
|
||||
{
|
||||
EnsureRowInRange(y);
|
||||
|
||||
int ret = 0;
|
||||
|
||||
for (var i = 0; i < y; i++)
|
||||
ret += Pitch(i);
|
||||
|
||||
@@ -259,13 +227,10 @@ namespace Starlight.AnimeMatrix
|
||||
|
||||
public void SetLedPlanar(int x, int y, byte value)
|
||||
{
|
||||
EnsureRowInRange(y);
|
||||
if (!IsRowInRange(y)) return;
|
||||
|
||||
if (x >= FirstX(y) && x < Width(y))
|
||||
{
|
||||
SetLedLinear(RowToLinearAddress(y) - FirstX(y) + x + dx, value);
|
||||
//Debug.Write((RowToLinearAddress(y) - FirstX(y) + x + dx).ToString() + " ");
|
||||
}
|
||||
}
|
||||
|
||||
public void WakeUp()
|
||||
@@ -366,9 +331,9 @@ namespace Starlight.AnimeMatrix
|
||||
int second = DateTime.Now.Second;
|
||||
|
||||
if (CultureInfo.CurrentCulture.DateTimeFormat.ShortTimePattern.Contains("H"))
|
||||
PresentText(DateTime.Now.ToString("H" + ((second % 2 == 0)?":":" ") + "mm"));
|
||||
PresentTextDiagonal(DateTime.Now.ToString("H" + ((second % 2 == 0)?":":" ") + "mm"));
|
||||
else
|
||||
PresentText(DateTime.Now.ToString("h" + ((second % 2 == 0) ? ":" : " ") + "mm"), DateTime.Now.ToString("tt"));
|
||||
PresentTextDiagonal(DateTime.Now.ToString("h" + ((second % 2 == 0) ? ":" : " ") + "mmtt"));
|
||||
}
|
||||
|
||||
public void PresentText(string text1, string text2 = "")
|
||||
@@ -442,12 +407,55 @@ namespace Starlight.AnimeMatrix
|
||||
}
|
||||
}
|
||||
|
||||
private void EnsureRowInRange(int row)
|
||||
|
||||
public void SetLedDiagonal(int x, int y, byte color, int delta = 10)
|
||||
{
|
||||
if (row < 0 || row >= MaxRows)
|
||||
//x+=delta;
|
||||
y-=delta;
|
||||
|
||||
int dx = (x - y)/2;
|
||||
int dy = x + y;
|
||||
SetLedPlanar(dx, dy, color);
|
||||
}
|
||||
|
||||
public void PresentTextDiagonal(string text)
|
||||
{
|
||||
|
||||
Clear();
|
||||
|
||||
int maxX = (int)Math.Sqrt(MaxRows * MaxRows + MaxColumns * MaxColumns);
|
||||
|
||||
using (Bitmap bmp = new Bitmap(maxX, MaxRows))
|
||||
{
|
||||
throw new IndexOutOfRangeException($"Y-coordinate should fall in range of [0, {MaxRows - 1}].");
|
||||
using (Graphics g = Graphics.FromImage(bmp))
|
||||
{
|
||||
g.CompositingQuality = CompositingQuality.HighQuality;
|
||||
g.SmoothingMode = SmoothingMode.AntiAlias;
|
||||
|
||||
using (Font font = new Font("Calibri", 16F, GraphicsUnit.Pixel))
|
||||
{
|
||||
SizeF textSize = g.MeasureString(text, font);
|
||||
g.DrawString(text, font, Brushes.White, 4, 0);
|
||||
}
|
||||
}
|
||||
|
||||
for (int y = 0; y < bmp.Height; y++)
|
||||
{
|
||||
for (int x = 0; x < bmp.Width; x++)
|
||||
{
|
||||
var pixel = bmp.GetPixel(x, y);
|
||||
var color = (pixel.R + pixel.G + pixel.B) / 3;
|
||||
SetLedDiagonal(x, y, (byte)color);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Present();
|
||||
}
|
||||
|
||||
private bool IsRowInRange(int row)
|
||||
{
|
||||
return (row >= 0 && row < MaxRows);
|
||||
}
|
||||
|
||||
private bool IsAddressableLed(int address)
|
||||
|
||||
@@ -223,6 +223,10 @@ namespace GHelper
|
||||
flags.Add(AuraDev19b6.SleepLid);
|
||||
flags.Add(AuraDev19b6.ShutdownLid);
|
||||
|
||||
flags.Add(AuraDev19b6.AwakeLogo);
|
||||
flags.Add(AuraDev19b6.BootLogo);
|
||||
flags.Add(AuraDev19b6.SleepLogo);
|
||||
flags.Add(AuraDev19b6.ShutdownLogo);
|
||||
|
||||
byte[] msg = AuraDev19b6Extensions.ToBytes(flags.ToArray());
|
||||
|
||||
|
||||
112
app/Keyboard.Designer.cs → app/Extra.Designer.cs
generated
112
app/Keyboard.Designer.cs → app/Extra.Designer.cs
generated
@@ -1,8 +1,9 @@
|
||||
using CustomControls;
|
||||
using GHelper.Properties;
|
||||
|
||||
namespace GHelper
|
||||
{
|
||||
partial class Keyboard
|
||||
partial class Extra
|
||||
{
|
||||
/// <summary>
|
||||
/// Required designer variable.
|
||||
@@ -30,7 +31,7 @@ namespace GHelper
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
groupBox1 = new GroupBox();
|
||||
groupBindings = new GroupBox();
|
||||
pictureHelp = new PictureBox();
|
||||
textFNF4 = new TextBox();
|
||||
comboFNF4 = new RComboBox();
|
||||
@@ -51,39 +52,40 @@ namespace GHelper
|
||||
checkBoot = new CheckBox();
|
||||
checkAwake = new CheckBox();
|
||||
groupOther = new GroupBox();
|
||||
checkUSBC = new CheckBox();
|
||||
checkNoOverdrive = new CheckBox();
|
||||
checkKeyboardAuto = new CheckBox();
|
||||
checkTopmost = new CheckBox();
|
||||
groupBox1.SuspendLayout();
|
||||
groupBindings.SuspendLayout();
|
||||
((System.ComponentModel.ISupportInitialize)pictureHelp).BeginInit();
|
||||
groupLight.SuspendLayout();
|
||||
((System.ComponentModel.ISupportInitialize)trackBrightness).BeginInit();
|
||||
groupOther.SuspendLayout();
|
||||
SuspendLayout();
|
||||
//
|
||||
// groupBox1
|
||||
// groupBindings
|
||||
//
|
||||
groupBox1.Controls.Add(pictureHelp);
|
||||
groupBox1.Controls.Add(textFNF4);
|
||||
groupBox1.Controls.Add(comboFNF4);
|
||||
groupBox1.Controls.Add(labelFNF4);
|
||||
groupBox1.Controls.Add(textM4);
|
||||
groupBox1.Controls.Add(textM3);
|
||||
groupBox1.Controls.Add(comboM4);
|
||||
groupBox1.Controls.Add(labelM4);
|
||||
groupBox1.Controls.Add(comboM3);
|
||||
groupBox1.Controls.Add(labelM3);
|
||||
groupBox1.Dock = DockStyle.Top;
|
||||
groupBox1.Location = new Point(10, 10);
|
||||
groupBox1.Name = "groupBox1";
|
||||
groupBox1.Size = new Size(840, 242);
|
||||
groupBox1.TabIndex = 0;
|
||||
groupBox1.TabStop = false;
|
||||
groupBox1.Text = Properties.Strings.KeyBindings;
|
||||
groupBindings.Controls.Add(pictureHelp);
|
||||
groupBindings.Controls.Add(textFNF4);
|
||||
groupBindings.Controls.Add(comboFNF4);
|
||||
groupBindings.Controls.Add(labelFNF4);
|
||||
groupBindings.Controls.Add(textM4);
|
||||
groupBindings.Controls.Add(textM3);
|
||||
groupBindings.Controls.Add(comboM4);
|
||||
groupBindings.Controls.Add(labelM4);
|
||||
groupBindings.Controls.Add(comboM3);
|
||||
groupBindings.Controls.Add(labelM3);
|
||||
groupBindings.Dock = DockStyle.Top;
|
||||
groupBindings.Location = new Point(10, 10);
|
||||
groupBindings.Name = "groupBindings";
|
||||
groupBindings.Size = new Size(844, 242);
|
||||
groupBindings.TabIndex = 0;
|
||||
groupBindings.TabStop = false;
|
||||
groupBindings.Text = "Key Bindings";
|
||||
//
|
||||
// pictureHelp
|
||||
//
|
||||
pictureHelp.BackgroundImage = Properties.Resources.icons8_help_64;
|
||||
pictureHelp.BackgroundImage = Resources.icons8_help_64;
|
||||
pictureHelp.BackgroundImageLayout = ImageLayout.Zoom;
|
||||
pictureHelp.Cursor = Cursors.Hand;
|
||||
pictureHelp.Location = new Point(744, 57);
|
||||
@@ -140,7 +142,7 @@ namespace GHelper
|
||||
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.Items.AddRange(new object[] { Strings.PerformanceMode, Strings.OpenGHelper, Strings.Custom });
|
||||
comboM4.Location = new Point(93, 112);
|
||||
comboM4.Name = "comboM4";
|
||||
comboM4.Size = new Size(312, 40);
|
||||
@@ -160,7 +162,7 @@ namespace GHelper
|
||||
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.Items.AddRange(new object[] { Strings.Default, Strings.VolumeMute, Strings.PlayPause, Strings.PrintScreen, Strings.ToggleAura, Strings.Custom });
|
||||
comboM3.Location = new Point(93, 54);
|
||||
comboM3.Name = "comboM3";
|
||||
comboM3.Size = new Size(312, 40);
|
||||
@@ -188,14 +190,14 @@ namespace GHelper
|
||||
groupLight.Dock = DockStyle.Top;
|
||||
groupLight.Location = new Point(10, 252);
|
||||
groupLight.Name = "groupLight";
|
||||
groupLight.Size = new Size(840, 374);
|
||||
groupLight.Size = new Size(844, 395);
|
||||
groupLight.TabIndex = 1;
|
||||
groupLight.TabStop = false;
|
||||
groupLight.Text = Properties.Strings.KeyboardBacklight;
|
||||
groupLight.Text = "Keyboard Backlight";
|
||||
//
|
||||
// labelBrightness
|
||||
//
|
||||
labelBrightness.Location = new Point(25, 284);
|
||||
labelBrightness.Location = new Point(25, 304);
|
||||
labelBrightness.Name = "labelBrightness";
|
||||
labelBrightness.Size = new Size(197, 49);
|
||||
labelBrightness.TabIndex = 0;
|
||||
@@ -203,10 +205,12 @@ namespace GHelper
|
||||
//
|
||||
// trackBrightness
|
||||
//
|
||||
trackBrightness.Location = new Point(228, 284);
|
||||
trackBrightness.Location = new Point(228, 294);
|
||||
trackBrightness.Maximum = 3;
|
||||
trackBrightness.Name = "trackBrightness";
|
||||
trackBrightness.Size = new Size(612, 90);
|
||||
trackBrightness.Size = new Size(600, 90);
|
||||
trackBrightness.TabIndex = 1;
|
||||
trackBrightness.TickStyle = TickStyle.TopLeft;
|
||||
//
|
||||
// labelSpeed
|
||||
//
|
||||
@@ -216,7 +220,7 @@ namespace GHelper
|
||||
labelSpeed.Name = "labelSpeed";
|
||||
labelSpeed.Size = new Size(198, 32);
|
||||
labelSpeed.TabIndex = 40;
|
||||
labelSpeed.Text = Properties.Strings.AnimationSpeed;
|
||||
labelSpeed.Text = "Animation Speed";
|
||||
//
|
||||
// comboKeyboardSpeed
|
||||
//
|
||||
@@ -241,7 +245,7 @@ namespace GHelper
|
||||
checkShutdown.Name = "checkShutdown";
|
||||
checkShutdown.Size = new Size(154, 36);
|
||||
checkShutdown.TabIndex = 3;
|
||||
checkShutdown.Text = Properties.Strings.Shutdown;
|
||||
checkShutdown.Text = Strings.Shutdown;
|
||||
checkShutdown.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// checkSleep
|
||||
@@ -251,7 +255,7 @@ namespace GHelper
|
||||
checkSleep.Name = "checkSleep";
|
||||
checkSleep.Size = new Size(105, 36);
|
||||
checkSleep.TabIndex = 2;
|
||||
checkSleep.Text = Properties.Strings.Sleep;
|
||||
checkSleep.Text = Strings.Sleep;
|
||||
checkSleep.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// checkBoot
|
||||
@@ -261,7 +265,7 @@ namespace GHelper
|
||||
checkBoot.Name = "checkBoot";
|
||||
checkBoot.Size = new Size(96, 36);
|
||||
checkBoot.TabIndex = 1;
|
||||
checkBoot.Text = Properties.Strings.Boot;
|
||||
checkBoot.Text = Strings.Boot;
|
||||
checkBoot.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// checkAwake
|
||||
@@ -271,21 +275,32 @@ namespace GHelper
|
||||
checkAwake.Name = "checkAwake";
|
||||
checkAwake.Size = new Size(115, 36);
|
||||
checkAwake.TabIndex = 0;
|
||||
checkAwake.Text = Properties.Strings.Awake;
|
||||
checkAwake.Text = Strings.Awake;
|
||||
checkAwake.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// groupOther
|
||||
//
|
||||
groupOther.Controls.Add(checkUSBC);
|
||||
groupOther.Controls.Add(checkNoOverdrive);
|
||||
groupOther.Controls.Add(checkKeyboardAuto);
|
||||
groupOther.Controls.Add(checkTopmost);
|
||||
groupOther.Dock = DockStyle.Top;
|
||||
groupOther.Location = new Point(10, 626);
|
||||
groupOther.Location = new Point(10, 647);
|
||||
groupOther.Name = "groupOther";
|
||||
groupOther.Size = new Size(840, 225);
|
||||
groupOther.Size = new Size(844, 293);
|
||||
groupOther.TabIndex = 2;
|
||||
groupOther.TabStop = false;
|
||||
groupOther.Text = Properties.Strings.Other;
|
||||
groupOther.Text = "Other";
|
||||
//
|
||||
// checkUSBC
|
||||
//
|
||||
checkUSBC.AutoSize = true;
|
||||
checkUSBC.Location = new Point(25, 210);
|
||||
checkUSBC.Name = "checkUSBC";
|
||||
checkUSBC.Size = new Size(659, 36);
|
||||
checkUSBC.TabIndex = 4;
|
||||
checkUSBC.Text = "Keep GPU disabled on USB-C charger in Optimized mode";
|
||||
checkUSBC.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// checkNoOverdrive
|
||||
//
|
||||
@@ -294,7 +309,7 @@ namespace GHelper
|
||||
checkNoOverdrive.Name = "checkNoOverdrive";
|
||||
checkNoOverdrive.Size = new Size(307, 36);
|
||||
checkNoOverdrive.TabIndex = 3;
|
||||
checkNoOverdrive.Text = Properties.Strings.DisableOverdrive;
|
||||
checkNoOverdrive.Text = Strings.DisableOverdrive;
|
||||
checkNoOverdrive.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// checkKeyboardAuto
|
||||
@@ -305,7 +320,7 @@ namespace GHelper
|
||||
checkKeyboardAuto.Name = "checkKeyboardAuto";
|
||||
checkKeyboardAuto.Size = new Size(712, 36);
|
||||
checkKeyboardAuto.TabIndex = 2;
|
||||
checkKeyboardAuto.Text = Properties.Strings.KeyboardAuto;
|
||||
checkKeyboardAuto.Text = Strings.KeyboardAuto;
|
||||
checkKeyboardAuto.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// checkTopmost
|
||||
@@ -315,28 +330,28 @@ namespace GHelper
|
||||
checkTopmost.Name = "checkTopmost";
|
||||
checkTopmost.Size = new Size(390, 36);
|
||||
checkTopmost.TabIndex = 1;
|
||||
checkTopmost.Text = Properties.Strings.WindowTop;
|
||||
checkTopmost.Text = Strings.WindowTop;
|
||||
checkTopmost.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// Keyboard
|
||||
// Extra
|
||||
//
|
||||
AutoScaleDimensions = new SizeF(13F, 32F);
|
||||
AutoScaleMode = AutoScaleMode.Font;
|
||||
ClientSize = new Size(860, 890);
|
||||
ClientSize = new Size(864, 953);
|
||||
Controls.Add(groupOther);
|
||||
Controls.Add(groupLight);
|
||||
Controls.Add(groupBox1);
|
||||
Controls.Add(groupBindings);
|
||||
FormBorderStyle = FormBorderStyle.FixedSingle;
|
||||
MaximizeBox = false;
|
||||
MdiChildrenMinimizedAnchorBottom = false;
|
||||
MinimizeBox = false;
|
||||
Name = "Keyboard";
|
||||
Name = "Extra";
|
||||
Padding = new Padding(10);
|
||||
ShowIcon = false;
|
||||
ShowInTaskbar = false;
|
||||
Text = Properties.Strings.ExtraSettings;
|
||||
groupBox1.ResumeLayout(false);
|
||||
groupBox1.PerformLayout();
|
||||
Text = "Extra Settings";
|
||||
groupBindings.ResumeLayout(false);
|
||||
groupBindings.PerformLayout();
|
||||
((System.ComponentModel.ISupportInitialize)pictureHelp).EndInit();
|
||||
groupLight.ResumeLayout(false);
|
||||
groupLight.PerformLayout();
|
||||
@@ -348,7 +363,7 @@ namespace GHelper
|
||||
|
||||
#endregion
|
||||
|
||||
private GroupBox groupBox1;
|
||||
private GroupBox groupBindings;
|
||||
private Label labelM3;
|
||||
private RComboBox comboM3;
|
||||
private RComboBox comboM4;
|
||||
@@ -372,5 +387,6 @@ namespace GHelper
|
||||
private PictureBox pictureHelp;
|
||||
private TrackBar trackBrightness;
|
||||
private Label labelBrightness;
|
||||
private CheckBox checkUSBC;
|
||||
}
|
||||
}
|
||||
@@ -3,7 +3,7 @@ using System.Diagnostics;
|
||||
|
||||
namespace GHelper
|
||||
{
|
||||
public partial class Keyboard : RForm
|
||||
public partial class Extra : RForm
|
||||
{
|
||||
|
||||
Dictionary<string, string> customActions = new Dictionary<string, string>
|
||||
@@ -14,6 +14,8 @@ namespace GHelper
|
||||
{"play", Properties.Strings.PlayPause},
|
||||
{"aura", Properties.Strings.ToggleAura},
|
||||
{"ghelper", Properties.Strings.OpenGHelper},
|
||||
{"screen", Properties.Strings.ToggleScreen},
|
||||
{"miniled", Properties.Strings.ToggleMiniled},
|
||||
{"custom", Properties.Strings.Custom}
|
||||
};
|
||||
|
||||
@@ -51,9 +53,29 @@ namespace GHelper
|
||||
};
|
||||
}
|
||||
|
||||
public Keyboard()
|
||||
public Extra()
|
||||
{
|
||||
InitializeComponent();
|
||||
|
||||
groupBindings.Text = Properties.Strings.KeyBindings;
|
||||
groupLight.Text = Properties.Strings.KeyboardBacklight;
|
||||
groupOther.Text = Properties.Strings.Other;
|
||||
|
||||
checkAwake.Text = Properties.Strings.Awake;
|
||||
checkSleep.Text = Properties.Strings.Sleep;
|
||||
checkBoot.Text = Properties.Strings.Boot;
|
||||
checkShutdown.Text = Properties.Strings.Shutdown;
|
||||
|
||||
labelSpeed.Text = Properties.Strings.AnimationSpeed;
|
||||
labelBrightness.Text = Properties.Strings.Brightness;
|
||||
|
||||
checkKeyboardAuto.Text = Properties.Strings.KeyboardAuto;
|
||||
checkNoOverdrive.Text = Properties.Strings.DisableOverdrive;
|
||||
checkTopmost.Text = Properties.Strings.WindowTop;
|
||||
checkUSBC.Text = Properties.Strings.OptimizedUSBC;
|
||||
|
||||
Text = Properties.Strings.ExtraSettings;
|
||||
|
||||
InitTheme();
|
||||
|
||||
SetKeyCombo(comboM3, textM3, "m3");
|
||||
@@ -88,6 +110,9 @@ namespace GHelper
|
||||
checkNoOverdrive.Checked = (Program.config.getConfig("no_overdrive") == 1);
|
||||
checkNoOverdrive.CheckedChanged += CheckNoOverdrive_CheckedChanged;
|
||||
|
||||
checkUSBC.Checked = (Program.config.getConfig("optimized_usbc") == 1);
|
||||
checkUSBC.CheckedChanged += CheckUSBC_CheckedChanged;
|
||||
|
||||
int kb_brightness = Program.config.getConfig("keyboard_brightness");
|
||||
trackBrightness.Value = (kb_brightness >= 0 && kb_brightness <= 3) ? kb_brightness : 3;
|
||||
|
||||
@@ -96,6 +121,11 @@ namespace GHelper
|
||||
|
||||
}
|
||||
|
||||
private void CheckUSBC_CheckedChanged(object? sender, EventArgs e)
|
||||
{
|
||||
Program.config.setConfig("optimized_usbc", (checkUSBC.Checked ? 1 : 0));
|
||||
}
|
||||
|
||||
private void TrackBrightness_Scroll(object? sender, EventArgs e)
|
||||
{
|
||||
Program.config.setConfig("keyboard_brightness", trackBrightness.Value);
|
||||
218
app/Fans.Designer.cs
generated
218
app/Fans.Designer.cs
generated
@@ -38,6 +38,7 @@ namespace GHelper
|
||||
ChartArea chartArea3 = new ChartArea();
|
||||
Title title3 = new Title();
|
||||
panelFans = new Panel();
|
||||
labelFansResult = new Label();
|
||||
labelTip = new Label();
|
||||
labelBoost = new Label();
|
||||
comboBoost = new RComboBox();
|
||||
@@ -63,7 +64,16 @@ namespace GHelper
|
||||
trackTotal = new TrackBar();
|
||||
pictureFine = new PictureBox();
|
||||
labelInfo = new Label();
|
||||
labelFansResult = new Label();
|
||||
panelGPU = new Panel();
|
||||
buttonResetGPU = new RButton();
|
||||
labelGPUMemory = new Label();
|
||||
trackGPUMemory = new TrackBar();
|
||||
labelGPUMemoryTitle = new Label();
|
||||
pictureBox2 = new PictureBox();
|
||||
labelGPUCore = new Label();
|
||||
labelGPU = new Label();
|
||||
trackGPUCore = new TrackBar();
|
||||
labelGPUCoreTitle = new Label();
|
||||
panelFans.SuspendLayout();
|
||||
((System.ComponentModel.ISupportInitialize)picturePerf).BeginInit();
|
||||
tableFanCharts.SuspendLayout();
|
||||
@@ -77,6 +87,10 @@ namespace GHelper
|
||||
panelTotal.SuspendLayout();
|
||||
((System.ComponentModel.ISupportInitialize)trackTotal).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)pictureFine).BeginInit();
|
||||
panelGPU.SuspendLayout();
|
||||
((System.ComponentModel.ISupportInitialize)trackGPUMemory).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)pictureBox2).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)trackGPUCore).BeginInit();
|
||||
SuspendLayout();
|
||||
//
|
||||
// panelFans
|
||||
@@ -91,13 +105,24 @@ namespace GHelper
|
||||
panelFans.Controls.Add(checkApplyFans);
|
||||
panelFans.Controls.Add(buttonReset);
|
||||
panelFans.Dock = DockStyle.Left;
|
||||
panelFans.Location = new Point(364, 0);
|
||||
panelFans.Location = new Point(711, 0);
|
||||
panelFans.Margin = new Padding(0);
|
||||
panelFans.Name = "panelFans";
|
||||
panelFans.Padding = new Padding(20);
|
||||
panelFans.Size = new Size(824, 1159);
|
||||
panelFans.Padding = new Padding(10);
|
||||
panelFans.Size = new Size(824, 1189);
|
||||
panelFans.TabIndex = 12;
|
||||
//
|
||||
// labelFansResult
|
||||
//
|
||||
labelFansResult.Anchor = AnchorStyles.Top | AnchorStyles.Right;
|
||||
labelFansResult.ForeColor = Color.Red;
|
||||
labelFansResult.Location = new Point(30, 1073);
|
||||
labelFansResult.Name = "labelFansResult";
|
||||
labelFansResult.Size = new Size(760, 32);
|
||||
labelFansResult.TabIndex = 41;
|
||||
labelFansResult.TextAlign = ContentAlignment.TopRight;
|
||||
labelFansResult.Visible = false;
|
||||
//
|
||||
// labelTip
|
||||
//
|
||||
labelTip.AutoSize = true;
|
||||
@@ -154,13 +179,13 @@ namespace GHelper
|
||||
tableFanCharts.Controls.Add(chartCPU, 0, 0);
|
||||
tableFanCharts.Controls.Add(chartMid, 0, 2);
|
||||
tableFanCharts.Location = new Point(28, 64);
|
||||
tableFanCharts.Margin = new Padding(6);
|
||||
tableFanCharts.Margin = new Padding(4);
|
||||
tableFanCharts.Name = "tableFanCharts";
|
||||
tableFanCharts.RowCount = 2;
|
||||
tableFanCharts.RowStyles.Add(new RowStyle(SizeType.Percent, 33F));
|
||||
tableFanCharts.RowStyles.Add(new RowStyle(SizeType.Percent, 33F));
|
||||
tableFanCharts.RowStyles.Add(new RowStyle(SizeType.Percent, 33F));
|
||||
tableFanCharts.Size = new Size(764, 992);
|
||||
tableFanCharts.Size = new Size(764, 1022);
|
||||
tableFanCharts.TabIndex = 36;
|
||||
//
|
||||
// chartGPU
|
||||
@@ -168,10 +193,10 @@ namespace GHelper
|
||||
chartArea1.Name = "ChartArea1";
|
||||
chartGPU.ChartAreas.Add(chartArea1);
|
||||
chartGPU.Dock = DockStyle.Fill;
|
||||
chartGPU.Location = new Point(2, 340);
|
||||
chartGPU.Location = new Point(2, 350);
|
||||
chartGPU.Margin = new Padding(2, 10, 2, 10);
|
||||
chartGPU.Name = "chartGPU";
|
||||
chartGPU.Size = new Size(760, 310);
|
||||
chartGPU.Size = new Size(760, 320);
|
||||
chartGPU.TabIndex = 17;
|
||||
chartGPU.Text = "chartGPU";
|
||||
title1.Name = "Title1";
|
||||
@@ -185,7 +210,7 @@ namespace GHelper
|
||||
chartCPU.Location = new Point(2, 10);
|
||||
chartCPU.Margin = new Padding(2, 10, 2, 10);
|
||||
chartCPU.Name = "chartCPU";
|
||||
chartCPU.Size = new Size(760, 310);
|
||||
chartCPU.Size = new Size(760, 320);
|
||||
chartCPU.TabIndex = 14;
|
||||
chartCPU.Text = "chartCPU";
|
||||
title2.Name = "Title1";
|
||||
@@ -196,10 +221,10 @@ namespace GHelper
|
||||
chartArea3.Name = "ChartArea3";
|
||||
chartMid.ChartAreas.Add(chartArea3);
|
||||
chartMid.Dock = DockStyle.Fill;
|
||||
chartMid.Location = new Point(2, 670);
|
||||
chartMid.Location = new Point(2, 690);
|
||||
chartMid.Margin = new Padding(2, 10, 2, 10);
|
||||
chartMid.Name = "chartMid";
|
||||
chartMid.Size = new Size(760, 312);
|
||||
chartMid.Size = new Size(760, 322);
|
||||
chartMid.TabIndex = 14;
|
||||
chartMid.Text = "chartMid";
|
||||
title3.Name = "Title3";
|
||||
@@ -222,7 +247,7 @@ namespace GHelper
|
||||
checkApplyFans.Anchor = AnchorStyles.Bottom | AnchorStyles.Right;
|
||||
checkApplyFans.AutoSize = true;
|
||||
checkApplyFans.BackColor = SystemColors.ControlLight;
|
||||
checkApplyFans.Location = new Point(449, 1088);
|
||||
checkApplyFans.Location = new Point(449, 1118);
|
||||
checkApplyFans.Margin = new Padding(4, 2, 4, 2);
|
||||
checkApplyFans.Name = "checkApplyFans";
|
||||
checkApplyFans.Padding = new Padding(15, 5, 15, 5);
|
||||
@@ -239,7 +264,7 @@ namespace GHelper
|
||||
buttonReset.BorderColor = Color.Transparent;
|
||||
buttonReset.BorderRadius = 2;
|
||||
buttonReset.FlatStyle = FlatStyle.Flat;
|
||||
buttonReset.Location = new Point(30, 1082);
|
||||
buttonReset.Location = new Point(30, 1112);
|
||||
buttonReset.Margin = new Padding(4, 2, 4, 2);
|
||||
buttonReset.Name = "buttonReset";
|
||||
buttonReset.Secondary = true;
|
||||
@@ -258,11 +283,11 @@ namespace GHelper
|
||||
panelPower.Controls.Add(pictureFine);
|
||||
panelPower.Controls.Add(labelInfo);
|
||||
panelPower.Dock = DockStyle.Left;
|
||||
panelPower.Location = new Point(0, 0);
|
||||
panelPower.Location = new Point(347, 0);
|
||||
panelPower.Margin = new Padding(10);
|
||||
panelPower.Name = "panelPower";
|
||||
panelPower.Padding = new Padding(10);
|
||||
panelPower.Size = new Size(364, 1159);
|
||||
panelPower.Size = new Size(364, 1189);
|
||||
panelPower.TabIndex = 13;
|
||||
//
|
||||
// pictureBox1
|
||||
@@ -293,7 +318,7 @@ namespace GHelper
|
||||
checkApplyPower.Anchor = AnchorStyles.Bottom | AnchorStyles.Left;
|
||||
checkApplyPower.AutoSize = true;
|
||||
checkApplyPower.BackColor = SystemColors.ControlLight;
|
||||
checkApplyPower.Location = new Point(20, 1088);
|
||||
checkApplyPower.Location = new Point(20, 1118);
|
||||
checkApplyPower.Margin = new Padding(4, 2, 4, 2);
|
||||
checkApplyPower.Name = "checkApplyPower";
|
||||
checkApplyPower.Padding = new Padding(15, 5, 15, 5);
|
||||
@@ -418,23 +443,147 @@ namespace GHelper
|
||||
labelInfo.TabIndex = 19;
|
||||
labelInfo.Text = "label";
|
||||
//
|
||||
// labelFansResult
|
||||
// panelGPU
|
||||
//
|
||||
labelFansResult.Anchor = AnchorStyles.Top | AnchorStyles.Right;
|
||||
labelFansResult.ForeColor = Color.Red;
|
||||
labelFansResult.Location = new Point(30, 1070);
|
||||
labelFansResult.Name = "labelFansResult";
|
||||
labelFansResult.Size = new Size(760, 32);
|
||||
labelFansResult.TabIndex = 41;
|
||||
labelFansResult.TextAlign = ContentAlignment.TopRight;
|
||||
panelGPU.Controls.Add(buttonResetGPU);
|
||||
panelGPU.Controls.Add(labelGPUMemory);
|
||||
panelGPU.Controls.Add(trackGPUMemory);
|
||||
panelGPU.Controls.Add(labelGPUMemoryTitle);
|
||||
panelGPU.Controls.Add(pictureBox2);
|
||||
panelGPU.Controls.Add(labelGPUCore);
|
||||
panelGPU.Controls.Add(labelGPU);
|
||||
panelGPU.Controls.Add(trackGPUCore);
|
||||
panelGPU.Controls.Add(labelGPUCoreTitle);
|
||||
panelGPU.Dock = DockStyle.Left;
|
||||
panelGPU.Location = new Point(0, 0);
|
||||
panelGPU.Name = "panelGPU";
|
||||
panelGPU.Size = new Size(347, 1189);
|
||||
panelGPU.TabIndex = 14;
|
||||
//
|
||||
// Fans
|
||||
// buttonResetGPU
|
||||
//
|
||||
AutoScaleDimensions = new SizeF(192F, 192F);
|
||||
buttonResetGPU.Activated = false;
|
||||
buttonResetGPU.Anchor = AnchorStyles.Bottom | AnchorStyles.Left;
|
||||
buttonResetGPU.BackColor = SystemColors.ControlLight;
|
||||
buttonResetGPU.BorderColor = Color.Transparent;
|
||||
buttonResetGPU.BorderRadius = 2;
|
||||
buttonResetGPU.FlatStyle = FlatStyle.Flat;
|
||||
buttonResetGPU.Location = new Point(48, 1110);
|
||||
buttonResetGPU.Margin = new Padding(4, 2, 4, 2);
|
||||
buttonResetGPU.Name = "buttonResetGPU";
|
||||
buttonResetGPU.Secondary = true;
|
||||
buttonResetGPU.Size = new Size(232, 54);
|
||||
buttonResetGPU.TabIndex = 43;
|
||||
buttonResetGPU.Text = "Reset Clocks";
|
||||
buttonResetGPU.UseVisualStyleBackColor = false;
|
||||
//
|
||||
// labelGPUMemory
|
||||
//
|
||||
labelGPUMemory.AutoSize = true;
|
||||
labelGPUMemory.Font = new Font("Segoe UI", 9F, FontStyle.Bold, GraphicsUnit.Point);
|
||||
labelGPUMemory.Location = new Point(184, 112);
|
||||
labelGPUMemory.Name = "labelGPUMemory";
|
||||
labelGPUMemory.Size = new Size(130, 32);
|
||||
labelGPUMemory.TabIndex = 42;
|
||||
labelGPUMemory.Text = "2000 MHz";
|
||||
labelGPUMemory.TextAlign = ContentAlignment.MiddleCenter;
|
||||
//
|
||||
// trackGPUMemory
|
||||
//
|
||||
trackGPUMemory.LargeChange = 100;
|
||||
trackGPUMemory.Location = new Point(216, 160);
|
||||
trackGPUMemory.Margin = new Padding(4, 2, 4, 2);
|
||||
trackGPUMemory.Maximum = 300;
|
||||
trackGPUMemory.Minimum = 0;
|
||||
trackGPUMemory.Name = "trackGPUMemory";
|
||||
trackGPUMemory.Orientation = Orientation.Vertical;
|
||||
trackGPUMemory.Size = new Size(90, 454);
|
||||
trackGPUMemory.SmallChange = 10;
|
||||
trackGPUMemory.TabIndex = 41;
|
||||
trackGPUMemory.TickFrequency = 50;
|
||||
trackGPUMemory.Value = 0;
|
||||
//
|
||||
// labelGPUMemoryTitle
|
||||
//
|
||||
labelGPUMemoryTitle.AutoSize = true;
|
||||
labelGPUMemoryTitle.Location = new Point(167, 72);
|
||||
labelGPUMemoryTitle.Name = "labelGPUMemoryTitle";
|
||||
labelGPUMemoryTitle.Size = new Size(169, 32);
|
||||
labelGPUMemoryTitle.TabIndex = 40;
|
||||
labelGPUMemoryTitle.Text = "Memory Clock";
|
||||
labelGPUMemoryTitle.TextAlign = ContentAlignment.MiddleCenter;
|
||||
//
|
||||
// pictureBox2
|
||||
//
|
||||
pictureBox2.BackgroundImage = Properties.Resources.icons8_video_card_48;
|
||||
pictureBox2.BackgroundImageLayout = ImageLayout.Zoom;
|
||||
pictureBox2.ErrorImage = null;
|
||||
pictureBox2.InitialImage = null;
|
||||
pictureBox2.Location = new Point(25, 17);
|
||||
pictureBox2.Margin = new Padding(4, 2, 4, 2);
|
||||
pictureBox2.Name = "pictureBox2";
|
||||
pictureBox2.Size = new Size(36, 38);
|
||||
pictureBox2.TabIndex = 39;
|
||||
pictureBox2.TabStop = false;
|
||||
//
|
||||
// labelGPUCore
|
||||
//
|
||||
labelGPUCore.AutoSize = true;
|
||||
labelGPUCore.Font = new Font("Segoe UI", 9F, FontStyle.Bold, GraphicsUnit.Point);
|
||||
labelGPUCore.Location = new Point(20, 112);
|
||||
labelGPUCore.Name = "labelGPUCore";
|
||||
labelGPUCore.Size = new Size(130, 32);
|
||||
labelGPUCore.TabIndex = 28;
|
||||
labelGPUCore.Text = "1500 MHz";
|
||||
labelGPUCore.TextAlign = ContentAlignment.MiddleCenter;
|
||||
//
|
||||
// labelGPU
|
||||
//
|
||||
labelGPU.AutoSize = true;
|
||||
labelGPU.Font = new Font("Segoe UI", 9F, FontStyle.Bold, GraphicsUnit.Point);
|
||||
labelGPU.Location = new Point(60, 19);
|
||||
labelGPU.Margin = new Padding(4, 0, 4, 0);
|
||||
labelGPU.Name = "labelGPU";
|
||||
labelGPU.Size = new Size(162, 32);
|
||||
labelGPU.TabIndex = 27;
|
||||
labelGPU.Text = "GPU Settings";
|
||||
//
|
||||
// trackGPUCore
|
||||
//
|
||||
trackGPUCore.LargeChange = 100;
|
||||
trackGPUCore.Location = new Point(48, 160);
|
||||
trackGPUCore.Margin = new Padding(4, 2, 4, 2);
|
||||
trackGPUCore.Maximum = 300;
|
||||
trackGPUCore.Minimum = 0;
|
||||
trackGPUCore.Name = "trackGPUCore";
|
||||
trackGPUCore.Orientation = Orientation.Vertical;
|
||||
trackGPUCore.RightToLeft = RightToLeft.No;
|
||||
trackGPUCore.Size = new Size(90, 454);
|
||||
trackGPUCore.SmallChange = 10;
|
||||
trackGPUCore.TabIndex = 17;
|
||||
trackGPUCore.TickFrequency = 50;
|
||||
trackGPUCore.TickStyle = TickStyle.TopLeft;
|
||||
trackGPUCore.Value = 0;
|
||||
//
|
||||
// labelGPUCoreTitle
|
||||
//
|
||||
labelGPUCoreTitle.AutoSize = true;
|
||||
labelGPUCoreTitle.Location = new Point(22, 72);
|
||||
labelGPUCoreTitle.Name = "labelGPUCoreTitle";
|
||||
labelGPUCoreTitle.Size = new Size(129, 32);
|
||||
labelGPUCoreTitle.TabIndex = 16;
|
||||
labelFansResult.Visible = false;
|
||||
labelGPUCoreTitle.TextAlign = ContentAlignment.MiddleCenter;
|
||||
labelGPUCoreTitle.Text = "Core Clock";
|
||||
//
|
||||
// Fans
|
||||
//
|
||||
AutoScaleDimensions = new SizeF(192F, 192F);
|
||||
AutoScaleMode = AutoScaleMode.Dpi;
|
||||
AutoSize = true;
|
||||
AutoSizeMode = AutoSizeMode.GrowAndShrink;
|
||||
ClientSize = new Size(1178, 1159);
|
||||
ClientSize = new Size(1542, 1189);
|
||||
Controls.Add(panelGPU);
|
||||
Controls.Add(panelFans);
|
||||
Controls.Add(panelPower);
|
||||
Margin = new Padding(4, 2, 4, 2);
|
||||
@@ -464,6 +613,11 @@ namespace GHelper
|
||||
panelTotal.PerformLayout();
|
||||
((System.ComponentModel.ISupportInitialize)trackTotal).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)pictureFine).EndInit();
|
||||
panelGPU.ResumeLayout(false);
|
||||
panelGPU.PerformLayout();
|
||||
((System.ComponentModel.ISupportInitialize)trackGPUMemory).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)pictureBox2).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)trackGPUCore).EndInit();
|
||||
ResumeLayout(false);
|
||||
}
|
||||
|
||||
@@ -495,5 +649,15 @@ namespace GHelper
|
||||
private Label labelBoost;
|
||||
private Label labelTip;
|
||||
private Label labelFansResult;
|
||||
private Panel panelGPU;
|
||||
private Label labelGPUCore;
|
||||
private Label labelGPU;
|
||||
private TrackBar trackGPUCore;
|
||||
private Label labelGPUCoreTitle;
|
||||
private PictureBox pictureBox2;
|
||||
private Label labelGPUMemory;
|
||||
private TrackBar trackGPUMemory;
|
||||
private Label labelGPUMemoryTitle;
|
||||
private RButton buttonResetGPU;
|
||||
}
|
||||
}
|
||||
67
app/Fans.cs
67
app/Fans.cs
@@ -1,6 +1,7 @@
|
||||
using System.Diagnostics;
|
||||
using System.Windows.Forms.DataVisualization.Charting;
|
||||
using CustomControls;
|
||||
using GHelper.Gpu;
|
||||
|
||||
namespace GHelper
|
||||
{
|
||||
@@ -63,6 +64,11 @@ namespace GHelper
|
||||
checkApplyFans.Click += CheckApplyFans_Click;
|
||||
checkApplyPower.Click += CheckApplyPower_Click;
|
||||
|
||||
trackGPUCore.Scroll += trackGPU_Scroll;
|
||||
trackGPUMemory.Scroll += trackGPU_Scroll;
|
||||
|
||||
buttonResetGPU.Click += ButtonResetGPU_Click;
|
||||
|
||||
//labelInfo.MaximumSize = new Size(280, 0);
|
||||
labelInfo.Text = Properties.Strings.PPTExperimental;
|
||||
|
||||
@@ -74,6 +80,65 @@ namespace GHelper
|
||||
|
||||
Shown += Fans_Shown;
|
||||
|
||||
InitGPUClocks();
|
||||
|
||||
}
|
||||
|
||||
private void InitGPUClocks()
|
||||
{
|
||||
try
|
||||
{
|
||||
using (var _gpuControl = new NvidiaGpuControl())
|
||||
{
|
||||
panelGPU.Visible = _gpuControl.IsValid;
|
||||
|
||||
trackGPUCore.Value = Math.Min(Program.config.getConfig("GPUCore"), 300);
|
||||
trackGPUMemory.Value = Math.Min(Program.config.getConfig("GPUMemory"), 300);
|
||||
VisualiseGPUClocks();
|
||||
}
|
||||
} catch (Exception ex)
|
||||
{
|
||||
panelGPU.Visible=false;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private void ButtonResetGPU_Click(object? sender, EventArgs e)
|
||||
{
|
||||
|
||||
Program.RunAsAdmin();
|
||||
|
||||
try
|
||||
{
|
||||
trackGPUCore.Value = 0;
|
||||
trackGPUMemory.Value = 0;
|
||||
VisualiseGPUClocks();
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Logger.WriteLine(ex.ToString());
|
||||
}
|
||||
}
|
||||
|
||||
private void VisualiseGPUClocks()
|
||||
{
|
||||
labelGPUCore.Text = $"+{trackGPUCore.Value} MHz";
|
||||
labelGPUMemory.Text = $"+{trackGPUMemory.Value} MHz";
|
||||
}
|
||||
|
||||
private void trackGPU_Scroll(object? sender, EventArgs e)
|
||||
{
|
||||
VisualiseGPUClocks();
|
||||
|
||||
try
|
||||
{
|
||||
Program.config.setConfig("GPUCore", trackGPUCore.Value);
|
||||
Program.config.setConfig("GPUMemory", trackGPUMemory.Value);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Logger.WriteLine(ex.ToString());
|
||||
}
|
||||
}
|
||||
|
||||
static string ChartPercToRPM(int percentage, string unit = "")
|
||||
@@ -206,6 +271,7 @@ namespace GHelper
|
||||
public void LabelFansResult(string text)
|
||||
{
|
||||
labelFansResult.Text = text;
|
||||
labelFansResult.Visible = (text.Length == 0);
|
||||
}
|
||||
|
||||
private void Fans_FormClosing(object? sender, FormClosingEventArgs e)
|
||||
@@ -531,6 +597,7 @@ namespace GHelper
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -13,26 +13,26 @@
|
||||
<Platforms>AnyCPU;x64</Platforms>
|
||||
<SupportedOSPlatformVersion>8.0</SupportedOSPlatformVersion>
|
||||
<AssemblyName>GHelper</AssemblyName>
|
||||
<PlatformTarget>x64</PlatformTarget>
|
||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||
<ProduceReferenceAssembly>False</ProduceReferenceAssembly>
|
||||
<AllowUnsafeBlocks>True</AllowUnsafeBlocks>
|
||||
<AssemblyVersion>0.55</AssemblyVersion>
|
||||
<AssemblyVersion>0.56</AssemblyVersion>
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
|
||||
<DebugType>none</DebugType>
|
||||
<DebugType>embedded</DebugType>
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'">
|
||||
<DebugType>none</DebugType>
|
||||
<DebugType>embedded</DebugType>
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<DebugType>none</DebugType>
|
||||
<DebugType>embedded</DebugType>
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<DebugType>none</DebugType>
|
||||
<DebugType>embedded</DebugType>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
||||
@@ -20,8 +20,8 @@ Global
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{D6138BB1-8FDB-4835-87EF-2FE41A3DD604}.Debug|Any CPU.ActiveCfg = Debug|x64
|
||||
{D6138BB1-8FDB-4835-87EF-2FE41A3DD604}.Debug|Any CPU.Build.0 = Debug|x64
|
||||
{D6138BB1-8FDB-4835-87EF-2FE41A3DD604}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{D6138BB1-8FDB-4835-87EF-2FE41A3DD604}.Debug|x64.Build.0 = Debug|x64
|
||||
{D6138BB1-8FDB-4835-87EF-2FE41A3DD604}.Debug|x64.ActiveCfg = Debug|Any CPU
|
||||
{D6138BB1-8FDB-4835-87EF-2FE41A3DD604}.Debug|x64.Build.0 = Debug|Any CPU
|
||||
{D6138BB1-8FDB-4835-87EF-2FE41A3DD604}.Release|Any CPU.ActiveCfg = Release|x64
|
||||
{D6138BB1-8FDB-4835-87EF-2FE41A3DD604}.Release|Any CPU.Build.0 = Release|x64
|
||||
{D6138BB1-8FDB-4835-87EF-2FE41A3DD604}.Release|x64.ActiveCfg = Release|x64
|
||||
|
||||
@@ -4,12 +4,15 @@ using AmdAdl2;
|
||||
namespace GHelper.Gpu;
|
||||
|
||||
// Reference: https://github.com/GPUOpen-LibrariesAndSDKs/display-library/blob/master/Sample-Managed/Program.cs
|
||||
public class AmdGpuTemperatureProvider : IGpuTemperatureProvider {
|
||||
public class AmdGpuControl : IGpuControl {
|
||||
private bool _isReady;
|
||||
private IntPtr _adlContextHandle;
|
||||
private readonly ADLAdapterInfo _internalDiscreteAdapter;
|
||||
|
||||
public AmdGpuTemperatureProvider() {
|
||||
public bool IsNvidia => false;
|
||||
|
||||
|
||||
public AmdGpuControl() {
|
||||
if (!Adl2.Load())
|
||||
return;
|
||||
|
||||
@@ -104,7 +107,7 @@ public class AmdGpuTemperatureProvider : IGpuTemperatureProvider {
|
||||
GC.SuppressFinalize(this);
|
||||
}
|
||||
|
||||
~AmdGpuTemperatureProvider() {
|
||||
~AmdGpuControl() {
|
||||
ReleaseUnmanagedResources();
|
||||
}
|
||||
}
|
||||
@@ -1,6 +1,7 @@
|
||||
namespace GHelper.Gpu;
|
||||
|
||||
public interface IGpuTemperatureProvider : IDisposable {
|
||||
public interface IGpuControl : IDisposable {
|
||||
bool IsNvidia { get; }
|
||||
bool IsValid { get; }
|
||||
int? GetCurrentTemperature();
|
||||
int? GetGpuUse();
|
||||
@@ -5,17 +5,19 @@ using NvAPIWrapper.Native.Interfaces.GPU;
|
||||
|
||||
namespace GHelper.Gpu;
|
||||
|
||||
public class NvidiaGpuTemperatureProvider : IGpuTemperatureProvider
|
||||
public class NvidiaGpuControl : IGpuControl
|
||||
{
|
||||
private readonly PhysicalGPU? _internalGpu;
|
||||
|
||||
public NvidiaGpuTemperatureProvider()
|
||||
public NvidiaGpuControl()
|
||||
{
|
||||
_internalGpu = GetInternalDiscreteGpu();
|
||||
}
|
||||
|
||||
public bool IsValid => _internalGpu != null;
|
||||
|
||||
public bool IsNvidia => IsValid;
|
||||
|
||||
public int? GetCurrentTemperature()
|
||||
{
|
||||
if (!IsValid)
|
||||
@@ -54,14 +56,9 @@ public class NvidiaGpuTemperatureProvider : IGpuTemperatureProvider
|
||||
return null;
|
||||
|
||||
PhysicalGPU internalGpu = _internalGpu!;
|
||||
|
||||
IUtilizationDomainInfo? gpuUsage = GPUApi.GetUsages(internalGpu.Handle).GPU;
|
||||
|
||||
if (gpuUsage == null)
|
||||
return null;
|
||||
|
||||
return
|
||||
(int)gpuUsage?.Percentage;
|
||||
return (int?)gpuUsage?.Percentage;
|
||||
|
||||
}
|
||||
|
||||
@@ -1,11 +1,10 @@
|
||||
using GHelper;
|
||||
using GHelper.Gpu;
|
||||
using System.Diagnostics;
|
||||
using System.Management;
|
||||
|
||||
public static class HardwareMonitor
|
||||
{
|
||||
private static IGpuTemperatureProvider? GpuTemperatureProvider;
|
||||
public static IGpuControl? GpuControl;
|
||||
|
||||
public static float? cpuTemp = -1;
|
||||
public static float? batteryDischarge = -1;
|
||||
@@ -51,7 +50,7 @@ public static class HardwareMonitor
|
||||
{
|
||||
try
|
||||
{
|
||||
int? gpuUse = GpuTemperatureProvider?.GetGpuUse();
|
||||
int? gpuUse = GpuControl?.GetGpuUse();
|
||||
if (gpuUse is not null) return (int)gpuUse;
|
||||
}
|
||||
catch (Exception ex)
|
||||
@@ -76,20 +75,20 @@ public static class HardwareMonitor
|
||||
cpuTemp = Program.wmi.DeviceGet(ASUSWmi.Temp_CPU);
|
||||
|
||||
if (cpuTemp < 0) try
|
||||
{
|
||||
using (var ct = new PerformanceCounter("Thermal Zone Information", "Temperature", @"\_TZ.THRM", true))
|
||||
{
|
||||
cpuTemp = ct.NextValue() - 273;
|
||||
using (var ct = new PerformanceCounter("Thermal Zone Information", "Temperature", @"\_TZ.THRM", true))
|
||||
{
|
||||
cpuTemp = ct.NextValue() - 273;
|
||||
}
|
||||
}
|
||||
catch
|
||||
{
|
||||
Debug.WriteLine("Failed reading CPU temp");
|
||||
}
|
||||
}
|
||||
catch
|
||||
{
|
||||
Debug.WriteLine("Failed reading CPU temp");
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
gpuTemp = GpuTemperatureProvider?.GetCurrentTemperature();
|
||||
gpuTemp = GpuControl?.GetCurrentTemperature();
|
||||
|
||||
}
|
||||
catch (Exception ex)
|
||||
@@ -121,51 +120,51 @@ public static class HardwareMonitor
|
||||
{
|
||||
Thread.Sleep(1000);
|
||||
return (GetGpuUse() > threshold);
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public static void RecreateGpuTemperatureProviderWithDelay()
|
||||
public static void RecreateGpuControlWithDelay(int delay = 5)
|
||||
{
|
||||
|
||||
// Re-enabling the discrete GPU takes a bit of time,
|
||||
// so a simple workaround is to refresh again after that happens
|
||||
Task.Run(async () =>
|
||||
{
|
||||
await Task.Delay(TimeSpan.FromSeconds(5));
|
||||
RecreateGpuTemperatureProvider();
|
||||
await Task.Delay(TimeSpan.FromSeconds(delay));
|
||||
RecreateGpuControl();
|
||||
});
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
public static void RecreateGpuTemperatureProvider()
|
||||
public static void RecreateGpuControl()
|
||||
{
|
||||
try
|
||||
{
|
||||
GpuTemperatureProvider?.Dispose();
|
||||
GpuControl?.Dispose();
|
||||
|
||||
// Detect valid GPU temperature provider.
|
||||
// We start with NVIDIA because there's always at least an integrated AMD GPU
|
||||
IGpuTemperatureProvider gpuTemperatureProvider = new NvidiaGpuTemperatureProvider();
|
||||
if (gpuTemperatureProvider.IsValid)
|
||||
IGpuControl _gpuControl = new NvidiaGpuControl();
|
||||
if (_gpuControl.IsValid)
|
||||
{
|
||||
GpuTemperatureProvider = gpuTemperatureProvider;
|
||||
GpuControl = _gpuControl;
|
||||
return;
|
||||
}
|
||||
|
||||
gpuTemperatureProvider.Dispose();
|
||||
gpuTemperatureProvider = new AmdGpuTemperatureProvider();
|
||||
if (gpuTemperatureProvider.IsValid)
|
||||
_gpuControl.Dispose();
|
||||
_gpuControl = new AmdGpuControl();
|
||||
if (_gpuControl.IsValid)
|
||||
{
|
||||
GpuTemperatureProvider = gpuTemperatureProvider;
|
||||
GpuControl = _gpuControl;
|
||||
return;
|
||||
}
|
||||
|
||||
gpuTemperatureProvider.Dispose();
|
||||
_gpuControl.Dispose();
|
||||
|
||||
GpuTemperatureProvider = null;
|
||||
GpuControl = null;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
|
||||
@@ -351,6 +351,33 @@ namespace Tools
|
||||
public class NativeMethods
|
||||
{
|
||||
|
||||
private const int WM_SYSCOMMAND = 0x0112;
|
||||
private const int SC_MONITORPOWER = 0xF170;
|
||||
private const int MONITOR_OFF = 2;
|
||||
|
||||
[DllImport("user32.dll", CharSet = CharSet.Auto, SetLastError = true)]
|
||||
private static extern IntPtr SendMessage(IntPtr hWnd, uint Msg, IntPtr wParam, IntPtr lParam);
|
||||
|
||||
[DllImport("kernel32.dll", CharSet = CharSet.Auto, SetLastError = true)]
|
||||
private static extern uint FormatMessage(uint dwFlags, IntPtr lpSource, uint dwMessageId, uint dwLanguageId, out string lpBuffer, uint nSize, IntPtr Arguments);
|
||||
|
||||
public static void TurnOffScreen(IntPtr handle)
|
||||
{
|
||||
IntPtr result = SendMessage(handle, WM_SYSCOMMAND, (IntPtr)SC_MONITORPOWER, (IntPtr)MONITOR_OFF);
|
||||
if (result == IntPtr.Zero)
|
||||
{
|
||||
int error = Marshal.GetLastWin32Error();
|
||||
string message = "";
|
||||
uint formatFlags = 0x00001000 | 0x00000200 | 0x00000100 | 0x00000080;
|
||||
uint formatResult = FormatMessage(formatFlags, IntPtr.Zero, (uint)error, 0, out message, 0, IntPtr.Zero);
|
||||
if (formatResult == 0)
|
||||
{
|
||||
message = "Unknown error.";
|
||||
}
|
||||
Logger.WriteLine($"Failed to turn off screen. Error code: {error}. {message}");
|
||||
}
|
||||
}
|
||||
|
||||
// Monitor Power detection
|
||||
|
||||
internal const uint DEVICE_NOTIFY_WINDOW_HANDLE = 0x0;
|
||||
|
||||
@@ -2,6 +2,8 @@ using Microsoft.Win32;
|
||||
using System.Diagnostics;
|
||||
using System.Globalization;
|
||||
using System.Management;
|
||||
using System.Reflection;
|
||||
using System.Security.Principal;
|
||||
using Tools;
|
||||
|
||||
namespace GHelper
|
||||
@@ -27,23 +29,62 @@ namespace GHelper
|
||||
private static long lastTheme;
|
||||
private static PowerLineStatus isPlugged = PowerLineStatus.Unknown;
|
||||
|
||||
|
||||
static void CheckProcesses()
|
||||
{
|
||||
Process currentProcess = Process.GetCurrentProcess();
|
||||
Process[] processes = Process.GetProcessesByName(currentProcess.ProcessName);
|
||||
|
||||
if (processes.Length > 1)
|
||||
{
|
||||
foreach (Process process in processes)
|
||||
if (process.Id != currentProcess.Id)
|
||||
try
|
||||
{
|
||||
process.Kill();
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Logger.WriteLine(ex.ToString());
|
||||
MessageBox.Show(Properties.Strings.AppAlreadyRunningText, Properties.Strings.AppAlreadyRunning, MessageBoxButtons.OK);
|
||||
Application.Exit();
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static bool IsUserAdministrator()
|
||||
{
|
||||
WindowsIdentity identity = WindowsIdentity.GetCurrent();
|
||||
WindowsPrincipal principal = new WindowsPrincipal(identity);
|
||||
return principal.IsInRole(WindowsBuiltInRole.Administrator);
|
||||
}
|
||||
|
||||
public static void RunAsAdmin()
|
||||
{
|
||||
// Check if the current user is an administrator
|
||||
if (!IsUserAdministrator())
|
||||
{
|
||||
ProcessStartInfo startInfo = new ProcessStartInfo();
|
||||
startInfo.UseShellExecute = true;
|
||||
startInfo.WorkingDirectory = Environment.CurrentDirectory;
|
||||
startInfo.FileName = Application.ExecutablePath;
|
||||
startInfo.Verb = "runas";
|
||||
Process.Start(startInfo);
|
||||
//Application.Exit();
|
||||
}
|
||||
}
|
||||
|
||||
// The main entry point for the application
|
||||
public static void Main()
|
||||
{
|
||||
|
||||
Thread.CurrentThread.CurrentUICulture = CultureInfo.CurrentUICulture;
|
||||
|
||||
Debug.WriteLine(CultureInfo.CurrentUICulture);
|
||||
|
||||
//Thread.CurrentThread.CurrentUICulture = CultureInfo.CreateSpecificCulture("zh");
|
||||
|
||||
if (Process.GetProcesses().Count(p => p.ProcessName == "GHelper") > 1)
|
||||
{
|
||||
MessageBox.Show(Properties.Strings.AppAlreadyRunningText, Properties.Strings.AppAlreadyRunning, MessageBoxButtons.OK);
|
||||
Application.Exit();
|
||||
return;
|
||||
}
|
||||
//Thread.CurrentThread.CurrentUICulture = CultureInfo.CreateSpecificCulture("es");
|
||||
|
||||
CheckProcesses();
|
||||
|
||||
try
|
||||
{
|
||||
@@ -62,10 +103,8 @@ namespace GHelper
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
Logger.WriteLine("------------");
|
||||
Logger.WriteLine("App launched: " + config.GetModel());
|
||||
Logger.WriteLine("App launched: " + config.GetModel() + " :" + Assembly.GetExecutingAssembly().GetName().Version.ToString());
|
||||
|
||||
Application.EnableVisualStyles();
|
||||
|
||||
@@ -82,7 +121,7 @@ namespace GHelper
|
||||
|
||||
SetAutoModes();
|
||||
|
||||
HardwareMonitor.RecreateGpuTemperatureProvider();
|
||||
HardwareMonitor.RecreateGpuControl();
|
||||
|
||||
// Subscribing for system power change events
|
||||
SystemEvents.PowerModeChanged += SystemEvents_PowerModeChanged;
|
||||
@@ -101,8 +140,6 @@ namespace GHelper
|
||||
SettingsToggle();
|
||||
}
|
||||
|
||||
|
||||
|
||||
Application.Run();
|
||||
|
||||
|
||||
@@ -136,10 +173,10 @@ namespace GHelper
|
||||
|
||||
|
||||
|
||||
public static void SetAutoModes()
|
||||
public static void SetAutoModes(bool monitor = true)
|
||||
{
|
||||
|
||||
if (Math.Abs(DateTimeOffset.Now.ToUnixTimeMilliseconds() - lastAuto) < 2000) return;
|
||||
if (Math.Abs(DateTimeOffset.Now.ToUnixTimeMilliseconds() - lastAuto) < 3000) return;
|
||||
lastAuto = DateTimeOffset.Now.ToUnixTimeMilliseconds();
|
||||
|
||||
isPlugged = SystemInformation.PowerStatus.PowerLineStatus;
|
||||
@@ -148,7 +185,8 @@ namespace GHelper
|
||||
settingsForm.SetBatteryChargeLimit(config.getConfig("charge_limit"));
|
||||
settingsForm.AutoPerformance();
|
||||
|
||||
bool switched = settingsForm.AutoGPUMode();
|
||||
bool switched = false;
|
||||
if (monitor) switched = settingsForm.AutoGPUMode();
|
||||
|
||||
if (!switched)
|
||||
{
|
||||
@@ -169,19 +207,18 @@ namespace GHelper
|
||||
}
|
||||
|
||||
|
||||
static void LaunchProcess(string fileName = "")
|
||||
static void LaunchProcess(string command = "")
|
||||
{
|
||||
ProcessStartInfo start = new ProcessStartInfo();
|
||||
start.FileName = fileName;
|
||||
start.WindowStyle = ProcessWindowStyle.Hidden;
|
||||
start.CreateNoWindow = true;
|
||||
string executable = command.Split(' ')[0];
|
||||
string arguments = command.Substring(executable.Length).Trim();
|
||||
|
||||
try
|
||||
{
|
||||
Process proc = Process.Start(start);
|
||||
Process proc = Process.Start(executable, arguments);
|
||||
}
|
||||
catch
|
||||
{
|
||||
Logger.WriteLine("Failed to run " + fileName);
|
||||
Logger.WriteLine("Failed to run " + command);
|
||||
}
|
||||
|
||||
|
||||
@@ -232,6 +269,12 @@ namespace GHelper
|
||||
case "screenshot":
|
||||
NativeMethods.KeyPress(NativeMethods.VK_SNAPSHOT);
|
||||
break;
|
||||
case "screen":
|
||||
NativeMethods.TurnOffScreen(Program.settingsForm.Handle);
|
||||
break;
|
||||
case "miniled":
|
||||
settingsForm.BeginInvoke(settingsForm.ToogleMiniled);
|
||||
break;
|
||||
case "aura":
|
||||
settingsForm.BeginInvoke(settingsForm.CycleAuraMode);
|
||||
break;
|
||||
|
||||
36
app/Properties/Strings.Designer.cs
generated
36
app/Properties/Strings.Designer.cs
generated
@@ -294,6 +294,15 @@ namespace GHelper.Properties {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Brightness.
|
||||
/// </summary>
|
||||
internal static string Brightness {
|
||||
get {
|
||||
return ResourceManager.GetString("Brightness", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Color.
|
||||
/// </summary>
|
||||
@@ -690,6 +699,15 @@ namespace GHelper.Properties {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Keep GPU disabled on USB-C charger in Optimized mode.
|
||||
/// </summary>
|
||||
internal static string OptimizedUSBC {
|
||||
get {
|
||||
return ResourceManager.GetString("OptimizedUSBC", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Other.
|
||||
/// </summary>
|
||||
@@ -852,6 +870,24 @@ namespace GHelper.Properties {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Toggle Miniled (if supported).
|
||||
/// </summary>
|
||||
internal static string ToggleMiniled {
|
||||
get {
|
||||
return ResourceManager.GetString("ToggleMiniled", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Toggle Screen.
|
||||
/// </summary>
|
||||
internal static string ToggleScreen {
|
||||
get {
|
||||
return ResourceManager.GetString("ToggleScreen", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Turbo.
|
||||
/// </summary>
|
||||
|
||||
@@ -136,7 +136,7 @@
|
||||
<value>¿Reiniciar ahora?</value>
|
||||
</data>
|
||||
<data name="AnimationSpeed" xml:space="preserve">
|
||||
<value>Velocidad de animación</value>
|
||||
<value>Velocidad</value>
|
||||
</data>
|
||||
<data name="AnimeMatrix" xml:space="preserve">
|
||||
<value>Anime Matrix</value>
|
||||
@@ -195,6 +195,9 @@
|
||||
<data name="Boot" xml:space="preserve">
|
||||
<value>Al arrancar</value>
|
||||
</data>
|
||||
<data name="Brightness" xml:space="preserve">
|
||||
<value>Brillo</value>
|
||||
</data>
|
||||
<data name="Color" xml:space="preserve">
|
||||
<value>Color</value>
|
||||
</data>
|
||||
|
||||
@@ -1,5 +1,64 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
@@ -136,6 +195,9 @@
|
||||
<data name="Boot" xml:space="preserve">
|
||||
<value>Boot</value>
|
||||
</data>
|
||||
<data name="Brightness" xml:space="preserve">
|
||||
<value>Brightness</value>
|
||||
</data>
|
||||
<data name="Color" xml:space="preserve">
|
||||
<value>Color</value>
|
||||
</data>
|
||||
@@ -268,6 +330,9 @@
|
||||
<data name="OptimizedGPUTooltip" xml:space="preserve">
|
||||
<value>Switch to Eco on battery and to Standard when plugged</value>
|
||||
</data>
|
||||
<data name="OptimizedUSBC" xml:space="preserve">
|
||||
<value>Keep GPU disabled on USB-C charger in Optimized mode</value>
|
||||
</data>
|
||||
<data name="Other" xml:space="preserve">
|
||||
<value>Other</value>
|
||||
</data>
|
||||
@@ -322,6 +387,12 @@
|
||||
<data name="ToggleAura" xml:space="preserve">
|
||||
<value>Toggle Aura</value>
|
||||
</data>
|
||||
<data name="ToggleMiniled" xml:space="preserve">
|
||||
<value>Toggle Miniled (if supported)</value>
|
||||
</data>
|
||||
<data name="ToggleScreen" xml:space="preserve">
|
||||
<value>Toggle Screen</value>
|
||||
</data>
|
||||
<data name="Turbo" xml:space="preserve">
|
||||
<value>Turbo</value>
|
||||
</data>
|
||||
|
||||
@@ -195,6 +195,9 @@
|
||||
<data name="Boot" xml:space="preserve">
|
||||
<value>Önyükleme</value>
|
||||
</data>
|
||||
<data name="Brightness" xml:space="preserve">
|
||||
<value>Parlaklığı</value>
|
||||
</data>
|
||||
<data name="Color" xml:space="preserve">
|
||||
<value>Renk</value>
|
||||
</data>
|
||||
|
||||
@@ -195,6 +195,9 @@
|
||||
<data name="Boot" xml:space="preserve">
|
||||
<value>Старт</value>
|
||||
</data>
|
||||
<data name="Brightness" xml:space="preserve">
|
||||
<value>Яскравість</value>
|
||||
</data>
|
||||
<data name="Color" xml:space="preserve">
|
||||
<value>Колір</value>
|
||||
</data>
|
||||
|
||||
@@ -195,6 +195,9 @@
|
||||
<data name="Boot" xml:space="preserve">
|
||||
<value>开机时</value>
|
||||
</data>
|
||||
<data name="Brightness" xml:space="preserve">
|
||||
<value>亮度</value>
|
||||
</data>
|
||||
<data name="Color" xml:space="preserve">
|
||||
<value>颜色</value>
|
||||
</data>
|
||||
@@ -325,7 +328,7 @@
|
||||
<value>自动切换</value>
|
||||
</data>
|
||||
<data name="OptimizedGPUTooltip" xml:space="preserve">
|
||||
<value>使用电池时关闭独显(集显模式),并在插上电源后重新启用独显(混合输出)</value>
|
||||
<value>使用电池时切换到集显模式,并在插上电源后重新启用标准模式</value>
|
||||
</data>
|
||||
<data name="Other" xml:space="preserve">
|
||||
<value>其他</value>
|
||||
@@ -405,4 +408,4 @@
|
||||
<data name="WindowTop" xml:space="preserve">
|
||||
<value>窗口置顶</value>
|
||||
</data>
|
||||
</root>
|
||||
</root>
|
||||
@@ -195,6 +195,9 @@
|
||||
<data name="Boot" xml:space="preserve">
|
||||
<value>開機時</value>
|
||||
</data>
|
||||
<data name="Brightness" xml:space="preserve">
|
||||
<value>亮度</value>
|
||||
</data>
|
||||
<data name="Color" xml:space="preserve">
|
||||
<value>顏色</value>
|
||||
</data>
|
||||
@@ -364,7 +367,7 @@
|
||||
<value>關機時</value>
|
||||
</data>
|
||||
<data name="Silent" xml:space="preserve">
|
||||
<value>安静模式</value>
|
||||
<value>安靜模式</value>
|
||||
</data>
|
||||
<data name="Sleep" xml:space="preserve">
|
||||
<value>睡眠時</value>
|
||||
@@ -405,4 +408,4 @@
|
||||
<data name="WindowTop" xml:space="preserve">
|
||||
<value>視窗置頂</value>
|
||||
</data>
|
||||
</root>
|
||||
</root>
|
||||
@@ -25,7 +25,7 @@ namespace GHelper
|
||||
public string perfName = "Balanced";
|
||||
|
||||
public Fans fans;
|
||||
public Keyboard keyb;
|
||||
public Extra keyb;
|
||||
|
||||
static AnimeMatrixDevice mat;
|
||||
static long lastRefresh;
|
||||
@@ -186,10 +186,7 @@ namespace GHelper
|
||||
|
||||
if (gitVersion.CompareTo(appVersion) > 0)
|
||||
{
|
||||
BeginInvoke(delegate
|
||||
{
|
||||
SetVersionLabel(Properties.Strings.DownloadUpdate + ": " + tag, url);
|
||||
});
|
||||
SetVersionLabel(Properties.Strings.DownloadUpdate + ": " + tag, url);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -294,7 +291,7 @@ namespace GHelper
|
||||
break;
|
||||
case 1:
|
||||
Logger.WriteLine("Monitor Power On");
|
||||
Program.SetAutoModes();
|
||||
Program.SetAutoModes(false);
|
||||
break;
|
||||
case 2:
|
||||
Logger.WriteLine("Monitor Dimmed");
|
||||
@@ -417,11 +414,13 @@ namespace GHelper
|
||||
}
|
||||
|
||||
StartMatrixTimer();
|
||||
Logger.WriteLine("Matrix GIF " + fileName);
|
||||
}
|
||||
else
|
||||
{
|
||||
mat.GenerateFrame(image);
|
||||
mat.Present();
|
||||
Logger.WriteLine("Matrix " + fileName);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -499,6 +498,7 @@ namespace GHelper
|
||||
if (brightness == 0 || (auto && SystemInformation.PowerStatus.PowerLineStatus != PowerLineStatus.Online))
|
||||
{
|
||||
mat.SetDisplayState(false);
|
||||
Logger.WriteLine("Matrix Off");
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -513,9 +513,11 @@ namespace GHelper
|
||||
case 3:
|
||||
mat.SetBuiltInAnimation(false);
|
||||
StartMatrixTimer(1000);
|
||||
Logger.WriteLine("Matrix Clock");
|
||||
break;
|
||||
default:
|
||||
mat.SetBuiltInAnimation(true, animation);
|
||||
Logger.WriteLine("Matrix builtin "+animation.AsByte);
|
||||
break;
|
||||
|
||||
}
|
||||
@@ -556,7 +558,7 @@ namespace GHelper
|
||||
{
|
||||
if (keyb == null || keyb.Text == "")
|
||||
{
|
||||
keyb = new Keyboard();
|
||||
keyb = new Extra();
|
||||
keyb.Show();
|
||||
}
|
||||
else
|
||||
@@ -687,13 +689,18 @@ namespace GHelper
|
||||
SetScreen(60, 0);
|
||||
}
|
||||
|
||||
private void ButtonMiniled_Click(object? sender, EventArgs e)
|
||||
public void ToogleMiniled()
|
||||
{
|
||||
int miniled = (Program.config.getConfig("miniled") == 1) ? 0 : 1;
|
||||
Program.config.setConfig("miniled", miniled);
|
||||
SetScreen(-1, -1, miniled);
|
||||
}
|
||||
|
||||
private void ButtonMiniled_Click(object? sender, EventArgs e)
|
||||
{
|
||||
ToogleMiniled();
|
||||
}
|
||||
|
||||
public void SetScreen(int frequency = -1, int overdrive = -1, int miniled = -1)
|
||||
{
|
||||
|
||||
@@ -848,6 +855,7 @@ namespace GHelper
|
||||
gpuTemp = $": {HardwareMonitor.gpuTemp}°C ";
|
||||
}
|
||||
|
||||
|
||||
Program.settingsForm.BeginInvoke(delegate
|
||||
{
|
||||
labelCPUFan.Text = "CPU" + cpuTemp + HardwareMonitor.cpuFan;
|
||||
@@ -877,7 +885,12 @@ namespace GHelper
|
||||
this.Top = Screen.FromControl(this).WorkingArea.Height - 10 - this.Height;
|
||||
this.Activate();
|
||||
|
||||
aTimer.Enabled = true;
|
||||
Task.Run(async () =>
|
||||
{
|
||||
await Task.Delay(TimeSpan.FromSeconds(1));
|
||||
aTimer.Enabled = true;
|
||||
});
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -1127,11 +1140,18 @@ namespace GHelper
|
||||
|
||||
}
|
||||
|
||||
public static bool IsPlugged()
|
||||
{
|
||||
bool optimizedUSBC = Program.config.getConfig("optimized_usbc") != 1;
|
||||
|
||||
return SystemInformation.PowerStatus.PowerLineStatus == PowerLineStatus.Online &&
|
||||
(optimizedUSBC || Program.wmi.DeviceGet(ASUSWmi.ChargerMode) != ASUSWmi.ChargerUSB);
|
||||
|
||||
}
|
||||
|
||||
public bool AutoGPUMode()
|
||||
{
|
||||
|
||||
var Plugged = SystemInformation.PowerStatus.PowerLineStatus;
|
||||
|
||||
bool GpuAuto = Program.config.getConfig("gpu_auto") == 1;
|
||||
bool ForceGPU = Program.config.ContainsModel("503");
|
||||
|
||||
@@ -1146,14 +1166,17 @@ namespace GHelper
|
||||
return false;
|
||||
else
|
||||
{
|
||||
|
||||
if (ReEnableGPU()) return true;
|
||||
|
||||
if (eco == 1)
|
||||
if ((GpuAuto && Plugged == PowerLineStatus.Online) || (ForceGPU && GpuMode == ASUSWmi.GPUModeStandard))
|
||||
if ((GpuAuto && IsPlugged()) || (ForceGPU && GpuMode == ASUSWmi.GPUModeStandard))
|
||||
{
|
||||
SetEcoGPU(0);
|
||||
return true;
|
||||
}
|
||||
if (eco == 0)
|
||||
if ((GpuAuto && Plugged != PowerLineStatus.Online) || (ForceGPU && GpuMode == ASUSWmi.GPUModeEco))
|
||||
if ((GpuAuto && !IsPlugged()) || (ForceGPU && GpuMode == ASUSWmi.GPUModeEco))
|
||||
{
|
||||
|
||||
if (HardwareMonitor.IsUsedGPU())
|
||||
@@ -1171,6 +1194,20 @@ namespace GHelper
|
||||
|
||||
}
|
||||
|
||||
public bool ReEnableGPU()
|
||||
{
|
||||
if (Screen.AllScreens.Length <= 1) return false;
|
||||
if (Program.config.getConfig("gpu_reenable") != 1) return false;
|
||||
|
||||
Logger.WriteLine("Re-enabling gpu for 503 model");
|
||||
|
||||
Thread.Sleep(1000);
|
||||
SetEcoGPU(1);
|
||||
Thread.Sleep(1000);
|
||||
SetEcoGPU(0);
|
||||
return true;
|
||||
}
|
||||
|
||||
private void UltimateUI(bool ultimate)
|
||||
{
|
||||
if (!ultimate)
|
||||
@@ -1259,7 +1296,7 @@ namespace GHelper
|
||||
Program.wmi.DeviceSet(ASUSWmi.GPUEco, eco, "GPUEco");
|
||||
|
||||
if (eco == 0)
|
||||
HardwareMonitor.RecreateGpuTemperatureProviderWithDelay();
|
||||
HardwareMonitor.RecreateGpuControlWithDelay();
|
||||
|
||||
Program.settingsForm.BeginInvoke(delegate
|
||||
{
|
||||
|
||||
@@ -4,7 +4,9 @@
|
||||
<trustInfo xmlns="urn:schemas-microsoft-com:asm.v2">
|
||||
<security>
|
||||
<requestedPrivileges xmlns="urn:schemas-microsoft-com:asm.v3">
|
||||
<!-- UAC Manifest Options
|
||||
<requestedExecutionLevel level="asInvoker" uiAccess="false" />
|
||||
|
||||
<!-- UAC Manifest Options
|
||||
If you want to change the Windows User Account Control level replace the
|
||||
requestedExecutionLevel node with one of the following.
|
||||
|
||||
|
||||
Binary file not shown.
@@ -20,6 +20,7 @@ Control tool for ROG Zephyrus G14, G15, Flow X13, Flow X16, TUF, Strix, Scar and
|
||||
## [:floppy_disk: Download App](https://github.com/seerge/g-helper/releases/latest/download/GHelper.zip)
|
||||
|
||||
If you like this app, please [star :star: it on Github](https://github.com/seerge/g-helper) and spread a word about it!
|
||||
### :euro: [Donate and support G-Helper](https://www.paypal.com/donate/?hosted_button_id=4HMSHS4EBQWTA)
|
||||
|
||||
_If you post about the app - please include a link. Thanks._
|
||||
|
||||
@@ -114,8 +115,13 @@ G-helper is a single exe, and it doesn't install anything in the system. To remo
|
||||
It's a lightweight Armoury Crate alternative for Asus laptops. A small utility that allows you to do almost everything you could do with Armoury Crate but without extra bloat and unnecessary services.
|
||||
|
||||
|
||||
-----------------------------
|
||||
|
||||
----------------------------
|
||||
## :euro: [Support Project](https://www.paypal.com/donate/?hosted_button_id=4HMSHS4EBQWTA)
|
||||
#### If you like the app you can make a [Donation via Paypal](https://www.paypal.com/donate/?hosted_button_id=4HMSHS4EBQWTA)
|
||||
[](https://www.paypal.com/donate/?hosted_button_id=4HMSHS4EBQWTA)
|
||||
|
||||
----------------
|
||||
|
||||
### How to install
|
||||
|
||||
|
||||
@@ -5,21 +5,22 @@
|
||||
语言: [English](https://github.com/seerge/g-helper#readme) | 中文
|
||||
|
||||
## 为ASUS笔记本打造的、Armoury Crate(奥创控制中心)的轻量化替代品
|
||||
### 可作为ROG 幻14、幻15,幻13、幻16,飞行堡垒/天选系列,ROG 枪神/魔霸系列或其他ASUS笔记本的控制工具
|
||||
|
||||
这是一个实用程序,可以做到几乎所有Armoury Crate(奥创控制中心)能做的事情,而且不需要任何多余的功能或安装不必要的系统服务。
|
||||
这是一个ROG 幻14、幻15,幻13、幻16,飞行堡垒/天选系列,ROG 枪神/魔霸系列或其他ASUS笔记本的控制工具。可以做到几乎所有Armoury Crate(奥创控制中心)能做的事情,而且不需要任何多余的功能或安装不必要的系统服务。
|
||||
|
||||
|
||||
## :gift: 主要优点
|
||||
|
||||
1. 自动且无缝的独立显卡模式切换(不需要关闭所有应用或别的要求)
|
||||
2. 可以完全手动调整所有的性能模式(包括自定义风扇曲线以及PPTs(CPU/GPU功耗控制))
|
||||
3. 极致的轻量化,几乎不消耗任何资源,不需要安装系统服务。只需要下载一个exe文件就可以运行。
|
||||
1. 自动且无缝的独立显卡模式切换(不需要关闭所有应用或执行其他操作)
|
||||
2. 可以手动调整所有的性能模式(包括自定义风扇曲线以及PPTs(Platform Power Threshold,即CPU总功耗,下文简称PPTs--译注))
|
||||
3. 极致的轻量化,几乎不消耗任何资源,也不需要安装系统服务。只需要下载一个exe文件就可以运行。
|
||||
4. 简洁的界面设计,可以轻松调整所有设置。
|
||||
5. 运行不需要管理员权限!
|
||||
|
||||
## [:floppy_disk: 下载应用](https://github.com/seerge/g-helper/releases/latest/download/GHelper.zip)
|
||||
|
||||
如果你喜欢这个应用,请[给这个项目:star:](https://github.com/seerge/g-helper) 或者向别人推荐它!
|
||||
### :euro: [(通过paypal)支持和捐赠G-Helper](https://www.paypal.com/donate/?hosted_button_id=4HMSHS4EBQWTA)
|
||||
|
||||
_如果你在别的地方提到这个软件-请记得加上这个项目的网址。十分感谢。_
|
||||
|
||||
@@ -27,14 +28,14 @@ _如果你在别的地方提到这个软件-请记得加上这个项目的网址
|
||||
|
||||
### :zap: 主要功能
|
||||
|
||||
1. **性能模式**: 静音 - 平衡/性能 - 增强 (内置的性能模式,附带默认的风扇曲线)
|
||||
2. **显卡模式**: 集显模式 - 混合输出 - 独显输出 - 自动切换
|
||||
3. 笔记本屏幕刷新率 60hz 或 120hz 自动调节(或者 144hz 等刷新率),包括屏幕Overdrive(OD,即ROG系列的屏幕快速响应/快显)功能
|
||||
4. 可调节的风扇曲线、电源功耗设置(PPT)(_注:请谨慎调节!_)和CPU睿频选项
|
||||
1. **性能模式**: 静音模式 - 平衡模式 - 增强模式 (笔电bios内置的性能模式,附带默认的风扇曲线)
|
||||
2. **显卡模式**: 集显模式 - 标准模式 - 独显直连 - 自动切换
|
||||
3. 笔记本屏幕刷新率 60hz 或 120hz 自动调节(或者 144hz 等刷新率),包括屏幕Overdrive(OD,即ROG系列的屏幕快速响应/快显功能--译注)功能
|
||||
4. 可调节的风扇曲线、电源功耗设置(PPTs)(_注:请谨慎调节!_)和CPU超频选项
|
||||
5. ROG Anime matrix 光显矩阵屏控制, 感谢项目 [Starlight](https://github.com/vddCore/Starlight) + 应用侧的一些调整,包括动画GIF图片
|
||||
6. 键盘灯光效果和颜色设置 (包括睡眠模式下的灯光效果和对飞行堡垒/天选系列的键盘支持)
|
||||
7. 对 M3, M4 按键的自定义设置和 FN+F5 快捷键(性能模式切换 FN+F4快捷键(键盘灯光效果切换)
|
||||
8. CPU/GPU温度、风扇转速和电池充放电功率先生
|
||||
7. 对 M3, M4 按键的自定义设置和 FN+F5 快捷键(性能模式切换) FN+F4 快捷键(键盘灯光效果切换)
|
||||
8. CPU/GPU温度、风扇转速和电池充放电功率显示
|
||||
9. 电池充电上限设置,保护电池健康度
|
||||
|
||||
### :gear: 当使用电池供电或插上电源时,自动切换:
|
||||
@@ -43,15 +44,15 @@ _如果你在别的地方提到这个软件-请记得加上这个项目的网址
|
||||
- 自动切换屏幕刷新率 (使用电池时切换为 60hz,插入电源后切换为 120+ hz)
|
||||
- 使用电池时键盘背光可自动关闭
|
||||
|
||||
为了保证自动切换功能和按键绑定功能的正常工作,软件需要在后台运行并显示一个托盘图标。这并不会消耗任何资源。
|
||||
为了保证自动切换功能和按键绑定功能的正常工作,软件需要在后台运行并显示一个托盘图标。这并不会消耗其他资源。
|
||||
|
||||
### :rocket: 性能模式
|
||||
|
||||
性能模式与 Armoury Crate(奥创控制中心)中的 **保持一致**,因为这些设置与其对应的风扇曲线都被保存在bios中
|
||||
|
||||
1. 静音 (风扇转速最小或完全停转, 70W 总功耗(PPT), 其中 CPU 最高 45W(PPT)) + windows电源模式设置为最长续航/省电模式
|
||||
2. 平衡/性能 (平衡模式的风扇曲线设置, 100W 总功耗(PPT), 其中 CPU 最高 45W(PPT)) + windows电源模式设置为平衡
|
||||
3. 增强 (激进的风扇曲线设置, 125W 总功耗(PPT), 其中 CPU 最高 80W(PPT)) + windows电源模式设置为高性能/最佳性能
|
||||
1. 静音 (风扇转速最小或完全停转, 70W 总PPT, 其中 CPU 最高 45W PPT) + windows电源模式设置为最长续航/省电模式
|
||||
2. 平衡/性能 (平衡模式的风扇曲线设置, 100W 总PPT, 其中 CPU 最高 45W PPT) + windows电源模式设置为平衡
|
||||
3. 增强 (激进的风扇曲线设置, 125W 总PPT, 其中 CPU 最高 80W PPT) + windows电源模式设置为高性能/最佳性能
|
||||
|
||||
_PPTs 默认在 幻14 2022版上显示, 对于其他型号 PPTs 的显示将会有所变化,因为它们在bios中的设置不同。_
|
||||
|
||||
@@ -60,66 +61,87 @@ _PPTs 默认在 幻14 2022版上显示, 对于其他型号 PPTs 的显示将会
|
||||
### :video_game: 显卡模式
|
||||
|
||||
1. 集显模式 : 只启用低功耗的内置显卡, 核显连接笔电内置屏幕
|
||||
2. 混合输出 (MS Hybrid) : 同时启用核显与独显, 核显连接笔电内置屏幕
|
||||
3. 独显输出: 同时启用核显与独显, 但独显直连笔电屏幕 (仅在幻14 2022版等机型上支持)
|
||||
2. 标准模式 (MS Hybrid) : 同时启用核显与独显, 核显连接笔电内置屏幕
|
||||
3. 独显直连: 同时启用核显与独显, 但独显直连笔电屏幕 (仅在幻14 2022版等机型上支持)
|
||||
4. 自动切换: 使用电池时关闭独显(集显模式),并在插上电源后重新启用独显(混合输出)
|
||||
|
||||
## :question: 常见问题解答(FAQ)
|
||||
|
||||
### 当我按下 M4 / Rog键的时候总是弹出安装Armoury Crate的弹窗提示,我该如何关闭它?
|
||||
删除下列文件或者把它移动(剪切+粘贴)到别的目录 ``C:\Windows\System32\ASUSACCI\ArmouryCrateKeyControl.exe``.
|
||||
#### 当我按下 M4 / Rog键的时候总是弹出安装Armoury Crate的弹窗提示,我该如何关闭它?
|
||||
删除下列文件或者把它移动(注:剪切+粘贴)到别的目录 ``C:\Windows\System32\ASUSACCI\ArmouryCrateKeyControl.exe``.
|
||||
|
||||
如果还是出现弹窗 - 进入 BIOS (开机时按住 F2), 按照屏幕下方的快捷键提示进入 Advanced Settings,然后关闭 "Armoury Crate Control Interface" (把它设置为disabled)。
|
||||
如果还是出现弹窗 - 进入 BIOS (开机时按住 F2), 按照屏幕下方的快捷键提示进入 Advanced Settings,然后关闭 "Armoury Crate Control Interface" (注:把它设置为disabled)。
|
||||
|
||||
### 为什么我的笔记本不支持独显输出?
|
||||
#### 为什么我的笔记本不支持独显输出?
|
||||
独显输出只在幻14 2022版上支持(也可能支持2022年以来的其他机型)。
|
||||
|
||||
### 我无法在幻14 2020版上设置集显模式(关闭独显)
|
||||
#### 我无法在幻14 2020版上设置集显模式(关闭独显)
|
||||
很不幸,2020版的机型在硬件上不支持这个设置。
|
||||
|
||||
### 我是否应该自行调整功耗设置和风扇曲线?
|
||||
#### 我是否应该自行调整功耗设置(PPTs)和风扇曲线?
|
||||
你可以不那么做,这些操作是可选的。按照经验(bios)内置的性能模式工作的很好。请只在遇到问题的时候限制功耗或者手动设置风扇模式。当你在风扇与功率设置中按下“应用”时,bios将会认为风扇配置文件为“自定义”! (无论你是否真的修改了风扇曲线)
|
||||
|
||||
### G-helper是如何控制我的风扇转速的?
|
||||
#### G-helper是如何控制我的风扇转速的?
|
||||
软件并不会修改风扇转速。这个设置实际上由bios控制(与Armoury Crate的情况相同)。G-helper 所能做的 - 就是将一个自定义的风扇配置(可选地)应用到正在使用的性能模式,其中包括8组温度+风扇速度的百分比数值%。软件通过与Armoury Crate看起来相同的WMI endpoint来应用这一设置,
|
||||
|
||||
### 我如何把风扇转速显示从百分比%切换到RPM(每分钟转速)?
|
||||
#### 我如何把风扇转速显示从百分比%切换到RPM(每分钟转速)?
|
||||
点击一下百分比即可切换。
|
||||
|
||||
### 我没有在G-helper中看到独显温度
|
||||
#### 我没有在G-helper中看到独显温度
|
||||
很可能要么你正在使用核显模式/自动切换模式,这种情况下独显只是关闭了;或者你的windows系统为独显设置了睡眠模式(为了省电)。这种情况下,G-helper无法识别到独显,也不能获得温度读数。
|
||||
|
||||
### 弹窗提示"G-Helper已经在运行"
|
||||
#### 弹窗提示"G-Helper已经在运行"
|
||||
请在系统托盘里找到 (G) 图标。windows会默认隐藏所有图标,所以你可能需要点击 ^ 来看见它们。建议任务栏右键进入任务栏设置 -> 其他系统图标 -> 将 G-Helper 设置为始终在任务栏上显示。
|
||||
|
||||
### 应用不能启动或者崩溃了,我该怎么做?
|
||||
#### 应用不能启动或者崩溃了,我该怎么做?
|
||||
从开始菜单里打开“事件管理器”, 进入 Windows日志 -> 应用,然后在最近的错误日志里寻找包含G-helper的日志。如果你找到一个 - 请提出一个 [新的 issue](https://github.com/seerge/g-helper/issues) ,其中包含来自这次错误的所有的详细信息。
|
||||
|
||||
### 我可以在用G-Helper的时候同时用myASUS吗?
|
||||
#### 我可以在用G-Helper的时候同时用myASUS吗?
|
||||
当然可以! 唯一的问题是myASUS可能会重置你之前在g-helper里设置的电池充电上限。在这种情况下,建议你在这两个应用(myASUS和g-helper)里设置相同的充电上限(60%/80%/100%)以避免冲突。
|
||||
|
||||
### 我该如何卸载G-helper?
|
||||
#### 我如何将M3键设置为将麦克风静音?
|
||||
这个功能由 Asus Optimization Service 管理(所以 G-helper 没有这项设置,也不管理这个功能)。请确认这个系统服务是否正常运行
|
||||
|
||||
#### 我如何设置不同的视觉风格(即 Armoury Crate 内的gamevisual功能)?
|
||||
因为这个功能让颜色显示不正确,我个人(注:作者 :) )并不喜欢这些。但是如果你需要这个功能 - 你可以使用 Nvidia 控制面板/GefoeceExperirence滤镜或者AMD控制面板(Radeon Software/AMD Software: Adrenalin Edition)来修改显示颜色(因显示器和配置而异)。如果你真的非常需要这个功能,你也可以使用 [微软商店中ASUS自己的工具](https://apps.microsoft.com/store/detail/gamevisual/9P4K1LFTXSH8?hl=nl-nl&gl=nl&rtc=1)
|
||||
|
||||
#### 我能超频 Nvidia GPU 核心或显存吗?
|
||||
我(注:作者 :) )现在并没有Nvidia的显卡,所以我不能保证这个功能加入之后是安全的。但是你可以用微星小飞机(msi afterburner) 去超频GPU,毕竟它是为GPU超频专门设计的 :)
|
||||
|
||||
#### 我该如何卸载G-helper?
|
||||
G-helper是一个单文件的exe文件, 而且它不会向系统中安装任何东西。如果要“卸载”它 - 你可以直接删除exe文件 :) 如果你已经设置了自定义的风扇配置或者功耗设置(PPTs) - 在删除软件之前建议你选择你最喜欢的配置模式(比如"平衡"),然后在“风扇与电源设置”里点击“恢复默认设置”。
|
||||
|
||||
#### G-helper 是什么?
|
||||
这是一个ASUS笔记本的控制工具。可以做到几乎所有Armoury Crate(奥创控制中心)能做的事情,而且不需要任何多余的功能或安装不必要的系统服务。
|
||||
|
||||
|
||||
----------------------------
|
||||
|
||||
## :euro: [支持这个项目](https://www.paypal.com/donate/?hosted_button_id=4HMSHS4EBQWTA)
|
||||
#### 如果你喜欢这个项目你可以[通过Paypal捐赠](https://www.paypal.com/donate/?hosted_button_id=4HMSHS4EBQWTA)
|
||||
[](https://www.paypal.com/donate/?hosted_button_id=4HMSHS4EBQWTA)
|
||||
|
||||
----------------
|
||||
|
||||
### 安装指南
|
||||
|
||||
1. 从 [**Releases Page**](https://github.com/seerge/g-helper/releases) 下载最新版本
|
||||
2. 解压到你选择的文件夹
|
||||
3. 运行 **GHelper.exe**
|
||||
|
||||
### 依赖软件及运行要求
|
||||
### 运行要求(必须)
|
||||
|
||||
- Microsoft [.NET7](https://dotnet.microsoft.com/en-us/download)。 你可能已经安装了。 如果没有的话你可以从官方网站 [立即下载](https://dotnet.microsoft.com/en-us/download/dotnet/thank-you/sdk-7.0.202-windows-x64-installer)。
|
||||
|
||||
- [Asus System Control Interface](https://dlcdnets.asus.com/pub/ASUS/nb/Image/CustomComponent/ASUSSystemControlInterfaceV3/ASUSSystemControlInterfaceV3.exe)。 如果你安装了或者安装过myASUS, 那么这个"驱动"应当已经安装(即使myASUS已经卸载)。 或者你可以手动下载安装。
|
||||
|
||||
- 可选选项(!) 你可以通过在管理员模式下运行 [这个用于精简的.bat文件](https://raw.githubusercontent.com/seerge/g-helper/main/debloat.bat)来禁用/移除不必要的服务。如果要恢复这些服务,运行 [这个.bat文件](https://raw.githubusercontent.com/seerge/g-helper/main/bloat.bat)。
|
||||
### 推荐配置(可选)
|
||||
|
||||
- 推荐保持 "Asus Optimization Service" 这个windows服务的运行, 它保证基本的键盘快捷键(比如屏幕或键盘亮度)能够使用。
|
||||
|
||||
-不建议同时运行这个应用与Armoury Crate(及其服务), 因为它们调整的设置是相同的。你可以[使用ASUS官方提供的卸载工具卸载](https://dlcdnets.asus.com/pub/ASUS/mb/14Utilities/Armoury_Crate_Uninstall_Tool.zip?model=armoury%20crate)。以防万一,你总是可以之后再安装回来。
|
||||
- 可选选项(!) 你可以通过在管理员模式下运行 [这个用于精简的.bat文件](https://raw.githubusercontent.com/seerge/g-helper/main/debloat.bat)来禁用/移除不必要的服务。如果要恢复这些服务,运行 [这个.bat文件](https://raw.githubusercontent.com/seerge/g-helper/main/bloat.bat)。
|
||||
|
||||
-这个应用不建议与Armoury Crate(及其服务)同时运行, 因为它们会调整相同的设置。你可以[使用ASUS官方提供的卸载工具卸载](https://dlcdnets.asus.com/pub/ASUS/mb/14Utilities/Armoury_Crate_Uninstall_Tool.zip?model=armoury%20crate)Armoury Crate。以防万一,你总是可以之后再安装回来。
|
||||
|
||||
-------------------------------
|
||||
|
||||
@@ -136,20 +158,35 @@ G-helper是一个单文件的exe文件, 而且它不会向系统中安装任何
|
||||

|
||||
|
||||
---------
|
||||
|
||||
## 高级用户设置
|
||||
|
||||
### 为每一个模式自定义用户计划
|
||||
|
||||
在 config.json (位于 %appdata/GHelper) 中你可以手动添加自定义电源设置的GUID (它既可以是"真正的"可被选择的电源计划,也可以是"覆盖式(overlay)"的电源计划,就像g-helper默认设置的那样)
|
||||
|
||||
格式 : "scheme_<mode>" : "GUID"
|
||||
格式如下 : "scheme_<mode>" : "GUID"
|
||||
|
||||
Where mode = 0 (balanced), 1 (turbo), 2 (silent)
|
||||
Where ``mode = 0 (balanced), 1 (turbo), 2 (silent)``
|
||||
|
||||
"scheme_0": "2ac1d0e0-17a7-44ed-8091-d88ef75a4eb0",
|
||||
"scheme_1": "381b4222-f694-41f0-9685-ff5bb260df2e"
|
||||
```
|
||||
"scheme_0": "2ac1d0e0-17a7-44ed-8091-d88ef75a4eb0",
|
||||
"scheme_1": "381b4222-f694-41f0-9685-ff5bb260df2e"
|
||||
```
|
||||
|
||||
确保修改时保证json文件的结构 (也就是不要增减逗号等打乱配置的操作) - 否则应用会读取失败,并将重新创建一个新的配置文件来替代它。
|
||||
确保修改时保证json文件的结构不被打乱 (例如不要增减或缺失逗号、括号等操作) - 否则应用会读取失败,并将重新创建一个新的配置文件来替代它。
|
||||
|
||||
### 自定义热键行为
|
||||
|
||||
软件支持为 M3, M4 和 FN+F4 热键自定义配置。如要设置,在按键旁的选项框中选择"自定义设置",然后执行下面的操作(任选其一):
|
||||
|
||||
1. 要想运行任意应用 - 向 "action" 文本框中粘贴应用文件exe的完整路径,例如:
|
||||
``C:\Program Files\EA Games\Battlefield 2042\BF2042.exe``
|
||||
|
||||
2. 要想模拟任意windows按键 - 向"action"文本框中粘贴相对应的 keycode,例如 ``0x2C`` 为屏幕截图键。
|
||||
Keycodes的完整列表: https://learn.microsoft.com/en-us/windows/win32/inputdev/virtual-key-codes
|
||||
|
||||

|
||||
|
||||
------------
|
||||
|
||||
|
||||
Reference in New Issue
Block a user