mirror of
https://github.com/jkocon/g-helper.git
synced 2026-02-23 13:00:52 +01:00
Merge branch 'seerge:main' into main
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
using System.Drawing.Drawing2D;
|
||||
using System.Diagnostics;
|
||||
using System.Drawing.Drawing2D;
|
||||
|
||||
namespace GHelper.Helpers
|
||||
{
|
||||
@@ -134,6 +135,16 @@ namespace GHelper.Helpers
|
||||
|
||||
}
|
||||
|
||||
public static void ReadText(string text)
|
||||
{
|
||||
ProcessStartInfo startInfo = new ProcessStartInfo();
|
||||
startInfo.FileName = "PowerShell.exe";
|
||||
startInfo.Arguments = $"-Command \"Add-Type -AssemblyName System.Speech; (New-Object System.Speech.Synthesis.SpeechSynthesizer).Speak('{text}')\"";
|
||||
startInfo.CreateNoWindow = true;
|
||||
Process.Start(startInfo);
|
||||
}
|
||||
|
||||
|
||||
public void RunToast(string text, ToastIcon? icon = null)
|
||||
{
|
||||
|
||||
@@ -156,6 +167,14 @@ namespace GHelper.Helpers
|
||||
|
||||
Show();
|
||||
timer.Start();
|
||||
|
||||
//if (AppConfig.Is("narrator")) ReadText(text);
|
||||
|
||||
Program.settingsForm.AccessibilityObject.RaiseAutomationNotification(
|
||||
System.Windows.Forms.Automation.AutomationNotificationKind.ActionCompleted,
|
||||
System.Windows.Forms.Automation.AutomationNotificationProcessing.MostRecent,
|
||||
text);
|
||||
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
@@ -266,7 +266,7 @@ namespace GHelper
|
||||
{
|
||||
// If helper window is not on top, this just focuses on the app again
|
||||
// Pressing the ghelper button again will hide the app
|
||||
if (checkForFocus && !settingsForm.HasAnyFocus(trayClick))
|
||||
if (checkForFocus && !settingsForm.HasAnyFocus(trayClick) && !AppConfig.Is("topmost"))
|
||||
{
|
||||
settingsForm.ShowAll();
|
||||
}
|
||||
|
||||
@@ -145,7 +145,7 @@
|
||||
<value>Redémarrer maintenant ?</value>
|
||||
</data>
|
||||
<data name="AllyController" xml:space="preserve">
|
||||
<value>Ally Controller</value>
|
||||
<value>Contrôleur Ally </value>
|
||||
</data>
|
||||
<data name="AnimationSpeed" xml:space="preserve">
|
||||
<value>Vitesse de l'animation</value>
|
||||
@@ -253,10 +253,10 @@
|
||||
<value>Délai branché / sur batterie (0 - ON)</value>
|
||||
</data>
|
||||
<data name="BacklightTimeoutBattery" xml:space="preserve">
|
||||
<value>Backlight Timeout when on battery</value>
|
||||
<value>Délai de rétro-éclairage sur batterie</value>
|
||||
</data>
|
||||
<data name="BacklightTimeoutPlugged" xml:space="preserve">
|
||||
<value>Backlight Timeout when plugged</value>
|
||||
<value>Délai de rétro-éclairage sur secteur</value>
|
||||
</data>
|
||||
<data name="Balanced" xml:space="preserve">
|
||||
<value>Équilibré</value>
|
||||
@@ -274,13 +274,13 @@
|
||||
<value>Charge unique à 100%</value>
|
||||
</data>
|
||||
<data name="Binding" xml:space="preserve">
|
||||
<value>Binding</value>
|
||||
<value>Liaison</value>
|
||||
</data>
|
||||
<data name="BindingPrimary" xml:space="preserve">
|
||||
<value>Primary</value>
|
||||
<value>Primaire</value>
|
||||
</data>
|
||||
<data name="BindingSecondary" xml:space="preserve">
|
||||
<value>Secondary</value>
|
||||
<value>Secondaire</value>
|
||||
</data>
|
||||
<data name="BiosAndDriverUpdates" xml:space="preserve">
|
||||
<value>Mise à jour BIOS et pilotes</value>
|
||||
@@ -310,10 +310,10 @@
|
||||
<value>Couleur</value>
|
||||
</data>
|
||||
<data name="Contrast" xml:space="preserve">
|
||||
<value>Contrast</value>
|
||||
<value>Contraste</value>
|
||||
</data>
|
||||
<data name="Controller" xml:space="preserve">
|
||||
<value>Controller</value>
|
||||
<value>Contrôleur</value>
|
||||
</data>
|
||||
<data name="CPUBoost" xml:space="preserve">
|
||||
<value>CPU Boost</value>
|
||||
@@ -328,7 +328,7 @@
|
||||
<value>Par défaut</value>
|
||||
</data>
|
||||
<data name="DisableController" xml:space="preserve">
|
||||
<value>Disable Controller</value>
|
||||
<value>Désactiver le contrôleur</value>
|
||||
</data>
|
||||
<data name="DisableOverdrive" xml:space="preserve">
|
||||
<value>Désactiver l'overdrive de l'écran</value>
|
||||
@@ -349,7 +349,7 @@
|
||||
<value>Éco</value>
|
||||
</data>
|
||||
<data name="EnableGPUOnShutdown" xml:space="preserve">
|
||||
<value>Enable GPU on shutdown (prevents issue with Eco mode)</value>
|
||||
<value>Activer le GPU lors de l'arrêt (empêche les problèmes avec le mode Éco)</value>
|
||||
</data>
|
||||
<data name="EnableOptimusText" xml:space="preserve">
|
||||
<value>Désactiver le dGPU en passant au mode Eco pendant que le mode d'affichage dans le panneau de configuration NVIDIA n'est pas réglé sur Optimus peut causer des problèmes avec les commandes de luminosité jusqu'au prochain redémarrage.
|
||||
@@ -363,7 +363,7 @@ Voulez-vous continuer ?</value>
|
||||
<value>Paramètres d'énergie</value>
|
||||
</data>
|
||||
<data name="Export" xml:space="preserve">
|
||||
<value>Export Profile</value>
|
||||
<value>Exporter un profil</value>
|
||||
</data>
|
||||
<data name="Extra" xml:space="preserve">
|
||||
<value>+ d'options</value>
|
||||
@@ -438,10 +438,10 @@ Voulez-vous continuer ?</value>
|
||||
<value>Élevé</value>
|
||||
</data>
|
||||
<data name="ImageRotation" xml:space="preserve">
|
||||
<value>Image Rotation</value>
|
||||
<value>Rotation de l'image</value>
|
||||
</data>
|
||||
<data name="Import" xml:space="preserve">
|
||||
<value>Import Profile</value>
|
||||
<value>Importer un profil</value>
|
||||
</data>
|
||||
<data name="KeyBindings" xml:space="preserve">
|
||||
<value>Raccourcis clavier</value>
|
||||
@@ -477,10 +477,10 @@ Voulez-vous continuer ?</value>
|
||||
<value>Faible</value>
|
||||
</data>
|
||||
<data name="LSDeadzones" xml:space="preserve">
|
||||
<value>Left Stick Deadzones</value>
|
||||
<value>Stick gauche des zones mortes</value>
|
||||
</data>
|
||||
<data name="LTDeadzones" xml:space="preserve">
|
||||
<value>Left Trigger Deadzones</value>
|
||||
<value>Gâchette gauche des zones mortes</value>
|
||||
</data>
|
||||
<data name="MatrixAudio" xml:space="preserve">
|
||||
<value>Visualiseur Audio</value>
|
||||
@@ -528,10 +528,10 @@ Voulez-vous continuer ?</value>
|
||||
<value>Arrêt automatique après</value>
|
||||
</data>
|
||||
<data name="MouseButtonResponse" xml:space="preserve">
|
||||
<value>Button Response</value>
|
||||
<value>Réponse du bouton</value>
|
||||
</data>
|
||||
<data name="MouseImportFailed" xml:space="preserve">
|
||||
<value>Import failed. Selected file is not a valid mouse profile or corrutpted.</value>
|
||||
<value>Échec de l'importation. Le fichier sélectionné n'est pas un profil de souris valide ou corrompu.</value>
|
||||
</data>
|
||||
<data name="MouseLiftOffDistance" xml:space="preserve">
|
||||
<value>Lift Off Distance</value>
|
||||
@@ -567,7 +567,7 @@ Voulez-vous continuer ?</value>
|
||||
<value>Non connecté</value>
|
||||
</data>
|
||||
<data name="OneZone" xml:space="preserve">
|
||||
<value>One Zone</value>
|
||||
<value>Une zone</value>
|
||||
</data>
|
||||
<data name="OpenGHelper" xml:space="preserve">
|
||||
<value>Ouvrir G-Helper</value>
|
||||
@@ -600,7 +600,7 @@ Voulez-vous continuer ?</value>
|
||||
<value>Lecture / Pause</value>
|
||||
</data>
|
||||
<data name="PollingRate" xml:space="preserve">
|
||||
<value>Polling Rate</value>
|
||||
<value>Fréquence d'interrogation</value>
|
||||
</data>
|
||||
<data name="PowerLimits" xml:space="preserve">
|
||||
<value>Limites de puissance</value>
|
||||
@@ -618,7 +618,7 @@ Voulez-vous continuer ?</value>
|
||||
<value>Quitter</value>
|
||||
</data>
|
||||
<data name="Reset" xml:space="preserve">
|
||||
<value>Reset</value>
|
||||
<value>Réinitialiser</value>
|
||||
</data>
|
||||
<data name="RestartGPU" xml:space="preserve">
|
||||
<value>Un programme utilise le dGPU et empêche le passage en mode Éco. Laissez G-Helper tenter un redémarrage du dGPU dans le gestionnaire de tâches ? (Procéder à vos propres risques)</value>
|
||||
@@ -627,16 +627,16 @@ Voulez-vous continuer ?</value>
|
||||
<value> RPM</value>
|
||||
</data>
|
||||
<data name="RSDeadzones" xml:space="preserve">
|
||||
<value>Right Stick Deadzones</value>
|
||||
<value>Stick droit des zones mortes</value>
|
||||
</data>
|
||||
<data name="RTDeadzones" xml:space="preserve">
|
||||
<value>Right Trigger Deadzones</value>
|
||||
<value>Gâchette droite des zones mortes</value>
|
||||
</data>
|
||||
<data name="RunOnStartup" xml:space="preserve">
|
||||
<value>Exécuter au démarrage</value>
|
||||
</data>
|
||||
<data name="ScalingQuality" xml:space="preserve">
|
||||
<value>Scaling Quality</value>
|
||||
<value>Qualité de Mise à l'échelle (Scaling)</value>
|
||||
</data>
|
||||
<data name="ScreenPadDown" xml:space="preserve">
|
||||
<value>Baisser la luminosité du Screenpad</value>
|
||||
@@ -717,7 +717,7 @@ Voulez-vous continuer ?</value>
|
||||
<value>Version </value>
|
||||
</data>
|
||||
<data name="VibrationStrength" xml:space="preserve">
|
||||
<value>Vibration Strength</value>
|
||||
<value>Intensité de la vibration</value>
|
||||
</data>
|
||||
<data name="VolumeDown" xml:space="preserve">
|
||||
<value>Vol-</value>
|
||||
|
||||
@@ -1382,11 +1382,13 @@ namespace GHelper
|
||||
buttonEco.Activated = !GPUAuto;
|
||||
buttonOptimized.Activated = GPUAuto;
|
||||
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;
|
||||
break;
|
||||
case AsusACPI.GPUModeUltimate:
|
||||
buttonUltimate.Activated = true;
|
||||
labelGPU.Text = Properties.Strings.GPUMode + ": " + Properties.Strings.GPUModeUltimate;
|
||||
panelGPU.AccessibleName = Properties.Strings.GPUMode + " - " + Properties.Strings.UltimateMode;
|
||||
Program.trayIcon.Icon = Properties.Resources.ultimate;
|
||||
break;
|
||||
default:
|
||||
@@ -1394,10 +1396,13 @@ namespace GHelper
|
||||
buttonStandard.Activated = !GPUAuto;
|
||||
buttonOptimized.Activated = GPUAuto;
|
||||
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;
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
|
||||
VisualizeXGM(GPUMode);
|
||||
|
||||
if (isGpuSection)
|
||||
|
||||
@@ -4,6 +4,7 @@ namespace GHelper.UI
|
||||
{
|
||||
public class RButton : Button
|
||||
{
|
||||
|
||||
//Fields
|
||||
private int borderSize = 5;
|
||||
|
||||
|
||||
@@ -28,7 +28,15 @@ namespace GHelper.UI
|
||||
private static extern int DwmSetWindowAttribute(nint hwnd, int attr, int[] attrValue, int attrSize);
|
||||
|
||||
public bool darkTheme = false;
|
||||
|
||||
protected override CreateParams CreateParams
|
||||
{
|
||||
get
|
||||
{
|
||||
var parms = base.CreateParams;
|
||||
parms.Style &= ~0x02000000; // Turn off WS_CLIPCHILDREN
|
||||
return parms;
|
||||
}
|
||||
}
|
||||
public static void InitColors(bool darkTheme)
|
||||
{
|
||||
if (darkTheme)
|
||||
@@ -98,8 +106,10 @@ namespace GHelper.UI
|
||||
{
|
||||
DwmSetWindowAttribute(Handle, 20, new[] { darkTheme ? 1 : 0 }, 4);
|
||||
ControlHelper.Adjust(this, changed);
|
||||
this.Invalidate();
|
||||
}
|
||||
|
||||
|
||||
return changed;
|
||||
|
||||
}
|
||||
|
||||
2
app/Updates.Designer.cs
generated
2
app/Updates.Designer.cs
generated
@@ -126,7 +126,7 @@ namespace GHelper
|
||||
buttonRefresh.Name = "buttonRefresh";
|
||||
buttonRefresh.Secondary = true;
|
||||
buttonRefresh.Size = new Size(52, 46);
|
||||
buttonRefresh.TabIndex = 3;
|
||||
buttonRefresh.TabIndex = 1;
|
||||
buttonRefresh.UseVisualStyleBackColor = false;
|
||||
//
|
||||
// panelBios
|
||||
|
||||
@@ -35,10 +35,15 @@ namespace GHelper
|
||||
|
||||
(bios, model) = AppConfig.GetBiosAndModel();
|
||||
|
||||
buttonRefresh.TabStop = false;
|
||||
|
||||
updatesCount = 0;
|
||||
labelUpdates.ForeColor = colorEco;
|
||||
labelUpdates.Text = Properties.Strings.NoNewUpdates;
|
||||
|
||||
panelBios.AccessibleRole = AccessibleRole.Grouping;
|
||||
panelBios.AccessibleName = Properties.Strings.NoNewUpdates;
|
||||
panelBios.TabStop = true;
|
||||
|
||||
Text = Properties.Strings.BiosAndDriverUpdates + ": " + model + " " + bios;
|
||||
labelBIOS.Text = "BIOS";
|
||||
@@ -121,12 +126,17 @@ namespace GHelper
|
||||
Invoke(delegate
|
||||
{
|
||||
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.Font = new Font(versionLabel.Font, FontStyle.Underline);
|
||||
versionLabel.ForeColor = colorEco;
|
||||
versionLabel.LinkColor = colorEco;
|
||||
versionLabel.Padding = new Padding(5, 5, 5, 5);
|
||||
versionLabel.Click += delegate
|
||||
versionLabel.LinkClicked += delegate
|
||||
{
|
||||
Process.Start(new ProcessStartInfo(driver.downloadUrl) { UseShellExecute = true });
|
||||
};
|
||||
@@ -152,18 +162,19 @@ namespace GHelper
|
||||
|
||||
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)
|
||||
{
|
||||
Invoke(delegate
|
||||
{
|
||||
if (newer == DRIVER_NEWER)
|
||||
{
|
||||
label.AccessibleName = label.AccessibleName + Properties.Strings.NewUpdates;
|
||||
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.ForeColor = colorTurbo;
|
||||
labelUpdates.Font = new Font(labelUpdates.Font, FontStyle.Bold);
|
||||
|
||||
panelBios.AccessibleName = labelUpdates.Text;
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user