Custom mode renaming

This commit is contained in:
Serge
2023-06-11 14:50:01 +02:00
parent 16e085d9f1
commit 0dae1c9115
14 changed files with 162 additions and 67 deletions

View File

@@ -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;

10
app/Extra.Designer.cs generated
View File

@@ -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;

93
app/Fans.Designer.cs generated
View File

@@ -31,14 +31,14 @@ namespace GHelper
/// </summary>
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;
}
}

View File

@@ -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)

View File

@@ -118,10 +118,21 @@
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<data name="buttonRename.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAL
DgAACw4BQL7hQQAAAR9JREFUWEftlEuKwkAURTPQHruB3oMINk5chNtRHAnuwFX0R3vQq2lw6kRxCXqP
5EE6dPKqNOWoDhw0lUrdS6VIkckkpCeXcl/Kf8aeQl++y0vNhUwO4R+SwJN8k9Py+lcmpR4+kjCRwQWY
GCNbzbsl/LMcq4bzyzXjcwY8qot7VsO/yrGmcJvrYouHUg0/y7GEoTxKxtkZ5gURU4BFt7KzcAgt8CI7
D4eQAsnCwStA+LdkTtOB40wQfteXzyswk23h7IyFc/Kj8QqsJPfXt6u/4TvJDoF9iqPxCvxI7m8kJSyc
12Lh4K3TiPfgQdocsx4Odi+atgdfJfcowU7wOjgT9XBIUmAgKRFCkgIx5AK5wMMFujKa/xZ5xEymhaK4
AsqsxiD2d6spAAAAAElFTkSuQmCC
</value>
</data>
<data name="buttonRemove.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAL
DwAACw8BkvkDpQAAAclJREFUWEftls0uBEEQx+fkI1zWjeAusTyBeAC8EC68Ahu8DImvp8ANF44EB/x/
DAAACwwBP0AiyAAAAclJREFUWEftls0uBEEQx+fkI1zWjeAusTyBeAC8EC68Ahu8DImvp8ANF44EB/x/
na3LRM9099YSyf6TXzJdU13T011d3dVI/02rYl+ciQfx0YdnbLzDx13r4lJ8JXIh6DOwJsWJ+BQEfhIH
YkMsiLE+PGM7FPjgSx/6EqNIM+JaEOxFbIsp0SZ8dsSroC8xOiJLjNo+fiOWRa6WxK2wQWTNBFNnH5/F
UCj62iCOMKSI5GH9mPaSP6+LGCwHMdcwtMmynTX3ErGIeR5aDVoROJLJKQmXKmLZ7uAbUVFIcGKreasn
@@ -135,7 +146,7 @@
<data name="buttonAdd.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAL
DwAACw8BkvkDpQAAAddJREFUWEftlssuBUEQhmflEjbsCPYSlycQD4AXwoZXQPAyJG5PgR02LAkW+L/O
DAAACwwBP0AiyAAAAddJREFUWEftlssuBUEQhmflEjbsCPYSlycQD4AXwoZXQPAyJG5PgR02LAkW+L/O
qc3J6emqOXOI5PzJl0z3VNfUdFdXdzXUf9Oq2Bfn4lF8duCZPt5h07rWxZX4dnIpGNO3xsWp+BI4fhYH
YkPMi5EOPNN3KLDBljGMxUcjTYsbgbNXsS0mREnY7Ig3wVh8TImQiNo+fiuWRFSL4k5YEKGZYOrs4zN0
NBRjLYhjOjwieVg/pr3Jn3cLHywHPtfoKMmynTVvS/jC50Vq1WhFYEgmexIOWygJX7Y7+EZWFBKM2Goe

View File

@@ -1,11 +1,13 @@
namespace GHelper
using Microsoft.VisualBasic.Devices;
namespace GHelper
{
internal class Modes
{
const int maxModes = 20;
public static Dictionary<int, string> GetList()
public static Dictionary<int, string> GetDictonary()
{
Dictionary<int, string> modes = new Dictionary<int, string>
{
@@ -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<int> GetList()
{
List<int> 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;
}
}
}

View File

@@ -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();

View File

@@ -916,7 +916,7 @@ namespace GHelper.Properties {
}
/// <summary>
/// Looks up a localized string similar to Performance Mode.
/// Looks up a localized string similar to Mode.
/// </summary>
internal static string PerformanceMode {
get {

View File

@@ -403,7 +403,7 @@
<value>Overdrive</value>
</data>
<data name="PerformanceMode" xml:space="preserve">
<value>Performance Mode</value>
<value>Mode</value>
</data>
<data name="PictureGif" xml:space="preserve">
<value>Picture / Gif</value>

Binary file not shown.

After

Width:  |  Height:  |  Size: 319 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 281 B

View File

@@ -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);

View File

@@ -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();

View File

@@ -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;