diff --git a/app/Fans.cs b/app/Fans.cs index 2fd899e4..80de84b3 100644 --- a/app/Fans.cs +++ b/app/Fans.cs @@ -435,7 +435,7 @@ namespace GHelper labelTip.Text = Math.Round(curPoint.XValue) + "C, " + ChartPercToRPM((int)curPoint.YValues[0], " " + Properties.Strings.RPM); labelTip.Top = e.Y + ((Control)sender).Top; - labelTip.Left = e.X; + labelTip.Left = e.X - 50; } catch diff --git a/app/GHelper.csproj b/app/GHelper.csproj index b2e5b1c4..fdf9845b 100644 --- a/app/GHelper.csproj +++ b/app/GHelper.csproj @@ -16,7 +16,7 @@ x64 False True - 0.51 + 0.52 @@ -62,7 +62,7 @@ - + diff --git a/app/Keyboard.Designer.cs b/app/Keyboard.Designer.cs index bf7646f6..1e90eaeb 100644 --- a/app/Keyboard.Designer.cs +++ b/app/Keyboard.Designer.cs @@ -48,16 +48,19 @@ namespace GHelper checkBoot = new CheckBox(); checkAwake = new CheckBox(); groupOther = new GroupBox(); + checkNoOverdrive = new CheckBox(); checkKeyboardAuto = new CheckBox(); checkTopmost = new CheckBox(); - checkNoOverdrive = new CheckBox(); + pictureHelp = new PictureBox(); groupBox1.SuspendLayout(); groupLight.SuspendLayout(); groupOther.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)pictureHelp).BeginInit(); SuspendLayout(); // // groupBox1 // + groupBox1.Controls.Add(pictureHelp); groupBox1.Controls.Add(textFNF4); groupBox1.Controls.Add(comboFNF4); groupBox1.Controls.Add(labelFNF4); @@ -70,7 +73,7 @@ namespace GHelper groupBox1.Dock = DockStyle.Top; groupBox1.Location = new Point(10, 10); groupBox1.Name = "groupBox1"; - groupBox1.Size = new Size(756, 242); + groupBox1.Size = new Size(810, 242); groupBox1.TabIndex = 0; groupBox1.TabStop = false; groupBox1.Text = Properties.Strings.KeyBindings; @@ -163,7 +166,7 @@ namespace GHelper groupLight.Dock = DockStyle.Top; groupLight.Location = new Point(10, 252); groupLight.Name = "groupLight"; - groupLight.Size = new Size(756, 320); + groupLight.Size = new Size(810, 320); groupLight.TabIndex = 1; groupLight.TabStop = false; groupLight.Text = Properties.Strings.KeyboardBacklight; @@ -172,9 +175,9 @@ namespace GHelper // labelSpeed.AutoSize = true; labelSpeed.Location = new Point(25, 237); + labelSpeed.MaximumSize = new Size(200, 0); labelSpeed.Name = "labelSpeed"; labelSpeed.Size = new Size(198, 32); - labelSpeed.MaximumSize = new Size(200, 0); labelSpeed.TabIndex = 40; labelSpeed.Text = Properties.Strings.AnimationSpeed; // @@ -240,21 +243,31 @@ namespace GHelper groupOther.Controls.Add(checkKeyboardAuto); groupOther.Controls.Add(checkTopmost); groupOther.Dock = DockStyle.Top; - groupOther.Location = new Point(10, 556); + groupOther.Location = new Point(10, 572); groupOther.Name = "groupOther"; - groupOther.Size = new Size(756, 225); + groupOther.Size = new Size(810, 225); groupOther.TabIndex = 2; groupOther.TabStop = false; groupOther.Text = Properties.Strings.Other; // + // checkNoOverdrive + // + checkNoOverdrive.AutoSize = true; + checkNoOverdrive.Location = new Point(25, 156); + checkNoOverdrive.Name = "checkNoOverdrive"; + checkNoOverdrive.Size = new Size(307, 36); + checkNoOverdrive.TabIndex = 3; + checkNoOverdrive.Text = Properties.Strings.DisableOverdrive; + checkNoOverdrive.UseVisualStyleBackColor = true; + // // checkKeyboardAuto // + checkKeyboardAuto.AutoEllipsis = true; checkKeyboardAuto.AutoSize = true; checkKeyboardAuto.Location = new Point(25, 51); - checkKeyboardAuto.Name = "checkKeyboardAuto"; - checkKeyboardAuto.Size = new Size(780, 36); checkKeyboardAuto.MaximumSize = new Size(780, 0); - checkKeyboardAuto.AutoEllipsis = true; + checkKeyboardAuto.Name = "checkKeyboardAuto"; + checkKeyboardAuto.Size = new Size(712, 36); checkKeyboardAuto.TabIndex = 2; checkKeyboardAuto.Text = Properties.Strings.KeyboardAuto; checkKeyboardAuto.UseVisualStyleBackColor = true; @@ -269,15 +282,16 @@ namespace GHelper checkTopmost.Text = Properties.Strings.WindowTop; checkTopmost.UseVisualStyleBackColor = true; // - // checkNoOverdrive + // pictureHelp // - checkNoOverdrive.AutoSize = true; - checkNoOverdrive.Location = new Point(25, 156); - checkNoOverdrive.Name = "checkNoOverdrive"; - checkNoOverdrive.Size = new Size(307, 36); - checkNoOverdrive.TabIndex = 3; - checkNoOverdrive.Text = Properties.Strings.DisableOverdrive; - checkNoOverdrive.UseVisualStyleBackColor = true; + pictureHelp.BackgroundImageLayout = ImageLayout.Zoom; + pictureHelp.Cursor = Cursors.Hand; + pictureHelp.Image = Properties.Resources.icons8_help_32; + pictureHelp.Location = new Point(744, 57); + pictureHelp.Name = "pictureHelp"; + pictureHelp.Size = new Size(32, 32); + pictureHelp.TabIndex = 9; + pictureHelp.TabStop = false; // // Keyboard // @@ -291,7 +305,7 @@ namespace GHelper MaximizeBox = false; MdiChildrenMinimizedAnchorBottom = false; MinimizeBox = false; - Name = Properties.Strings.Keyboard; + Name = "Keyboard"; Padding = new Padding(10); ShowIcon = false; ShowInTaskbar = false; @@ -302,6 +316,7 @@ namespace GHelper groupLight.PerformLayout(); groupOther.ResumeLayout(false); groupOther.PerformLayout(); + ((System.ComponentModel.ISupportInitialize)pictureHelp).EndInit(); ResumeLayout(false); } @@ -328,5 +343,6 @@ namespace GHelper private CheckBox checkTopmost; private CheckBox checkKeyboardAuto; private CheckBox checkNoOverdrive; + private PictureBox pictureHelp; } } \ No newline at end of file diff --git a/app/Keyboard.cs b/app/Keyboard.cs index 9f51163c..6bde429b 100644 --- a/app/Keyboard.cs +++ b/app/Keyboard.cs @@ -1,4 +1,5 @@ using CustomControls; +using System.Diagnostics; namespace GHelper { @@ -87,6 +88,13 @@ namespace GHelper checkNoOverdrive.Checked = (Program.config.getConfig("no_overdrive") == 1); checkNoOverdrive.CheckedChanged += CheckNoOverdrive_CheckedChanged; + pictureHelp.Click += PictureHelp_Click; + + } + + private void PictureHelp_Click(object? sender, EventArgs e) + { + Process.Start(new ProcessStartInfo("https://github.com/seerge/g-helper#custom-hotkey-actions") { UseShellExecute = true }); } private void CheckNoOverdrive_CheckedChanged(object? sender, EventArgs e) diff --git a/app/Program.cs b/app/Program.cs index 069c5eb3..b524de0c 100644 --- a/app/Program.cs +++ b/app/Program.cs @@ -35,7 +35,7 @@ namespace GHelper Debug.WriteLine(CultureInfo.CurrentUICulture); - //Thread.CurrentThread.CurrentUICulture = CultureInfo.CreateSpecificCulture("zh-hans"); + //Thread.CurrentThread.CurrentUICulture = CultureInfo.CreateSpecificCulture("zh"); if (Process.GetProcesses().Count(p => p.ProcessName == "GHelper") > 1) { diff --git a/app/Properties/Resources.Designer.cs b/app/Properties/Resources.Designer.cs index c5ea501c..dd92b0ed 100644 --- a/app/Properties/Resources.Designer.cs +++ b/app/Properties/Resources.Designer.cs @@ -160,6 +160,16 @@ namespace GHelper.Properties { } } + /// + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// + internal static System.Drawing.Bitmap icons8_help_32 { + get { + object obj = ResourceManager.GetObject("icons8-help-32", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + /// /// Looks up a localized resource of type System.Drawing.Bitmap. /// @@ -350,15 +360,6 @@ namespace GHelper.Properties { } } - /// - /// Looks up a localized string similar to Test. - /// - internal static string String1 { - get { - return ResourceManager.GetString("String1", resourceCulture); - } - } - /// /// Looks up a localized resource of type System.Drawing.Icon similar to (Icon). /// diff --git a/app/Properties/Resources.resx b/app/Properties/Resources.resx index 12794545..b75a0e88 100644 --- a/app/Properties/Resources.resx +++ b/app/Properties/Resources.resx @@ -133,15 +133,15 @@ ..\Resources\icons8-fiat-500-48.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - - ..\Resources\icons8-video-card-48.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - ..\Resources\icons8-project-management-48 (1).png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a ..\Resources\icons8-bicycle-48 (1).png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + ..\Resources\icons8-game-controller-48.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + ..\Resources\icons8-fan-head-96.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a @@ -172,8 +172,8 @@ ..\Resources\icons8-laptop-48.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - - ..\Resources\icons8-rocket-48.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + ..\Resources\icons8-video-card-48.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a ..\Resources\icons8-organic-food-961.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a @@ -199,13 +199,16 @@ ..\Resources\ultimate.ico;System.Drawing.Icon, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + ..\Resources\icons8-rocket-48.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + ..\Resources\icons8-speed-48.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a ..\Resources\everything-is-fine-itsfine.gif;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - - ..\Resources\icons8-game-controller-48.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + ..\Resources\icons8-help-32.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a \ No newline at end of file diff --git a/app/Resources/icons8-help-32.png b/app/Resources/icons8-help-32.png new file mode 100644 index 00000000..5169aa47 Binary files /dev/null and b/app/Resources/icons8-help-32.png differ diff --git a/app/Settings.cs b/app/Settings.cs index bf7b7f1d..cf8c0905 100644 --- a/app/Settings.cs +++ b/app/Settings.cs @@ -873,6 +873,13 @@ namespace GHelper public void SetPower() { + + // fix for misbehaving bios PPTs on G513 + if (Program.config.ContainsModel("G513") && Program.config.getConfigPerf("auto_apply") != 1) + { + AutoFans(true); + } + int limit_total = Program.config.getConfigPerf("limit_total"); int limit_cpu = Program.config.getConfigPerf("limit_cpu"); @@ -900,11 +907,11 @@ namespace GHelper } - public void AutoFans() + public void AutoFans(bool force = false) { customFans = false; - if (Program.config.getConfigPerf("auto_apply") == 1) + if (Program.config.getConfigPerf("auto_apply") == 1 || force) { int cpuResult = Program.wmi.SetFanCurve(0, Program.config.getFanConfig(0)); int gpuResult = Program.wmi.SetFanCurve(1, Program.config.getFanConfig(1));