mirror of
https://github.com/jkocon/g-helper.git
synced 2026-02-23 13:00:52 +01:00
Matrix tweaks
This commit is contained in:
@@ -26,7 +26,7 @@ namespace GHelper.AnimeMatrix
|
|||||||
try
|
try
|
||||||
{
|
{
|
||||||
mat = new AnimeMatrixDevice();
|
mat = new AnimeMatrixDevice();
|
||||||
//Task.Run(mat.WakeUp);
|
Task.Run(mat.WakeUp);
|
||||||
matrixTimer = new System.Timers.Timer(100);
|
matrixTimer = new System.Timers.Timer(100);
|
||||||
matrixTimer.Elapsed += MatrixTimer_Elapsed;
|
matrixTimer.Elapsed += MatrixTimer_Elapsed;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -16,7 +16,7 @@
|
|||||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||||
<ProduceReferenceAssembly>False</ProduceReferenceAssembly>
|
<ProduceReferenceAssembly>False</ProduceReferenceAssembly>
|
||||||
<AllowUnsafeBlocks>True</AllowUnsafeBlocks>
|
<AllowUnsafeBlocks>True</AllowUnsafeBlocks>
|
||||||
<AssemblyVersion>0.67</AssemblyVersion>
|
<AssemblyVersion>0.68</AssemblyVersion>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
|
||||||
|
|||||||
@@ -710,14 +710,6 @@ public class NativeMethods
|
|||||||
int iRet = NativeMethods.ChangeDisplaySettingsEx(laptopScreen, ref dm, IntPtr.Zero, DisplaySettingsFlags.CDS_UPDATEREGISTRY, IntPtr.Zero);
|
int iRet = NativeMethods.ChangeDisplaySettingsEx(laptopScreen, ref dm, IntPtr.Zero, DisplaySettingsFlags.CDS_UPDATEREGISTRY, IntPtr.Zero);
|
||||||
Logger.WriteLine("Screen = " + frequency.ToString() + "Hz : " + (iRet == 0 ? "OK" : iRet));
|
Logger.WriteLine("Screen = " + frequency.ToString() + "Hz : " + (iRet == 0 ? "OK" : iRet));
|
||||||
|
|
||||||
// Retry as refresh rate can fail sometimes
|
|
||||||
if (iRet == -1)
|
|
||||||
{
|
|
||||||
Thread.Sleep(500);
|
|
||||||
iRet = NativeMethods.ChangeDisplaySettingsEx(laptopScreen, ref dm, IntPtr.Zero, DisplaySettingsFlags.CDS_UPDATEREGISTRY, IntPtr.Zero);
|
|
||||||
Logger.WriteLine("Screen = " + frequency.ToString() + "Hz : " + (iRet == 0 ? "OK" : iRet));
|
|
||||||
}
|
|
||||||
|
|
||||||
return iRet;
|
return iRet;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -44,7 +44,7 @@ namespace GHelper
|
|||||||
Thread.CurrentThread.CurrentUICulture = CultureInfo.CurrentUICulture;
|
Thread.CurrentThread.CurrentUICulture = CultureInfo.CurrentUICulture;
|
||||||
Debug.WriteLine(CultureInfo.CurrentUICulture);
|
Debug.WriteLine(CultureInfo.CurrentUICulture);
|
||||||
|
|
||||||
//Thread.CurrentThread.CurrentUICulture = CultureInfo.CreateSpecificCulture("zh");
|
//Thread.CurrentThread.CurrentUICulture = CultureInfo.CreateSpecificCulture("fr");
|
||||||
|
|
||||||
CheckProcesses();
|
CheckProcesses();
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,64 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<root>
|
<root>
|
||||||
|
<!--
|
||||||
|
Microsoft ResX Schema
|
||||||
|
|
||||||
|
Version 2.0
|
||||||
|
|
||||||
|
The primary goals of this format is to allow a simple XML format
|
||||||
|
that is mostly human readable. The generation and parsing of the
|
||||||
|
various data types are done through the TypeConverter classes
|
||||||
|
associated with the data types.
|
||||||
|
|
||||||
|
Example:
|
||||||
|
|
||||||
|
... ado.net/XML headers & schema ...
|
||||||
|
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||||
|
<resheader name="version">2.0</resheader>
|
||||||
|
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||||
|
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||||
|
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||||
|
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||||
|
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||||
|
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||||
|
</data>
|
||||||
|
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||||
|
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||||
|
<comment>This is a comment</comment>
|
||||||
|
</data>
|
||||||
|
|
||||||
|
There are any number of "resheader" rows that contain simple
|
||||||
|
name/value pairs.
|
||||||
|
|
||||||
|
Each data row contains a name, and value. The row also contains a
|
||||||
|
type or mimetype. Type corresponds to a .NET class that support
|
||||||
|
text/value conversion through the TypeConverter architecture.
|
||||||
|
Classes that don't support this are serialized and stored with the
|
||||||
|
mimetype set.
|
||||||
|
|
||||||
|
The mimetype is used for serialized objects, and tells the
|
||||||
|
ResXResourceReader how to depersist the object. This is currently not
|
||||||
|
extensible. For a given mimetype the value must be set accordingly:
|
||||||
|
|
||||||
|
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||||
|
that the ResXResourceWriter will generate, however the reader can
|
||||||
|
read any of the formats listed below.
|
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.binary.base64
|
||||||
|
value : The object must be serialized with
|
||||||
|
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.soap.base64
|
||||||
|
value : The object must be serialized with
|
||||||
|
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||||
|
value : The object must be serialized into a byte array
|
||||||
|
: using a System.ComponentModel.TypeConverter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
-->
|
||||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||||
<xsd:element name="root" msdata:IsDataSet="true">
|
<xsd:element name="root" msdata:IsDataSet="true">
|
||||||
@@ -89,10 +148,10 @@
|
|||||||
<value>G-Helper est déjà en cours d'exécution. Vérifiez la barre d'état du système</value>
|
<value>G-Helper est déjà en cours d'exécution. Vérifiez la barre d'état du système</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="ApplyFanCurve" xml:space="preserve">
|
<data name="ApplyFanCurve" xml:space="preserve">
|
||||||
<value>Appliquer la courbe de ventilateur personnalisée</value>
|
<value>Appliquer le profil</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="ApplyPowerLimits" xml:space="preserve">
|
<data name="ApplyPowerLimits" xml:space="preserve">
|
||||||
<value>Appliquer les limites de performance</value>
|
<value>Appliquer les limites</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="ApplyWindowsPowerPlan" xml:space="preserve">
|
<data name="ApplyWindowsPowerPlan" xml:space="preserve">
|
||||||
<value>Ajuster automatiquement les modes de Performance Windows</value>
|
<value>Ajuster automatiquement les modes de Performance Windows</value>
|
||||||
@@ -134,7 +193,7 @@
|
|||||||
<value>Balancé</value>
|
<value>Balancé</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="BatteryChargeLimit" xml:space="preserve">
|
<data name="BatteryChargeLimit" xml:space="preserve">
|
||||||
<value>Limite de charge de la batterie</value>
|
<value>Limite de charge</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="Boot" xml:space="preserve">
|
<data name="Boot" xml:space="preserve">
|
||||||
<value>Au lancement</value>
|
<value>Au lancement</value>
|
||||||
@@ -188,7 +247,7 @@
|
|||||||
<value>Profil de ventilateur central</value>
|
<value>Profil de ventilateur central</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="FanProfiles" xml:space="preserve">
|
<data name="FanProfiles" xml:space="preserve">
|
||||||
<value>Profil des ventilateurs </value>
|
<value>Profil</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="FansAndPower" xml:space="preserve">
|
<data name="FansAndPower" xml:space="preserve">
|
||||||
<value>Ventilateurs et Puissance</value>
|
<value>Ventilateurs et Puissance</value>
|
||||||
@@ -353,7 +412,7 @@
|
|||||||
<value>Luminosité</value>
|
<value>Luminosité</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="FanSpeed" xml:space="preserve">
|
<data name="FanSpeed" xml:space="preserve">
|
||||||
<value>Ventilateurs :</value>
|
<value>Ventilateurs: </value>
|
||||||
</data>
|
</data>
|
||||||
<data name="GPUBoost" xml:space="preserve">
|
<data name="GPUBoost" xml:space="preserve">
|
||||||
<value>Boost Dynamique</value>
|
<value>Boost Dynamique</value>
|
||||||
|
|||||||
@@ -508,6 +508,7 @@ namespace GHelper
|
|||||||
{
|
{
|
||||||
case 0:
|
case 0:
|
||||||
Logger.WriteLine("Monitor Power Off");
|
Logger.WriteLine("Monitor Power Off");
|
||||||
|
AsusUSB.ApplyBrightness(0);
|
||||||
SetBatteryChargeLimit(AppConfig.getConfig("charge_limit"));
|
SetBatteryChargeLimit(AppConfig.getConfig("charge_limit"));
|
||||||
break;
|
break;
|
||||||
case 1:
|
case 1:
|
||||||
@@ -1311,7 +1312,7 @@ namespace GHelper
|
|||||||
bool optimizedUSBC = AppConfig.getConfig("optimized_usbc") != 1;
|
bool optimizedUSBC = AppConfig.getConfig("optimized_usbc") != 1;
|
||||||
|
|
||||||
return SystemInformation.PowerStatus.PowerLineStatus == PowerLineStatus.Online &&
|
return SystemInformation.PowerStatus.PowerLineStatus == PowerLineStatus.Online &&
|
||||||
(optimizedUSBC || Program.acpi.DeviceGet(AsusACPI.ChargerMode) != AsusACPI.ChargerUSB);
|
(optimizedUSBC || Program.acpi.DeviceGet(AsusACPI.ChargerMode) < AsusACPI.ChargerUSB);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user