mirror of
https://github.com/jkocon/g-helper.git
synced 2026-02-23 13:00:52 +01:00
Compare commits
16 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
0069234563 | ||
|
|
d92a1880ee | ||
|
|
dd72e2b573 | ||
|
|
10714d1002 | ||
|
|
daad1bca53 | ||
|
|
c82ec8a005 | ||
|
|
9fbea0a3d3 | ||
|
|
ed06247206 | ||
|
|
1e7bd816f2 | ||
|
|
592c4aa07a | ||
|
|
59f3aa9af4 | ||
|
|
8df825e250 | ||
|
|
a985cc5bbb | ||
|
|
bd7985e817 | ||
|
|
8706f9f03c | ||
|
|
5c6a587745 |
@@ -90,8 +90,6 @@ namespace Starlight.AnimeMatrix
|
|||||||
//public int FullEvenRows = -1;
|
//public int FullEvenRows = -1;
|
||||||
|
|
||||||
public int dx = 0;
|
public int dx = 0;
|
||||||
//Shifts the whole frame to the left or right to align with the diagonal cut
|
|
||||||
public int frameShiftX = 0;
|
|
||||||
public int MaxColumns = 34;
|
public int MaxColumns = 34;
|
||||||
|
|
||||||
private int frameIndex = 0;
|
private int frameIndex = 0;
|
||||||
@@ -124,7 +122,6 @@ namespace Starlight.AnimeMatrix
|
|||||||
MaxColumns = 39;
|
MaxColumns = 39;
|
||||||
MaxRows = 92;
|
MaxRows = 92;
|
||||||
LedCount = 1711;
|
LedCount = 1711;
|
||||||
frameShiftX = -5;
|
|
||||||
UpdatePageLength = 630;
|
UpdatePageLength = 630;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -189,6 +186,10 @@ namespace Starlight.AnimeMatrix
|
|||||||
return (y + 1) / 2 - 3;
|
return (y + 1) / 2 - 3;
|
||||||
}
|
}
|
||||||
case AnimeType.GU604:
|
case AnimeType.GU604:
|
||||||
|
if (y < 9 && y % 2 == 0)
|
||||||
|
{
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
return (int)Math.Ceiling(Math.Max(0, y - 9) / 2F);
|
return (int)Math.Ceiling(Math.Max(0, y - 9) / 2F);
|
||||||
|
|
||||||
default:
|
default:
|
||||||
@@ -226,6 +227,29 @@ namespace Starlight.AnimeMatrix
|
|||||||
default:
|
default:
|
||||||
return 36 - y / 2;
|
return 36 - y / 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
case AnimeType.GU604:
|
||||||
|
switch (y)
|
||||||
|
{
|
||||||
|
case 0:
|
||||||
|
case 2:
|
||||||
|
case 4:
|
||||||
|
case 6:
|
||||||
|
case 8:
|
||||||
|
return 38;
|
||||||
|
|
||||||
|
case 1:
|
||||||
|
case 3:
|
||||||
|
case 5:
|
||||||
|
case 7:
|
||||||
|
case 9:
|
||||||
|
return 39;
|
||||||
|
|
||||||
|
default:
|
||||||
|
return Width(y) - FirstX(y);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
default:
|
default:
|
||||||
return Width(y) - FirstX(y);
|
return Width(y) - FirstX(y);
|
||||||
}
|
}
|
||||||
@@ -246,7 +270,7 @@ namespace Starlight.AnimeMatrix
|
|||||||
if (!IsRowInRange(y)) return;
|
if (!IsRowInRange(y)) return;
|
||||||
|
|
||||||
if (x >= FirstX(y) && x < Width(y))
|
if (x >= FirstX(y) && x < Width(y))
|
||||||
SetLedLinear(RowToLinearAddress(y) - FirstX(y) + x + dx + frameShiftX, value);
|
SetLedLinear(RowToLinearAddress(y) - FirstX(y) + x + dx, value);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void WakeUp()
|
public void WakeUp()
|
||||||
|
|||||||
@@ -79,7 +79,6 @@ public static class AppConfig
|
|||||||
|
|
||||||
public static bool ContainsModel(string contains)
|
public static bool ContainsModel(string contains)
|
||||||
{
|
{
|
||||||
|
|
||||||
GetModel();
|
GetModel();
|
||||||
return (_model is not null && _model.ToLower().Contains(contains.ToLower()));
|
return (_model is not null && _model.ToLower().Contains(contains.ToLower()));
|
||||||
}
|
}
|
||||||
@@ -354,7 +353,7 @@ public static class AppConfig
|
|||||||
|
|
||||||
public static bool IsFanRequired()
|
public static bool IsFanRequired()
|
||||||
{
|
{
|
||||||
return ContainsModel("GA402X") || ContainsModel("G513");
|
return ContainsModel("GA402X") || ContainsModel("G513") || ContainsModel("G713R");
|
||||||
}
|
}
|
||||||
|
|
||||||
public static bool IsPowerRequired()
|
public static bool IsPowerRequired()
|
||||||
|
|||||||
@@ -55,7 +55,8 @@ public class AsusACPI
|
|||||||
public const uint GPU_Fan = 0x00110014;
|
public const uint GPU_Fan = 0x00110014;
|
||||||
public const uint Mid_Fan = 0x00110031;
|
public const uint Mid_Fan = 0x00110031;
|
||||||
|
|
||||||
public const uint PerformanceMode = 0x00120075; // Thermal Control
|
public const uint PerformanceMode = 0x00120075; // Performance modes
|
||||||
|
public const uint VivoBookMode = 0x00110019; // Vivobook performance modes
|
||||||
|
|
||||||
public const uint GPUEco = 0x00090020;
|
public const uint GPUEco = 0x00090020;
|
||||||
public const uint GPUXGConnected = 0x00090018;
|
public const uint GPUXGConnected = 0x00090018;
|
||||||
|
|||||||
@@ -797,6 +797,10 @@ namespace GHelper
|
|||||||
private void VisualizeCurrentDPIProfile()
|
private void VisualizeCurrentDPIProfile()
|
||||||
{
|
{
|
||||||
AsusMouseDPI dpi = mouse.DpiSettings[mouse.DpiProfile - 1];
|
AsusMouseDPI dpi = mouse.DpiSettings[mouse.DpiProfile - 1];
|
||||||
|
if (dpi is null)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
sliderDPI.Value = (int)dpi.DPI;
|
sliderDPI.Value = (int)dpi.DPI;
|
||||||
pictureDPIColor.BackColor = dpi.Color;
|
pictureDPIColor.BackColor = dpi.Color;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,8 +1,35 @@
|
|||||||
using System.Runtime.InteropServices;
|
using System.Collections;
|
||||||
|
using System.Runtime.InteropServices;
|
||||||
using static GHelper.Display.ScreenInterrogatory;
|
using static GHelper.Display.ScreenInterrogatory;
|
||||||
|
|
||||||
namespace GHelper.Display
|
namespace GHelper.Display
|
||||||
{
|
{
|
||||||
|
|
||||||
|
class DeviceComparer : IComparer
|
||||||
|
{
|
||||||
|
public int Compare(object x, object y)
|
||||||
|
{
|
||||||
|
uint displayX = ((DISPLAYCONFIG_TARGET_DEVICE_NAME)x).connectorInstance;
|
||||||
|
uint displayY = ((DISPLAYCONFIG_TARGET_DEVICE_NAME)y).connectorInstance;
|
||||||
|
|
||||||
|
if (displayX > displayY)
|
||||||
|
return 1;
|
||||||
|
if (displayX < displayY)
|
||||||
|
return -1;
|
||||||
|
else
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class ScreenComparer : IComparer
|
||||||
|
{
|
||||||
|
public int Compare(object x, object y)
|
||||||
|
{
|
||||||
|
int displayX = Int32.Parse(((Screen)x).DeviceName.Replace(@"\\.\DISPLAY", ""));
|
||||||
|
int displayY = Int32.Parse(((Screen)y).DeviceName.Replace(@"\\.\DISPLAY", ""));
|
||||||
|
return (new CaseInsensitiveComparer()).Compare(displayX, displayY);
|
||||||
|
}
|
||||||
|
}
|
||||||
internal class ScreenNative
|
internal class ScreenNative
|
||||||
{
|
{
|
||||||
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Ansi)]
|
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Ansi)]
|
||||||
@@ -118,38 +145,19 @@ namespace GHelper.Display
|
|||||||
public const int ENUM_CURRENT_SETTINGS = -1;
|
public const int ENUM_CURRENT_SETTINGS = -1;
|
||||||
public const string defaultDevice = @"\\.\DISPLAY1";
|
public const string defaultDevice = @"\\.\DISPLAY1";
|
||||||
|
|
||||||
static bool? _ultimate = null;
|
|
||||||
|
|
||||||
static bool isUltimate
|
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
if (_ultimate is null) _ultimate = (Program.acpi.DeviceGet(AsusACPI.GPUMux) == 0);
|
|
||||||
return (bool)_ultimate;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public static string? FindLaptopScreen(bool log = false)
|
public static string? FindLaptopScreen(bool log = false)
|
||||||
{
|
{
|
||||||
string? laptopScreen = null;
|
string? laptopScreen = null;
|
||||||
var screens = Screen.AllScreens;
|
var screens = Screen.AllScreens;
|
||||||
|
|
||||||
/*
|
|
||||||
if (!isUltimate)
|
|
||||||
{
|
|
||||||
foreach (var screen in screens )
|
|
||||||
{
|
|
||||||
if (log) Logger.WriteLine(screen.DeviceName);
|
|
||||||
if (screen.DeviceName == defaultDevice) return defaultDevice;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
var devices = GetAllDevices().ToArray();
|
var devices = GetAllDevices().ToArray();
|
||||||
|
|
||||||
int count = 0, displayNum = -1;
|
Array.Sort(devices, new DeviceComparer());
|
||||||
|
Array.Sort(screens, new ScreenComparer());
|
||||||
|
|
||||||
|
int count = 0;
|
||||||
|
|
||||||
string internalName = AppConfig.GetString("internal_display");
|
string internalName = AppConfig.GetString("internal_display");
|
||||||
|
|
||||||
@@ -159,21 +167,23 @@ namespace GHelper.Display
|
|||||||
device.outputTechnology == DISPLAYCONFIG_VIDEO_OUTPUT_TECHNOLOGY.DISPLAYCONFIG_OUTPUT_TECHNOLOGY_DISPLAYPORT_EMBEDDED ||
|
device.outputTechnology == DISPLAYCONFIG_VIDEO_OUTPUT_TECHNOLOGY.DISPLAYCONFIG_OUTPUT_TECHNOLOGY_DISPLAYPORT_EMBEDDED ||
|
||||||
device.monitorFriendlyDeviceName == internalName)
|
device.monitorFriendlyDeviceName == internalName)
|
||||||
{
|
{
|
||||||
displayNum = count;
|
|
||||||
AppConfig.Set("internal_display", device.monitorFriendlyDeviceName);
|
AppConfig.Set("internal_display", device.monitorFriendlyDeviceName);
|
||||||
|
|
||||||
|
if (count < screens.Length)
|
||||||
|
{
|
||||||
|
laptopScreen = screens[count].DeviceName;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
laptopScreen = defaultDevice;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (log) Logger.WriteLine(device.monitorFriendlyDeviceName + ":" + device.outputTechnology.ToString() + ": " + ((count < screens.Length) ? screens[count].DeviceName : ""));
|
|
||||||
|
|
||||||
|
if (log) Logger.WriteLine(device.monitorFriendlyDeviceName + ":" + device.outputTechnology.ToString() + device.connectorInstance.ToString() + ": " + ((count < screens.Length) ? screens[count].DeviceName : ""));
|
||||||
count++;
|
count++;
|
||||||
}
|
}
|
||||||
|
|
||||||
count = 0;
|
|
||||||
foreach (var screen in screens)
|
|
||||||
{
|
|
||||||
if (count == displayNum) laptopScreen = screen.DeviceName;
|
|
||||||
count++;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (displayNum > 0 && count == 0) laptopScreen = defaultDevice;
|
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -183,7 +183,6 @@ namespace GHelper
|
|||||||
SetKeyCombo(comboFNF4, textFNF4, "paddle");
|
SetKeyCombo(comboFNF4, textFNF4, "paddle");
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
SetKeyCombo(comboM1, textM1, "m1");
|
SetKeyCombo(comboM1, textM1, "m1");
|
||||||
@@ -197,6 +196,10 @@ namespace GHelper
|
|||||||
SetKeyCombo(comboFNE, textFNE, "fne");
|
SetKeyCombo(comboFNE, textFNE, "fne");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (AppConfig.IsStrix())
|
||||||
|
{
|
||||||
|
labelM4.Text = "M5/ROG";
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
InitTheme();
|
InitTheme();
|
||||||
|
|||||||
@@ -15,7 +15,7 @@
|
|||||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||||
<ProduceReferenceAssembly>False</ProduceReferenceAssembly>
|
<ProduceReferenceAssembly>False</ProduceReferenceAssembly>
|
||||||
<AllowUnsafeBlocks>True</AllowUnsafeBlocks>
|
<AllowUnsafeBlocks>True</AllowUnsafeBlocks>
|
||||||
<AssemblyVersion>0.112</AssemblyVersion>
|
<AssemblyVersion>0.113</AssemblyVersion>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
|
||||||
|
|||||||
@@ -70,7 +70,13 @@ namespace GHelper.Mode
|
|||||||
|
|
||||||
Modes.SetCurrent(mode);
|
Modes.SetCurrent(mode);
|
||||||
|
|
||||||
Program.acpi.DeviceSet(AsusACPI.PerformanceMode, AppConfig.IsManualModeRequired() ? AsusACPI.PerformanceManual : Modes.GetBase(mode), "Mode");
|
int status = Program.acpi.DeviceSet(AsusACPI.PerformanceMode, AppConfig.IsManualModeRequired() ? AsusACPI.PerformanceManual : Modes.GetBase(mode), "Mode");
|
||||||
|
|
||||||
|
// Vivobook fallback
|
||||||
|
if (status != 1)
|
||||||
|
{
|
||||||
|
Program.acpi.DeviceSet(AsusACPI.VivoBookMode, Modes.GetBase(mode), "VivoMode");
|
||||||
|
}
|
||||||
|
|
||||||
if (AppConfig.Is("xgm_fan") && Program.acpi.IsXGConnected()) AsusUSB.ResetXGM();
|
if (AppConfig.Is("xgm_fan") && Program.acpi.IsXGConnected()) AsusUSB.ResetXGM();
|
||||||
|
|
||||||
|
|||||||
106
app/Peripherals/Mouse/Models/KerisWirelssAimpoint.cs
Normal file
106
app/Peripherals/Mouse/Models/KerisWirelssAimpoint.cs
Normal file
@@ -0,0 +1,106 @@
|
|||||||
|
namespace GHelper.Peripherals.Mouse.Models
|
||||||
|
{
|
||||||
|
//P709_Wireless
|
||||||
|
public class KerisWirelssAimpoint : AsusMouse
|
||||||
|
{
|
||||||
|
public KerisWirelssAimpoint() : base(0x0B05, 0x1A68, "mi_00", true)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
protected KerisWirelssAimpoint(ushort vendorId, bool wireless) : base(0x0B05, vendorId, "mi_00", wireless)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
public override int DPIProfileCount()
|
||||||
|
{
|
||||||
|
return 4;
|
||||||
|
}
|
||||||
|
|
||||||
|
public override string GetDisplayName()
|
||||||
|
{
|
||||||
|
return "ROG Keris Wireless Aimpoint (Wireless)";
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public override PollingRate[] SupportedPollingrates()
|
||||||
|
{
|
||||||
|
return new PollingRate[] {
|
||||||
|
PollingRate.PR125Hz,
|
||||||
|
PollingRate.PR250Hz,
|
||||||
|
PollingRate.PR500Hz,
|
||||||
|
PollingRate.PR1000Hz
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
public override int ProfileCount()
|
||||||
|
{
|
||||||
|
return 5;
|
||||||
|
}
|
||||||
|
public override int MaxDPI()
|
||||||
|
{
|
||||||
|
return 36_000;
|
||||||
|
}
|
||||||
|
|
||||||
|
public override bool HasXYDPI()
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
public override bool HasDebounceSetting()
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
public override bool HasLiftOffSetting()
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
public override bool HasRGB()
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
public override LightingZone[] SupportedLightingZones()
|
||||||
|
{
|
||||||
|
return new LightingZone[] { LightingZone.Logo };
|
||||||
|
}
|
||||||
|
|
||||||
|
public override bool HasAutoPowerOff()
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
public override bool HasAngleSnapping()
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
public override bool HasAngleTuning()
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
public override bool HasLowBatteryWarning()
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
public override bool HasDPIColors()
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public class KerisWirelssAimpointWired : KerisWirelssAimpoint
|
||||||
|
{
|
||||||
|
public KerisWirelssAimpointWired() : base(0x1A66, false)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
public override string GetDisplayName()
|
||||||
|
{
|
||||||
|
return "ROG Keris Wireless Aimpoint (Wired)";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -197,6 +197,8 @@ namespace GHelper.Peripherals
|
|||||||
DetectMouse(new GladiusIII());
|
DetectMouse(new GladiusIII());
|
||||||
DetectMouse(new GladiusIIIWired());
|
DetectMouse(new GladiusIIIWired());
|
||||||
DetectMouse(new TUFM3());
|
DetectMouse(new TUFM3());
|
||||||
|
DetectMouse(new KerisWirelssAimpoint());
|
||||||
|
DetectMouse(new KerisWirelssAimpointWired());
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void DetectMouse(AsusMouse am)
|
public static void DetectMouse(AsusMouse am)
|
||||||
|
|||||||
@@ -133,7 +133,7 @@
|
|||||||
<value>Ультимативний режим потребує перезавантаження</value>
|
<value>Ультимативний режим потребує перезавантаження</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="AlertUltimateTitle" xml:space="preserve">
|
<data name="AlertUltimateTitle" xml:space="preserve">
|
||||||
<value>Перезавантажитися зараз?</value>
|
<value>Перезавантажити зараз?</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="AnimationSpeed" xml:space="preserve">
|
<data name="AnimationSpeed" xml:space="preserve">
|
||||||
<value>Швидкість Анімації</value>
|
<value>Швидкість Анімації</value>
|
||||||
@@ -286,7 +286,7 @@
|
|||||||
<value>Розрядка</value>
|
<value>Розрядка</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="DownloadUpdate" xml:space="preserve">
|
<data name="DownloadUpdate" xml:space="preserve">
|
||||||
<value>Download</value>
|
<value>Завантажити</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="DriverAndSoftware" xml:space="preserve">
|
<data name="DriverAndSoftware" xml:space="preserve">
|
||||||
<value>Драйвери та програми</value>
|
<value>Драйвери та програми</value>
|
||||||
@@ -375,7 +375,7 @@
|
|||||||
<value>Temperature Target</value>
|
<value>Temperature Target</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="HibernateAfter" xml:space="preserve">
|
<data name="HibernateAfter" xml:space="preserve">
|
||||||
<value>Minutes till Hibernation in sleep on battery (0 - OFF)</value>
|
<value>Хвилин до режиму глибокого сну з акумулятором (0 - Вимкнено)</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="High" xml:space="preserve">
|
<data name="High" xml:space="preserve">
|
||||||
<value>Висока</value>
|
<value>Висока</value>
|
||||||
@@ -540,7 +540,7 @@
|
|||||||
<value>Вихід</value>
|
<value>Вихід</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="RestartGPU" xml:space="preserve">
|
<data name="RestartGPU" xml:space="preserve">
|
||||||
<value>Something is using dGPU and preventing Eco mode. Let G-Helper try to restart dGPU in device manager? (Please proceed at your own risk)</value>
|
<value>Щось використовує dGPU та запобігає Еко-режиму. Дозвольте G-Helper спробувати перезапустити dGPU у менеджері пристрою? (Будь ласка, продовжуйте на власний ризик)</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="RPM" xml:space="preserve">
|
<data name="RPM" xml:space="preserve">
|
||||||
<value>Оберти</value>
|
<value>Оберти</value>
|
||||||
|
|||||||
@@ -11,13 +11,13 @@ namespace Ryzen
|
|||||||
internal class RyzenControl
|
internal class RyzenControl
|
||||||
{
|
{
|
||||||
|
|
||||||
public const int MinCPUUV = -30;
|
public static int MinCPUUV => AppConfig.Get("min_uv", -30);
|
||||||
public const int MaxCPUUV = 0;
|
public const int MaxCPUUV = 0;
|
||||||
|
|
||||||
public const int MinIGPUUV = -20;
|
public const int MinIGPUUV = -20;
|
||||||
public const int MaxIGPUUV = 0;
|
public const int MaxIGPUUV = 0;
|
||||||
|
|
||||||
public const int MinTemp = 75;
|
public static int MinTemp => AppConfig.Get("min_temp", 75);
|
||||||
public const int MaxTemp = 98;
|
public const int MaxTemp = 98;
|
||||||
|
|
||||||
public static string[] FAM = { "RAVEN", "PICASSO", "DALI", "RENOIR/LUCIENNE", "MATISSE", "VANGOGH", "VERMEER", "CEZANNE/BARCELO", "REMBRANDT", "PHOENIX", "RAPHAEL/DRAGON RANGE" };
|
public static string[] FAM = { "RAVEN", "PICASSO", "DALI", "RENOIR/LUCIENNE", "MATISSE", "VANGOGH", "VERMEER", "CEZANNE/BARCELO", "REMBRANDT", "PHOENIX", "RAPHAEL/DRAGON RANGE" };
|
||||||
|
|||||||
@@ -376,7 +376,7 @@ namespace GHelper
|
|||||||
//contextMenuStrip.ShowCheckMargin = true;
|
//contextMenuStrip.ShowCheckMargin = true;
|
||||||
contextMenuStrip.RenderMode = ToolStripRenderMode.System;
|
contextMenuStrip.RenderMode = ToolStripRenderMode.System;
|
||||||
|
|
||||||
if (CheckSystemDarkModeStatus())
|
if (darkTheme)
|
||||||
{
|
{
|
||||||
contextMenuStrip.BackColor = this.BackColor;
|
contextMenuStrip.BackColor = this.BackColor;
|
||||||
contextMenuStrip.ForeColor = this.ForeColor;
|
contextMenuStrip.ForeColor = this.ForeColor;
|
||||||
|
|||||||
@@ -71,7 +71,7 @@ namespace GHelper.UI
|
|||||||
|
|
||||||
public bool InitTheme(bool setDPI = false)
|
public bool InitTheme(bool setDPI = false)
|
||||||
{
|
{
|
||||||
bool newDarkTheme = CheckSystemDarkModeStatus();
|
bool newDarkTheme = IsDarkTheme();
|
||||||
bool changed = darkTheme != newDarkTheme;
|
bool changed = darkTheme != newDarkTheme;
|
||||||
darkTheme = newDarkTheme;
|
darkTheme = newDarkTheme;
|
||||||
|
|
||||||
|
|||||||
106
app/Updates.cs
106
app/Updates.cs
@@ -7,7 +7,7 @@ using System.Text.Json;
|
|||||||
namespace GHelper
|
namespace GHelper
|
||||||
{
|
{
|
||||||
|
|
||||||
struct DriverDownload
|
public struct DriverDownload
|
||||||
{
|
{
|
||||||
public string categoryName;
|
public string categoryName;
|
||||||
public string title;
|
public string title;
|
||||||
@@ -140,7 +140,63 @@ namespace GHelper
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public async void DriversAsync(string url, int type, TableLayoutPanel table)
|
public void VisualiseDriver(DriverDownload driver, TableLayoutPanel table)
|
||||||
|
{
|
||||||
|
Invoke(delegate
|
||||||
|
{
|
||||||
|
string versionText = driver.version.Replace("latest version at the ", "");
|
||||||
|
Label versionLabel = new Label { Text = versionText, Anchor = AnchorStyles.Left, AutoSize = true };
|
||||||
|
versionLabel.Cursor = Cursors.Hand;
|
||||||
|
versionLabel.Font = new Font(versionLabel.Font, FontStyle.Underline);
|
||||||
|
versionLabel.ForeColor = colorEco;
|
||||||
|
versionLabel.Padding = new Padding(5, 5, 5, 5);
|
||||||
|
versionLabel.Click += delegate
|
||||||
|
{
|
||||||
|
Process.Start(new ProcessStartInfo(driver.downloadUrl) { UseShellExecute = true });
|
||||||
|
};
|
||||||
|
|
||||||
|
table.RowStyles.Add(new RowStyle(SizeType.AutoSize));
|
||||||
|
table.Controls.Add(new Label { Text = driver.categoryName, Anchor = AnchorStyles.Left, Dock = DockStyle.Fill, Padding = new Padding(5, 5, 5, 5) }, 0, table.RowCount);
|
||||||
|
table.Controls.Add(new Label { Text = driver.title, Anchor = AnchorStyles.Left, Dock = DockStyle.Fill, Padding = new Padding(5, 5, 5, 5) }, 1, table.RowCount);
|
||||||
|
table.Controls.Add(versionLabel, 2, table.RowCount);
|
||||||
|
table.RowCount++;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
public void ShowTable(TableLayoutPanel table)
|
||||||
|
{
|
||||||
|
Invoke(delegate
|
||||||
|
{
|
||||||
|
table.Visible = true;
|
||||||
|
ResumeLayout(false);
|
||||||
|
PerformLayout();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
public void VisualiseNewDriver(int position, TableLayoutPanel table)
|
||||||
|
{
|
||||||
|
var label = table.GetControlFromPosition(2, position) as Label;
|
||||||
|
if (label != null)
|
||||||
|
{
|
||||||
|
Invoke(delegate
|
||||||
|
{
|
||||||
|
label.Font = new Font(label.Font, FontStyle.Underline | FontStyle.Bold);
|
||||||
|
label.ForeColor = colorTurbo;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public void VisualiseNewCount(int updatesCount, TableLayoutPanel table)
|
||||||
|
{
|
||||||
|
Invoke(delegate
|
||||||
|
{
|
||||||
|
labelUpdates.Text = $"{Properties.Strings.NewUpdates}: {updatesCount}";
|
||||||
|
labelUpdates.ForeColor = colorTurbo;
|
||||||
|
labelUpdates.Font = new Font(labelUpdates.Font, FontStyle.Bold);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
public async void DriversAsync(string url, int type, TableLayoutPanel table)
|
||||||
{
|
{
|
||||||
|
|
||||||
try
|
try
|
||||||
@@ -185,39 +241,14 @@ namespace GHelper
|
|||||||
driver.hardwares = file.GetProperty("HardwareInfoList");
|
driver.hardwares = file.GetProperty("HardwareInfoList");
|
||||||
drivers.Add(driver);
|
drivers.Add(driver);
|
||||||
|
|
||||||
|
VisualiseDriver(driver, table);
|
||||||
Invoke(delegate
|
|
||||||
{
|
|
||||||
string versionText = driver.version.Replace("latest version at the ", "");
|
|
||||||
Label versionLabel = new Label { Text = versionText, Anchor = AnchorStyles.Left, AutoSize = true };
|
|
||||||
versionLabel.Cursor = Cursors.Hand;
|
|
||||||
versionLabel.Font = new Font(versionLabel.Font, FontStyle.Underline);
|
|
||||||
versionLabel.ForeColor = colorEco;
|
|
||||||
versionLabel.Padding = new Padding(5, 5, 5, 5);
|
|
||||||
versionLabel.Click += delegate
|
|
||||||
{
|
|
||||||
Process.Start(new ProcessStartInfo(driver.downloadUrl) { UseShellExecute = true });
|
|
||||||
};
|
|
||||||
|
|
||||||
table.RowStyles.Add(new RowStyle(SizeType.AutoSize));
|
|
||||||
table.Controls.Add(new Label { Text = driver.categoryName, Anchor = AnchorStyles.Left, Dock = DockStyle.Fill, Padding = new Padding(5, 5, 5, 5) }, 0, table.RowCount);
|
|
||||||
table.Controls.Add(new Label { Text = driver.title, Anchor = AnchorStyles.Left, Dock = DockStyle.Fill, Padding = new Padding(5, 5, 5, 5) }, 1, table.RowCount);
|
|
||||||
table.Controls.Add(versionLabel, 2, table.RowCount);
|
|
||||||
table.RowCount++;
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
oldTitle = title;
|
oldTitle = title;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ShowTable(table);
|
||||||
Invoke(delegate
|
|
||||||
{
|
|
||||||
table.Visible = true;
|
|
||||||
ResumeLayout(false);
|
|
||||||
PerformLayout();
|
|
||||||
});
|
|
||||||
|
|
||||||
|
|
||||||
Dictionary<string, string> devices = new();
|
Dictionary<string, string> devices = new();
|
||||||
@@ -246,20 +277,9 @@ namespace GHelper
|
|||||||
|
|
||||||
if (newer > 0)
|
if (newer > 0)
|
||||||
{
|
{
|
||||||
var label = table.GetControlFromPosition(2, count) as Label;
|
updatesCount++;
|
||||||
if (label != null)
|
VisualiseNewDriver(count, table);
|
||||||
{
|
VisualiseNewCount(updatesCount, table);
|
||||||
Invoke(delegate
|
|
||||||
{
|
|
||||||
updatesCount++;
|
|
||||||
label.Font = new Font(label.Font, FontStyle.Underline | FontStyle.Bold);
|
|
||||||
label.ForeColor = colorTurbo;
|
|
||||||
|
|
||||||
labelUpdates.Text = $"{Properties.Strings.NewUpdates}: {updatesCount}";
|
|
||||||
labelUpdates.ForeColor = colorTurbo;
|
|
||||||
labelUpdates.Font = new Font(label.Font, FontStyle.Bold);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
count++;
|
count++;
|
||||||
|
|||||||
@@ -79,6 +79,7 @@ Stop ``ArmouryCrateControlInterface`` service under windows Services app or you
|
|||||||
|
|
||||||
#### Battery charge limiter is not working
|
#### Battery charge limiter is not working
|
||||||
It could be that Asus services are overwriting this limit after. You may want to stop them by clicking "Stop" in the Asus Services section (under Extra).
|
It could be that Asus services are overwriting this limit after. You may want to stop them by clicking "Stop" in the Asus Services section (under Extra).
|
||||||
|
Please note: For some devices not every charge limit % may be working. Try to set standard **80%** to be sure.
|
||||||
|
|
||||||
#### I don't see GPU modes section
|
#### I don't see GPU modes section
|
||||||
Some older models (for example G14 2020) don't support disabling GPU on hardware level, therefore GPU section makes no sense for them and will be hidden
|
Some older models (for example G14 2020) don't support disabling GPU on hardware level, therefore GPU section makes no sense for them and will be hidden
|
||||||
|
|||||||
Reference in New Issue
Block a user