From 0dae1c91150a4280cbd9bb8ee7c19818f4b56c2c Mon Sep 17 00:00:00 2001 From: Serge <5920850+seerge@users.noreply.github.com> Date: Sun, 11 Jun 2023 14:50:01 +0200 Subject: [PATCH] Custom mode renaming --- app/CustomControls.cs | 2 + app/Extra.Designer.cs | 10 ++-- app/Fans.Designer.cs | 93 ++++++++++++++++++----------- app/Fans.cs | 49 +++++++++++++-- app/Fans.resx | 15 ++++- app/Modes.cs | 35 +++++++---- app/Program.cs | 7 ++- app/Properties/Strings.Designer.cs | 2 +- app/Properties/Strings.resx | 2 +- app/Resources/icons8-edit-32.png | Bin 0 -> 319 bytes app/Resources/icons8-share-32.png | Bin 0 -> 281 bytes app/Settings.Designer.cs | 4 +- app/Settings.cs | 8 ++- app/ToastForm.cs | 2 +- 14 files changed, 162 insertions(+), 67 deletions(-) create mode 100644 app/Resources/icons8-edit-32.png create mode 100644 app/Resources/icons8-share-32.png diff --git a/app/CustomControls.cs b/app/CustomControls.cs index 044527d6..6c237dee 100644 --- a/app/CustomControls.cs +++ b/app/CustomControls.cs @@ -12,6 +12,8 @@ namespace CustomControls public static Color colorEco = Color.FromArgb(255, 6, 180, 138); public static Color colorStandard = Color.FromArgb(255, 58, 174, 239); public static Color colorTurbo = Color.FromArgb(255, 255, 32, 32); + public static Color colorCustom = Color.FromArgb(255, 255, 128, 0); + public static Color buttonMain; public static Color buttonSecond; diff --git a/app/Extra.Designer.cs b/app/Extra.Designer.cs index 3648068e..07dc204a 100644 --- a/app/Extra.Designer.cs +++ b/app/Extra.Designer.cs @@ -119,8 +119,8 @@ namespace GHelper groupBindings.Location = new Point(9, 11); groupBindings.Margin = new Padding(4, 2, 4, 2); groupBindings.Name = "groupBindings"; - groupBindings.Padding = new Padding(4, 2, 50, 2); - groupBindings.Size = new Size(966, 343); + groupBindings.Padding = new Padding(4, 2, 50, 10); + groupBindings.Size = new Size(966, 351); groupBindings.TabIndex = 0; groupBindings.TabStop = false; groupBindings.Text = "Key Bindings"; @@ -380,7 +380,7 @@ namespace GHelper groupLight.Controls.Add(panelXMG); groupLight.Controls.Add(tableBacklight); groupLight.Dock = DockStyle.Top; - groupLight.Location = new Point(9, 354); + groupLight.Location = new Point(9, 362); groupLight.Margin = new Padding(4, 2, 4, 2); groupLight.Name = "groupLight"; groupLight.Padding = new Padding(4, 2, 4, 11); @@ -804,7 +804,7 @@ namespace GHelper groupOther.Controls.Add(checkGpuApps); groupOther.Controls.Add(checkFnLock); groupOther.Dock = DockStyle.Top; - groupOther.Location = new Point(9, 880); + groupOther.Location = new Point(9, 888); groupOther.Margin = new Padding(4, 2, 4, 2); groupOther.Name = "groupOther"; groupOther.Padding = new Padding(20, 2, 4, 10); @@ -903,7 +903,7 @@ namespace GHelper panelServices.Controls.Add(labelServices); panelServices.Controls.Add(buttonServices); panelServices.Dock = DockStyle.Top; - panelServices.Location = new Point(9, 1176); + panelServices.Location = new Point(9, 1184); panelServices.Name = "panelServices"; panelServices.Size = new Size(966, 72); panelServices.TabIndex = 3; diff --git a/app/Fans.Designer.cs b/app/Fans.Designer.cs index 01179a04..246c538f 100644 --- a/app/Fans.Designer.cs +++ b/app/Fans.Designer.cs @@ -31,14 +31,14 @@ namespace GHelper /// private void InitializeComponent() { - ChartArea chartArea1 = new ChartArea(); - Title title1 = new Title(); - ChartArea chartArea2 = new ChartArea(); - Title title2 = new Title(); - ChartArea chartArea3 = new ChartArea(); - Title title3 = new Title(); - ChartArea chartArea4 = new ChartArea(); - Title title4 = new Title(); + ChartArea chartArea5 = new ChartArea(); + Title title5 = new Title(); + ChartArea chartArea6 = new ChartArea(); + Title title6 = new Title(); + ChartArea chartArea7 = new ChartArea(); + Title title7 = new Title(); + ChartArea chartArea8 = new ChartArea(); + Title title8 = new Title(); System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Fans)); panelFans = new Panel(); labelTip = new Label(); @@ -48,6 +48,7 @@ namespace GHelper chartXGM = new Chart(); chartMid = new Chart(); panelTitleFans = new Panel(); + buttonRename = new RButton(); buttonRemove = new RButton(); buttonAdd = new RButton(); comboModes = new RComboBox(); @@ -187,8 +188,8 @@ namespace GHelper // // chartGPU // - chartArea1.Name = "ChartArea1"; - chartGPU.ChartAreas.Add(chartArea1); + chartArea5.Name = "ChartArea1"; + chartGPU.ChartAreas.Add(chartArea5); chartGPU.Dock = DockStyle.Fill; chartGPU.Location = new Point(12, 289); chartGPU.Margin = new Padding(2, 10, 2, 10); @@ -196,13 +197,13 @@ namespace GHelper chartGPU.Size = new Size(781, 259); chartGPU.TabIndex = 17; chartGPU.Text = "chartGPU"; - title1.Name = "Title1"; - chartGPU.Titles.Add(title1); + title5.Name = "Title1"; + chartGPU.Titles.Add(title5); // // chartCPU // - chartArea2.Name = "ChartArea1"; - chartCPU.ChartAreas.Add(chartArea2); + chartArea6.Name = "ChartArea1"; + chartCPU.ChartAreas.Add(chartArea6); chartCPU.Dock = DockStyle.Fill; chartCPU.Location = new Point(12, 10); chartCPU.Margin = new Padding(2, 10, 2, 10); @@ -210,13 +211,13 @@ namespace GHelper chartCPU.Size = new Size(781, 259); chartCPU.TabIndex = 14; chartCPU.Text = "chartCPU"; - title2.Name = "Title1"; - chartCPU.Titles.Add(title2); + title6.Name = "Title1"; + chartCPU.Titles.Add(title6); // // chartXGM // - chartArea3.Name = "ChartAreaXGM"; - chartXGM.ChartAreas.Add(chartArea3); + chartArea7.Name = "ChartAreaXGM"; + chartXGM.ChartAreas.Add(chartArea7); chartXGM.Dock = DockStyle.Fill; chartXGM.Location = new Point(12, 847); chartXGM.Margin = new Padding(2, 10, 2, 10); @@ -224,14 +225,14 @@ namespace GHelper chartXGM.Size = new Size(781, 261); chartXGM.TabIndex = 14; chartXGM.Text = "chartXGM"; - title3.Name = "Title4"; - chartXGM.Titles.Add(title3); + title7.Name = "Title4"; + chartXGM.Titles.Add(title7); chartXGM.Visible = false; // // chartMid // - chartArea4.Name = "ChartArea3"; - chartMid.ChartAreas.Add(chartArea4); + chartArea8.Name = "ChartArea3"; + chartMid.ChartAreas.Add(chartArea8); chartMid.Dock = DockStyle.Fill; chartMid.Location = new Point(12, 568); chartMid.Margin = new Padding(2, 10, 2, 10); @@ -239,12 +240,13 @@ namespace GHelper chartMid.Size = new Size(781, 259); chartMid.TabIndex = 14; chartMid.Text = "chartMid"; - title4.Name = "Title3"; - chartMid.Titles.Add(title4); + title8.Name = "Title3"; + chartMid.Titles.Add(title8); chartMid.Visible = false; // // panelTitleFans // + panelTitleFans.Controls.Add(buttonRename); panelTitleFans.Controls.Add(buttonRemove); panelTitleFans.Controls.Add(buttonAdd); panelTitleFans.Controls.Add(comboModes); @@ -256,37 +258,54 @@ namespace GHelper panelTitleFans.Size = new Size(805, 66); panelTitleFans.TabIndex = 42; // + // buttonRename + // + buttonRename.Activated = false; + buttonRename.Anchor = AnchorStyles.Top | AnchorStyles.Right; + buttonRename.BackColor = SystemColors.ControlLight; + buttonRename.BorderColor = Color.Transparent; + buttonRename.BorderRadius = 2; + buttonRename.FlatStyle = FlatStyle.Flat; + buttonRename.Image = (Image)resources.GetObject("buttonRename.Image"); + buttonRename.Location = new Point(369, 12); + buttonRename.Margin = new Padding(4, 2, 4, 2); + buttonRename.Name = "buttonRename"; + buttonRename.Secondary = true; + buttonRename.Size = new Size(52, 46); + buttonRename.TabIndex = 45; + buttonRename.UseVisualStyleBackColor = false; + // // buttonRemove // buttonRemove.Activated = false; - buttonRemove.Anchor = AnchorStyles.Bottom | AnchorStyles.Left; + buttonRemove.Anchor = AnchorStyles.Top | AnchorStyles.Right; buttonRemove.BackColor = SystemColors.ControlLight; buttonRemove.BorderColor = Color.Transparent; buttonRemove.BorderRadius = 2; buttonRemove.FlatStyle = FlatStyle.Flat; buttonRemove.Image = (Image)resources.GetObject("buttonRemove.Image"); - buttonRemove.Location = new Point(370, 14); + buttonRemove.Location = new Point(314, 12); buttonRemove.Margin = new Padding(4, 2, 4, 2); buttonRemove.Name = "buttonRemove"; buttonRemove.Secondary = true; - buttonRemove.Size = new Size(52, 44); + buttonRemove.Size = new Size(52, 46); buttonRemove.TabIndex = 44; buttonRemove.UseVisualStyleBackColor = false; // // buttonAdd // buttonAdd.Activated = false; - buttonAdd.Anchor = AnchorStyles.Bottom | AnchorStyles.Left; + buttonAdd.Anchor = AnchorStyles.Top | AnchorStyles.Right; buttonAdd.BackColor = SystemColors.ControlLight; buttonAdd.BorderColor = Color.Transparent; buttonAdd.BorderRadius = 2; buttonAdd.FlatStyle = FlatStyle.Flat; buttonAdd.Image = (Image)resources.GetObject("buttonAdd.Image"); - buttonAdd.Location = new Point(737, 14); + buttonAdd.Location = new Point(737, 12); buttonAdd.Margin = new Padding(4, 2, 4, 2); buttonAdd.Name = "buttonAdd"; buttonAdd.Secondary = true; - buttonAdd.Size = new Size(52, 44); + buttonAdd.Size = new Size(52, 46); buttonAdd.TabIndex = 43; buttonAdd.UseVisualStyleBackColor = false; // @@ -295,6 +314,7 @@ namespace GHelper comboModes.Anchor = AnchorStyles.Top | AnchorStyles.Right; comboModes.BorderColor = Color.White; comboModes.ButtonColor = Color.FromArgb(255, 255, 255); + comboModes.FlatStyle = FlatStyle.Flat; comboModes.FormattingEnabled = true; comboModes.Location = new Point(429, 16); comboModes.Name = "comboModes"; @@ -306,7 +326,7 @@ namespace GHelper picturePerf.BackgroundImage = Properties.Resources.icons8_fan_head_96; picturePerf.BackgroundImageLayout = ImageLayout.Zoom; picturePerf.InitialImage = null; - picturePerf.Location = new Point(20, 18); + picturePerf.Location = new Point(18, 18); picturePerf.Margin = new Padding(4, 2, 4, 2); picturePerf.Name = "picturePerf"; picturePerf.Size = new Size(36, 38); @@ -317,7 +337,7 @@ namespace GHelper // labelFans.AutoSize = true; labelFans.Font = new Font("Segoe UI", 9F, FontStyle.Bold, GraphicsUnit.Point); - labelFans.Location = new Point(58, 20); + labelFans.Location = new Point(53, 20); labelFans.Margin = new Padding(4, 0, 4, 0); labelFans.Name = "labelFans"; labelFans.Size = new Size(90, 32); @@ -643,7 +663,7 @@ namespace GHelper pictureBox1.BackgroundImage = Properties.Resources.icons8_processor_96; pictureBox1.BackgroundImageLayout = ImageLayout.Zoom; pictureBox1.InitialImage = null; - pictureBox1.Location = new Point(18, 18); + pictureBox1.Location = new Point(16, 18); pictureBox1.Margin = new Padding(4, 2, 4, 10); pictureBox1.Name = "pictureBox1"; pictureBox1.Size = new Size(36, 38); @@ -654,7 +674,7 @@ namespace GHelper // labelPowerLimits.AutoSize = true; labelPowerLimits.Font = new Font("Segoe UI", 9F, FontStyle.Bold, GraphicsUnit.Point); - labelPowerLimits.Location = new Point(57, 20); + labelPowerLimits.Location = new Point(53, 20); labelPowerLimits.Margin = new Padding(4, 0, 4, 0); labelPowerLimits.Name = "labelPowerLimits"; labelPowerLimits.Size = new Size(160, 32); @@ -887,7 +907,7 @@ namespace GHelper pictureGPU.BackgroundImageLayout = ImageLayout.Zoom; pictureGPU.ErrorImage = null; pictureGPU.InitialImage = null; - pictureGPU.Location = new Point(18, 18); + pictureGPU.Location = new Point(16, 18); pictureGPU.Margin = new Padding(4, 2, 4, 10); pictureGPU.Name = "pictureGPU"; pictureGPU.Size = new Size(36, 38); @@ -898,7 +918,7 @@ namespace GHelper // labelGPU.AutoSize = true; labelGPU.Font = new Font("Segoe UI", 9F, FontStyle.Bold, GraphicsUnit.Point); - labelGPU.Location = new Point(55, 20); + labelGPU.Location = new Point(52, 20); labelGPU.Margin = new Padding(4, 0, 4, 0); labelGPU.Name = "labelGPU"; labelGPU.Size = new Size(162, 32); @@ -1036,5 +1056,6 @@ namespace GHelper private RComboBox comboModes; private RButton buttonAdd; private RButton buttonRemove; + private RButton buttonRename; } } \ No newline at end of file diff --git a/app/Fans.cs b/app/Fans.cs index 809b9e6a..1c1cdb1d 100644 --- a/app/Fans.cs +++ b/app/Fans.cs @@ -137,14 +137,47 @@ namespace GHelper InitGPU(true); comboBoost.SelectedValueChanged += ComboBoost_Changed; - comboModes.SelectedValueChanged += ComboModes_SelectedValueChanged; + + comboModes.SelectionChangeCommitted += ComboModes_SelectedValueChanged; + comboModes.TextChanged += ComboModes_TextChanged; + comboModes.KeyPress += ComboModes_KeyPress; Shown += Fans_Shown; buttonAdd.Click += ButtonAdd_Click; buttonRemove.Click += ButtonRemove_Click; + buttonRename.Click += ButtonRename_Click; + } + private void ComboModes_KeyPress(object? sender, KeyPressEventArgs e) + { + if (e.KeyChar == 13) RenameToggle(); + } + + private void ComboModes_TextChanged(object? sender, EventArgs e) + { + if (comboModes.DropDownStyle == ComboBoxStyle.DropDownList) return; + if (!Modes.IsCurrentCustom()) return; + AppConfig.SetMode("mode_name", comboModes.Text); + } + + private void RenameToggle() + { + if (comboModes.DropDownStyle == ComboBoxStyle.DropDownList) + comboModes.DropDownStyle = ComboBoxStyle.Simple; + else + { + var mode = Modes.GetCurrent(); + FillModes(); + comboModes.SelectedValue = mode; + } + } + + private void ButtonRename_Click(object? sender, EventArgs e) + { + RenameToggle(); + } private void ButtonRemove_Click(object? sender, EventArgs e) { @@ -161,7 +194,7 @@ namespace GHelper private void FillModes() { comboModes.DropDownStyle = ComboBoxStyle.DropDownList; - comboModes.DataSource = new BindingSource(Modes.GetList(), null); + comboModes.DataSource = new BindingSource(Modes.GetDictonary(), null); comboModes.DisplayMember = "Value"; comboModes.ValueMember = "Key"; } @@ -177,13 +210,17 @@ namespace GHelper { int mode = Modes.GetCurrent(); comboModes.SelectedValue = mode; - buttonRemove.Visible = Modes.IsCurrentCustom(); + buttonRename.Visible = buttonRemove.Visible = Modes.IsCurrentCustom(); } private void ComboModes_SelectedValueChanged(object? sender, EventArgs e) { - int selectedMode = (int)comboModes.SelectedValue; - if (selectedMode == Modes.GetCurrent()) return; + var selectedMode = comboModes.SelectedValue; + + if (selectedMode == null) return; + if ((int)selectedMode == Modes.GetCurrent()) return; + + Debug.WriteLine(selectedMode); Program.settingsForm.SetPerformanceMode((int)selectedMode); } @@ -397,8 +434,8 @@ namespace GHelper if (AppConfig.GetMode("auto_boost") != comboBoost.SelectedIndex) { NativeMethods.SetCPUBoost(comboBoost.SelectedIndex); - AppConfig.SetMode("auto_boost", comboBoost.SelectedIndex); } + AppConfig.SetMode("auto_boost", comboBoost.SelectedIndex); } private void CheckApplyPower_Click(object? sender, EventArgs e) diff --git a/app/Fans.resx b/app/Fans.resx index a9316039..61ed072b 100644 --- a/app/Fans.resx +++ b/app/Fans.resx @@ -118,10 +118,21 @@ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAL + DgAACw4BQL7hQQAAAR9JREFUWEftlEuKwkAURTPQHruB3oMINk5chNtRHAnuwFX0R3vQq2lw6kRxCXqP + 5EE6dPKqNOWoDhw0lUrdS6VIkckkpCeXcl/Kf8aeQl++y0vNhUwO4R+SwJN8k9Py+lcmpR4+kjCRwQWY + GCNbzbsl/LMcq4bzyzXjcwY8qot7VsO/yrGmcJvrYouHUg0/y7GEoTxKxtkZ5gURU4BFt7KzcAgt8CI7 + D4eQAsnCwStA+LdkTtOB40wQfteXzyswk23h7IyFc/Kj8QqsJPfXt6u/4TvJDoF9iqPxCvxI7m8kJSyc + 12Lh4K3TiPfgQdocsx4Odi+atgdfJfcowU7wOjgT9XBIUmAgKRFCkgIx5AK5wMMFujKa/xZ5xEymhaK4 + AsqsxiD2d6spAAAAAElFTkSuQmCC + + iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAL - DwAACw8BkvkDpQAAAclJREFUWEftls0uBEEQx+fkI1zWjeAusTyBeAC8EC68Ahu8DImvp8ANF44EB/x/ + DAAACwwBP0AiyAAAAclJREFUWEftls0uBEEQx+fkI1zWjeAusTyBeAC8EC68Ahu8DImvp8ANF44EB/x/ na3LRM9099YSyf6TXzJdU13T011d3dVI/02rYl+ciQfx0YdnbLzDx13r4lJ8JXIh6DOwJsWJ+BQEfhIH YkMsiLE+PGM7FPjgSx/6EqNIM+JaEOxFbIsp0SZ8dsSroC8xOiJLjNo+fiOWRa6WxK2wQWTNBFNnH5/F UCj62iCOMKSI5GH9mPaSP6+LGCwHMdcwtMmynTX3ErGIeR5aDVoROJLJKQmXKmLZ7uAbUVFIcGKreasn @@ -135,7 +146,7 @@ iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAL - DwAACw8BkvkDpQAAAddJREFUWEftlssuBUEQhmflEjbsCPYSlycQD4AXwoZXQPAyJG5PgR02LAkW+L/O + DAAACwwBP0AiyAAAAddJREFUWEftlssuBUEQhmflEjbsCPYSlycQD4AXwoZXQPAyJG5PgR02LAkW+L/O qc3J6emqOXOI5PzJl0z3VNfUdFdXdzXUf9Oq2Bfn4lF8duCZPt5h07rWxZX4dnIpGNO3xsWp+BI4fhYH YkPMi5EOPNN3KLDBljGMxUcjTYsbgbNXsS0mREnY7Ig3wVh8TImQiNo+fiuWRFSL4k5YEKGZYOrs4zN0 NBRjLYhjOjwieVg/pr3Jn3cLHywHPtfoKMmynTVvS/jC50Vq1WhFYEgmexIOWygJX7Y7+EZWFBKM2Goe diff --git a/app/Modes.cs b/app/Modes.cs index ed0fb855..44266a82 100644 --- a/app/Modes.cs +++ b/app/Modes.cs @@ -1,11 +1,13 @@ -namespace GHelper +using Microsoft.VisualBasic.Devices; + +namespace GHelper { internal class Modes { const int maxModes = 20; - public static Dictionary GetList() + public static Dictionary GetDictonary() { Dictionary modes = new Dictionary { @@ -16,8 +18,18 @@ for (int i = 3; i < maxModes; i++) { - if (Exists(i)) - modes.Add(i, GetName(i)); + if (Exists(i)) modes.Add(i, GetName(i)); + } + + return modes; + } + + public static List GetList() + { + List modes = new() { 2, 0, 1 }; + for (int i = 3; i < maxModes; i++) + { + if (Exists(i)) modes.Add(i); } return modes; @@ -124,18 +136,21 @@ public static int GetNext(bool back = false) { - int mode = GetCurrent(); + var modes = GetList(); + int index = modes.IndexOf(GetCurrent()); + if (back) { - mode--; - if (mode < 0) mode = 2; + index--; + if (index < 0) index = modes.Count - 1; + return modes[index]; } else { - mode++; - if (mode > 2) mode = 0; + index++; + if (index > modes.Count - 1) index = 0; + return modes[index]; } - return mode; } } } diff --git a/app/Program.cs b/app/Program.cs index c9ca2c53..369f5ea6 100644 --- a/app/Program.cs +++ b/app/Program.cs @@ -43,10 +43,13 @@ namespace GHelper if (language != null && language.Length > 0) Thread.CurrentThread.CurrentUICulture = CultureInfo.GetCultureInfo(language); else - Thread.CurrentThread.CurrentUICulture = CultureInfo.CurrentUICulture; + { + var culture = CultureInfo.CurrentUICulture; + if (culture.ToString() == "kr") culture = CultureInfo.GetCultureInfo("ko"); + Thread.CurrentThread.CurrentUICulture = culture; + } Debug.WriteLine(CultureInfo.CurrentUICulture); - //Thread.CurrentThread.CurrentUICulture = CultureInfo.CreateSpecificCulture("fr"); ProcessHelper.CheckAlreadyRunning(); diff --git a/app/Properties/Strings.Designer.cs b/app/Properties/Strings.Designer.cs index 6444783f..9f696381 100644 --- a/app/Properties/Strings.Designer.cs +++ b/app/Properties/Strings.Designer.cs @@ -916,7 +916,7 @@ namespace GHelper.Properties { } /// - /// Looks up a localized string similar to Performance Mode. + /// Looks up a localized string similar to Mode. /// internal static string PerformanceMode { get { diff --git a/app/Properties/Strings.resx b/app/Properties/Strings.resx index ee0a9b14..a64178cc 100644 --- a/app/Properties/Strings.resx +++ b/app/Properties/Strings.resx @@ -403,7 +403,7 @@ Overdrive - Performance Mode + Mode Picture / Gif diff --git a/app/Resources/icons8-edit-32.png b/app/Resources/icons8-edit-32.png new file mode 100644 index 0000000000000000000000000000000000000000..7d45d8cfef85e11964c65d3568aad38ec5f4921b GIT binary patch literal 319 zcmV-F0l@x=P)-hPxkswfpBjC$RSURfT6A1aQyaCFr#vq>o RkdFWW002ovPDHLkV1hJ&fMfsw literal 0 HcmV?d00001 diff --git a/app/Resources/icons8-share-32.png b/app/Resources/icons8-share-32.png new file mode 100644 index 0000000000000000000000000000000000000000..f6063bf6cc144537c46d5fc65b88a1f0038c5d26 GIT binary patch literal 281 zcmeAS@N?(olHy`uVBq!ia0vp^3LwnE1|*BCs=fdz&H|6fVg?3oVGw3ym^DWND0te_ z#WAE}&f95$d`$*CZTr>p7&_ep{g-?X_)_)h0qcS6GdeFPr5@C1%{6>E-$WqedjHnj z4417+lR~dB@ju{vlcidobP0l+XkKr-^Mc literal 0 HcmV?d00001 diff --git a/app/Settings.Designer.cs b/app/Settings.Designer.cs index baa9e757..88307144 100644 --- a/app/Settings.Designer.cs +++ b/app/Settings.Designer.cs @@ -310,7 +310,7 @@ namespace GHelper // pictureBattery.BackgroundImage = (Image)resources.GetObject("pictureBattery.BackgroundImage"); pictureBattery.BackgroundImageLayout = ImageLayout.Zoom; - pictureBattery.Location = new Point(6, 0); + pictureBattery.Location = new Point(4, 1); pictureBattery.Margin = new Padding(4); pictureBattery.Name = "pictureBattery"; pictureBattery.Size = new Size(32, 32); @@ -320,7 +320,7 @@ namespace GHelper // labelBatteryTitle // labelBatteryTitle.Font = new Font("Segoe UI", 9F, FontStyle.Bold, GraphicsUnit.Point); - labelBatteryTitle.Location = new Point(34, 0); + labelBatteryTitle.Location = new Point(42, 0); labelBatteryTitle.Margin = new Padding(8, 0, 8, 0); labelBatteryTitle.Name = "labelBatteryTitle"; labelBatteryTitle.Size = new Size(393, 32); diff --git a/app/Settings.cs b/app/Settings.cs index 8a7b1db8..3b14b368 100644 --- a/app/Settings.cs +++ b/app/Settings.cs @@ -79,6 +79,7 @@ namespace GHelper buttonSilent.BorderColor = colorEco; buttonBalanced.BorderColor = colorStandard; buttonTurbo.BorderColor = colorTurbo; + buttonFans.BorderColor = colorCustom; buttonEco.BorderColor = colorEco; buttonStandard.BorderColor = colorStandard; @@ -1260,6 +1261,7 @@ namespace GHelper buttonSilent.Activated = false; buttonBalanced.Activated = false; buttonTurbo.Activated = false; + buttonFans.Activated = false; menuSilent.Checked = false; menuBalanced.Checked = false; @@ -1286,6 +1288,10 @@ namespace GHelper menuBalanced.Checked = true; mode = AsusACPI.PerformanceBalanced; } + else + { + buttonFans.Activated = true; + } break; } @@ -1357,7 +1363,7 @@ namespace GHelper { InputDispatcher.SetBacklightAuto(true); - if (Program.acpi.IsXGConnected()) + if (Program.acpi.IsXGConnected()) AsusUSB.ApplyXGMLight(AppConfig.Is("xmg_light")); if (AppConfig.ContainsModel("X16") || AppConfig.ContainsModel("X13")) InputDispatcher.TabletMode(); diff --git a/app/ToastForm.cs b/app/ToastForm.cs index 93a07d91..533d9c47 100644 --- a/app/ToastForm.cs +++ b/app/ToastForm.cs @@ -144,7 +144,7 @@ namespace GHelper Screen screen1 = Screen.FromHandle(base.Handle); - Width = 300; + Width = Math.Max(300, 100 + toastText.Length*22); Height = 100; X = (screen1.Bounds.Width - this.Width)/2; Y = screen1.Bounds.Height - 300 - this.Height;