This commit is contained in:
Serge
2024-02-06 15:23:56 +01:00
parent 106ac8aca5
commit b8c8508fd7
3 changed files with 26 additions and 7 deletions

View File

@@ -1382,11 +1382,13 @@ namespace GHelper
buttonEco.Activated = !GPUAuto; buttonEco.Activated = !GPUAuto;
buttonOptimized.Activated = GPUAuto; buttonOptimized.Activated = GPUAuto;
labelGPU.Text = Properties.Strings.GPUMode + ": " + Properties.Strings.GPUModeEco; labelGPU.Text = Properties.Strings.GPUMode + ": " + Properties.Strings.GPUModeEco;
panelGPU.AccessibleName = Properties.Strings.GPUMode + ": " + (GPUAuto ? Properties.Strings.Optimized : Properties.Strings.EcoMode);
Program.trayIcon.Icon = Properties.Resources.eco; Program.trayIcon.Icon = Properties.Resources.eco;
break; break;
case AsusACPI.GPUModeUltimate: case AsusACPI.GPUModeUltimate:
buttonUltimate.Activated = true; buttonUltimate.Activated = true;
labelGPU.Text = Properties.Strings.GPUMode + ": " + Properties.Strings.GPUModeUltimate; labelGPU.Text = Properties.Strings.GPUMode + ": " + Properties.Strings.GPUModeUltimate;
panelGPU.AccessibleName = Properties.Strings.GPUMode + ": " + Properties.Strings.UltimateMode;
Program.trayIcon.Icon = Properties.Resources.ultimate; Program.trayIcon.Icon = Properties.Resources.ultimate;
break; break;
default: default:
@@ -1394,10 +1396,13 @@ namespace GHelper
buttonStandard.Activated = !GPUAuto; buttonStandard.Activated = !GPUAuto;
buttonOptimized.Activated = GPUAuto; buttonOptimized.Activated = GPUAuto;
labelGPU.Text = Properties.Strings.GPUMode + ": " + Properties.Strings.GPUModeStandard; labelGPU.Text = Properties.Strings.GPUMode + ": " + Properties.Strings.GPUModeStandard;
panelGPU.AccessibleName = Properties.Strings.GPUMode + ": " + (GPUAuto ? Properties.Strings.Optimized : Properties.Strings.StandardMode);
Program.trayIcon.Icon = Properties.Resources.standard; Program.trayIcon.Icon = Properties.Resources.standard;
break; break;
} }
VisualizeXGM(GPUMode); VisualizeXGM(GPUMode);
if (isGpuSection) if (isGpuSection)

View File

@@ -126,7 +126,7 @@ namespace GHelper
buttonRefresh.Name = "buttonRefresh"; buttonRefresh.Name = "buttonRefresh";
buttonRefresh.Secondary = true; buttonRefresh.Secondary = true;
buttonRefresh.Size = new Size(52, 46); buttonRefresh.Size = new Size(52, 46);
buttonRefresh.TabIndex = 3; buttonRefresh.TabIndex = 1;
buttonRefresh.UseVisualStyleBackColor = false; buttonRefresh.UseVisualStyleBackColor = false;
// //
// panelBios // panelBios

View File

@@ -35,10 +35,15 @@ namespace GHelper
(bios, model) = AppConfig.GetBiosAndModel(); (bios, model) = AppConfig.GetBiosAndModel();
buttonRefresh.TabStop = false;
updatesCount = 0; updatesCount = 0;
labelUpdates.ForeColor = colorEco; labelUpdates.ForeColor = colorEco;
labelUpdates.Text = Properties.Strings.NoNewUpdates; labelUpdates.Text = Properties.Strings.NoNewUpdates;
panelBios.AccessibleRole = AccessibleRole.Grouping;
panelBios.AccessibleName = Properties.Strings.NoNewUpdates;
panelBios.TabStop = true;
Text = Properties.Strings.BiosAndDriverUpdates + ": " + model + " " + bios; Text = Properties.Strings.BiosAndDriverUpdates + ": " + model + " " + bios;
labelBIOS.Text = "BIOS"; labelBIOS.Text = "BIOS";
@@ -121,12 +126,17 @@ namespace GHelper
Invoke(delegate Invoke(delegate
{ {
string versionText = driver.version.Replace("latest version at the ", ""); string versionText = driver.version.Replace("latest version at the ", "");
Label versionLabel = new Label { Text = versionText, Anchor = AnchorStyles.Left, AutoSize = true }; LinkLabel versionLabel = new LinkLabel { Text = versionText, Anchor = AnchorStyles.Left, AutoSize = true };
versionLabel.AccessibleName = driver.title;
versionLabel.TabStop = true;
versionLabel.TabIndex = table.RowCount + 1;
versionLabel.Cursor = Cursors.Hand; versionLabel.Cursor = Cursors.Hand;
versionLabel.Font = new Font(versionLabel.Font, FontStyle.Underline); versionLabel.Font = new Font(versionLabel.Font, FontStyle.Underline);
versionLabel.ForeColor = colorEco; versionLabel.LinkColor = colorEco;
versionLabel.Padding = new Padding(5, 5, 5, 5); versionLabel.Padding = new Padding(5, 5, 5, 5);
versionLabel.Click += delegate versionLabel.LinkClicked += delegate
{ {
Process.Start(new ProcessStartInfo(driver.downloadUrl) { UseShellExecute = true }); Process.Start(new ProcessStartInfo(driver.downloadUrl) { UseShellExecute = true });
}; };
@@ -152,18 +162,19 @@ namespace GHelper
public void VisualiseNewDriver(int position, int newer, TableLayoutPanel table) public void VisualiseNewDriver(int position, int newer, TableLayoutPanel table)
{ {
var label = table.GetControlFromPosition(3, position) as Label; var label = table.GetControlFromPosition(3, position) as LinkLabel;
if (label != null) if (label != null)
{ {
Invoke(delegate Invoke(delegate
{ {
if (newer == DRIVER_NEWER) if (newer == DRIVER_NEWER)
{ {
label.AccessibleName = label.AccessibleName + Properties.Strings.NewUpdates;
label.Font = new Font(label.Font, FontStyle.Underline | FontStyle.Bold); label.Font = new Font(label.Font, FontStyle.Underline | FontStyle.Bold);
label.ForeColor = colorTurbo; label.LinkColor = colorTurbo;
} }
if (newer == DRIVER_NOT_FOUND) label.ForeColor = Color.Gray; if (newer == DRIVER_NOT_FOUND) label.LinkColor = Color.Gray;
}); });
} }
@@ -176,6 +187,9 @@ namespace GHelper
labelUpdates.Text = $"{Properties.Strings.NewUpdates}: {updatesCount}"; labelUpdates.Text = $"{Properties.Strings.NewUpdates}: {updatesCount}";
labelUpdates.ForeColor = colorTurbo; labelUpdates.ForeColor = colorTurbo;
labelUpdates.Font = new Font(labelUpdates.Font, FontStyle.Bold); labelUpdates.Font = new Font(labelUpdates.Font, FontStyle.Bold);
panelBios.AccessibleName = labelUpdates.Text;
}); });
} }