mirror of
https://github.com/jkocon/g-helper.git
synced 2026-02-23 13:00:52 +01:00
Compare commits
20 Commits
slash_ligh
...
gamma
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
2939aa4c43 | ||
|
|
4fd087b19b | ||
|
|
062301555c | ||
|
|
744b304d4b | ||
|
|
4863946ca3 | ||
|
|
6f0c92e55d | ||
|
|
b3711f005f | ||
|
|
03bff51850 | ||
|
|
cf84fa0616 | ||
|
|
42a598f177 | ||
|
|
ebfb9b3875 | ||
|
|
60c4e08347 | ||
|
|
e98cd2f5c1 | ||
|
|
697b5f0d2f | ||
|
|
b638382799 | ||
|
|
5f6afc0c6e | ||
|
|
8de06ce5ad | ||
|
|
85725fb782 | ||
|
|
d2cb6965e0 | ||
|
|
3f8083be50 |
@@ -389,6 +389,11 @@ public static class AppConfig
|
|||||||
return ContainsModel("GA503") || IsSlash();
|
return ContainsModel("GA503") || IsSlash();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static bool IsOLED()
|
||||||
|
{
|
||||||
|
return ContainsModel("OLED") || IsSlash() || ContainsModel("UX64") || ContainsModel("UX34") || ContainsModel("K360") || ContainsModel("X150");
|
||||||
|
}
|
||||||
|
|
||||||
public static bool IsStrix()
|
public static bool IsStrix()
|
||||||
{
|
{
|
||||||
return ContainsModel("Strix") || ContainsModel("Scar") || ContainsModel("G703G");
|
return ContainsModel("Strix") || ContainsModel("Scar") || ContainsModel("G703G");
|
||||||
|
|||||||
@@ -46,7 +46,6 @@ public class AsusACPI
|
|||||||
public const int KB_DUO_PgUpDn = 0x4B;
|
public const int KB_DUO_PgUpDn = 0x4B;
|
||||||
public const int KB_DUO_SecondDisplay = 0x6A;
|
public const int KB_DUO_SecondDisplay = 0x6A;
|
||||||
|
|
||||||
|
|
||||||
public const int Touchpad_Toggle = 0x6B;
|
public const int Touchpad_Toggle = 0x6B;
|
||||||
|
|
||||||
public const int ChargerMode = 0x0012006C;
|
public const int ChargerMode = 0x0012006C;
|
||||||
@@ -106,7 +105,7 @@ public class AsusACPI
|
|||||||
public const int TUF_KB2 = 0x0010005a;
|
public const int TUF_KB2 = 0x0010005a;
|
||||||
public const int TUF_KB_STATE = 0x00100057;
|
public const int TUF_KB_STATE = 0x00100057;
|
||||||
|
|
||||||
public const int MICMUTE_LED = 0x00040017;
|
public const int MicMuteLed = 0x00040017;
|
||||||
|
|
||||||
public const int TabletState = 0x00060077;
|
public const int TabletState = 0x00060077;
|
||||||
public const int FnLock = 0x00100023;
|
public const int FnLock = 0x00100023;
|
||||||
@@ -114,6 +113,8 @@ public class AsusACPI
|
|||||||
public const int ScreenPadToggle = 0x00050031;
|
public const int ScreenPadToggle = 0x00050031;
|
||||||
public const int ScreenPadBrightness = 0x00050032;
|
public const int ScreenPadBrightness = 0x00050032;
|
||||||
|
|
||||||
|
public const int CameraLed = 0x00060079;
|
||||||
|
|
||||||
public const int BootSound = 0x00130022;
|
public const int BootSound = 0x00130022;
|
||||||
|
|
||||||
public const int Tablet_Notebook = 0;
|
public const int Tablet_Notebook = 0;
|
||||||
@@ -513,16 +514,25 @@ public class AsusACPI
|
|||||||
default: fan_mode = 0; break;
|
default: fan_mode = 0; break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
byte[] result;
|
||||||
|
|
||||||
switch (device)
|
switch (device)
|
||||||
{
|
{
|
||||||
case AsusFan.GPU:
|
case AsusFan.GPU:
|
||||||
return DeviceGetBuffer(DevsGPUFanCurve, fan_mode);
|
result = DeviceGetBuffer(DevsGPUFanCurve, fan_mode);
|
||||||
|
break;
|
||||||
case AsusFan.Mid:
|
case AsusFan.Mid:
|
||||||
return DeviceGetBuffer(DevsMidFanCurve, fan_mode);
|
result = DeviceGetBuffer(DevsMidFanCurve, fan_mode);
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
return DeviceGetBuffer(DevsCPUFanCurve, fan_mode);
|
result = DeviceGetBuffer(DevsCPUFanCurve, fan_mode);
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Logger.WriteLine($"GetFan {device} :" + BitConverter.ToString(result));
|
||||||
|
|
||||||
|
return result;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public static bool IsInvalidCurve(byte[] curve)
|
public static bool IsInvalidCurve(byte[] curve)
|
||||||
@@ -664,22 +674,32 @@ public class AsusACPI
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void ScanRange()
|
public string ScanRange()
|
||||||
{
|
{
|
||||||
int value;
|
int value;
|
||||||
string appPath = Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) + "\\GHelper";
|
string appPath = Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) + "\\GHelper";
|
||||||
string logFile = appPath + "\\scan.txt";
|
string logFile = appPath + "\\scan.txt";
|
||||||
for (uint i = 0x00000000; i <= 0x00160000; i++)
|
using (StreamWriter w = File.AppendText(logFile))
|
||||||
{
|
{
|
||||||
value = DeviceGet(i);
|
w.WriteLine($"Scan started {DateTime.Now}");
|
||||||
if (value >= 0)
|
for (uint i = 0x00000000; i <= 0x00160000; i += 0x10000)
|
||||||
using (StreamWriter w = File.AppendText(logFile))
|
{
|
||||||
|
for (uint j = 0x00; j <= 0xFF; j++)
|
||||||
{
|
{
|
||||||
w.WriteLine(i.ToString("X8") + ": " + value.ToString("X4") + " (" + value + ")");
|
uint id = i + j;
|
||||||
w.Close();
|
value = DeviceGet(id);
|
||||||
|
if (value >= 0)
|
||||||
|
{
|
||||||
|
w.WriteLine(id.ToString("X8") + ": " + value.ToString("X4") + " (" + value + ")");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
w.WriteLine($"---------------------");
|
||||||
|
w.Close();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return logFile;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void TUFKeyboardBrightness(int brightness)
|
public void TUFKeyboardBrightness(int brightness)
|
||||||
|
|||||||
112
app/Display/DisplayGammaRamp.cs
Normal file
112
app/Display/DisplayGammaRamp.cs
Normal file
@@ -0,0 +1,112 @@
|
|||||||
|
namespace GHelper.Display
|
||||||
|
{
|
||||||
|
|
||||||
|
public class DisplayGammaRamp
|
||||||
|
{
|
||||||
|
|
||||||
|
public DisplayGammaRamp(ushort[] red, ushort[] green, ushort[] blue)
|
||||||
|
{
|
||||||
|
if (red?.Length != GammaRamp.DataPoints)
|
||||||
|
{
|
||||||
|
throw new ArgumentOutOfRangeException(nameof(red));
|
||||||
|
}
|
||||||
|
|
||||||
|
if (green?.Length != GammaRamp.DataPoints)
|
||||||
|
{
|
||||||
|
throw new ArgumentOutOfRangeException(nameof(green));
|
||||||
|
}
|
||||||
|
|
||||||
|
if (blue?.Length != GammaRamp.DataPoints)
|
||||||
|
{
|
||||||
|
throw new ArgumentOutOfRangeException(nameof(blue));
|
||||||
|
}
|
||||||
|
|
||||||
|
Red = red;
|
||||||
|
Green = green;
|
||||||
|
Blue = blue;
|
||||||
|
}
|
||||||
|
|
||||||
|
public DisplayGammaRamp(double brightness = 1, double contrast = 1, double gamma = 1)
|
||||||
|
: this(
|
||||||
|
CalculateLUT(brightness, contrast, gamma),
|
||||||
|
CalculateLUT(brightness, contrast, gamma),
|
||||||
|
CalculateLUT(brightness, contrast, gamma)
|
||||||
|
)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
public DisplayGammaRamp(
|
||||||
|
double redBrightness,
|
||||||
|
double redContrast,
|
||||||
|
double redGamma,
|
||||||
|
double greenBrightness,
|
||||||
|
double greenContrast,
|
||||||
|
double greenGamma,
|
||||||
|
double blueBrightness,
|
||||||
|
double blueContrast,
|
||||||
|
double blueGamma
|
||||||
|
)
|
||||||
|
: this(
|
||||||
|
CalculateLUT(redBrightness, redContrast, redGamma),
|
||||||
|
CalculateLUT(greenBrightness, greenContrast, greenGamma),
|
||||||
|
CalculateLUT(blueBrightness, blueContrast, blueGamma)
|
||||||
|
)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
internal DisplayGammaRamp(GammaRamp ramp) :
|
||||||
|
this(ramp.Red, ramp.Green, ramp.Blue)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
public ushort[] Blue { get; }
|
||||||
|
public ushort[] Green { get; }
|
||||||
|
public ushort[] Red { get; }
|
||||||
|
private static ushort[] CalculateLUT(double brightness, double contrast, double gamma)
|
||||||
|
{
|
||||||
|
brightness = 0.5 + brightness / 2;
|
||||||
|
var result = new ushort[GammaRamp.DataPoints];
|
||||||
|
for (var i = 0; i < result.Length; i++)
|
||||||
|
{
|
||||||
|
result[i] = (ushort)(brightness * ushort.MaxValue * i / (float)(result.Length - 1));
|
||||||
|
}
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
public bool IsOriginal()
|
||||||
|
{
|
||||||
|
int MaxRed = Red[Red.Length - 1];
|
||||||
|
int MaxGreen = Green[Green.Length - 1];
|
||||||
|
int MaxBlue = Blue[Blue.Length - 1];
|
||||||
|
return (Math.Abs((MaxRed + MaxGreen + MaxBlue) / 3 - ushort.MaxValue) < 256);
|
||||||
|
}
|
||||||
|
|
||||||
|
private static ushort[] Brightness(ushort[] data, double brightness)
|
||||||
|
{
|
||||||
|
var result = new ushort[GammaRamp.DataPoints];
|
||||||
|
for (var i = 0; i < result.Length; i++)
|
||||||
|
{
|
||||||
|
if (brightness < 0.5)
|
||||||
|
result[i] = (ushort)(0.5 * ushort.MaxValue * Math.Pow((float)i/(result.Length - 1), 2 - brightness*2));
|
||||||
|
else
|
||||||
|
result[i] = (ushort)(data[i] * brightness);
|
||||||
|
}
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
internal GammaRamp AsBrightnessRamp(double brightness)
|
||||||
|
{
|
||||||
|
return new GammaRamp(
|
||||||
|
Brightness(Red, brightness),
|
||||||
|
Brightness(Green, brightness),
|
||||||
|
Brightness(Blue, brightness)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
internal GammaRamp AsRamp()
|
||||||
|
{
|
||||||
|
return new GammaRamp(Red, Green, Blue);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
56
app/Display/GammaRamp.cs
Normal file
56
app/Display/GammaRamp.cs
Normal file
@@ -0,0 +1,56 @@
|
|||||||
|
using System.Runtime.InteropServices;
|
||||||
|
|
||||||
|
namespace GHelper.Display
|
||||||
|
{
|
||||||
|
|
||||||
|
[StructLayout(LayoutKind.Sequential)]
|
||||||
|
internal struct GammaRamp
|
||||||
|
{
|
||||||
|
public const int DataPoints = 256;
|
||||||
|
|
||||||
|
[MarshalAs(UnmanagedType.ByValArray, SizeConst = DataPoints)]
|
||||||
|
public readonly ushort[] Red;
|
||||||
|
[MarshalAs(UnmanagedType.ByValArray, SizeConst = DataPoints)]
|
||||||
|
public readonly ushort[] Green;
|
||||||
|
[MarshalAs(UnmanagedType.ByValArray, SizeConst = DataPoints)]
|
||||||
|
public readonly ushort[] Blue;
|
||||||
|
|
||||||
|
public GammaRamp(ushort[] red, ushort[] green, ushort[] blue)
|
||||||
|
{
|
||||||
|
if (red == null)
|
||||||
|
{
|
||||||
|
throw new ArgumentNullException(nameof(red));
|
||||||
|
}
|
||||||
|
|
||||||
|
if (green == null)
|
||||||
|
{
|
||||||
|
throw new ArgumentNullException(nameof(green));
|
||||||
|
}
|
||||||
|
|
||||||
|
if (blue == null)
|
||||||
|
{
|
||||||
|
throw new ArgumentNullException(nameof(blue));
|
||||||
|
}
|
||||||
|
|
||||||
|
if (red.Length != DataPoints)
|
||||||
|
{
|
||||||
|
throw new ArgumentOutOfRangeException(nameof(red));
|
||||||
|
}
|
||||||
|
|
||||||
|
if (green.Length != DataPoints)
|
||||||
|
{
|
||||||
|
throw new ArgumentOutOfRangeException(nameof(green));
|
||||||
|
}
|
||||||
|
|
||||||
|
if (blue.Length != DataPoints)
|
||||||
|
{
|
||||||
|
throw new ArgumentOutOfRangeException(nameof(blue));
|
||||||
|
}
|
||||||
|
|
||||||
|
Red = red;
|
||||||
|
Green = green;
|
||||||
|
Blue = blue;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
using System.Diagnostics;
|
using System.Runtime.InteropServices;
|
||||||
|
|
||||||
namespace GHelper.Display
|
namespace GHelper.Display
|
||||||
{
|
{
|
||||||
@@ -7,6 +7,8 @@ namespace GHelper.Display
|
|||||||
|
|
||||||
public const int MAX_REFRESH = 1000;
|
public const int MAX_REFRESH = 1000;
|
||||||
|
|
||||||
|
public static DisplayGammaRamp? gammaRamp;
|
||||||
|
|
||||||
public void AutoScreen(bool force = false)
|
public void AutoScreen(bool force = false)
|
||||||
{
|
{
|
||||||
if (force || AppConfig.Is("screen_auto"))
|
if (force || AppConfig.Is("screen_auto"))
|
||||||
@@ -22,6 +24,70 @@ namespace GHelper.Display
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void SaveGamma()
|
||||||
|
{
|
||||||
|
var screenName = ScreenNative.FindLaptopScreen();
|
||||||
|
if (screenName is null) return;
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
var handle = ScreenNative.CreateDC(screenName, screenName, null, IntPtr.Zero);
|
||||||
|
var gammaRamp = new GammaRamp();
|
||||||
|
if (ScreenNative.GetDeviceGammaRamp(handle, ref gammaRamp))
|
||||||
|
{
|
||||||
|
var gamma = new DisplayGammaRamp(gammaRamp);
|
||||||
|
Logger.WriteLine("Gamma R: " + string.Join("-", gamma.Red));
|
||||||
|
Logger.WriteLine("Gamma G: " + string.Join("-", gamma.Green));
|
||||||
|
Logger.WriteLine("Gamma B: " + string.Join("-", gamma.Blue));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
Logger.WriteLine(ex.ToString());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public void SetGamma(int brightness = 100)
|
||||||
|
{
|
||||||
|
var bright = Math.Round((float)brightness / 200 + 0.5, 2);
|
||||||
|
|
||||||
|
var screenName = ScreenNative.FindLaptopScreen();
|
||||||
|
if (screenName is null) return;
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
var handle = ScreenNative.CreateDC(screenName, screenName, null, IntPtr.Zero);
|
||||||
|
if (gammaRamp is null)
|
||||||
|
{
|
||||||
|
var gammaDump = new GammaRamp();
|
||||||
|
if (ScreenNative.GetDeviceGammaRamp(handle, ref gammaDump))
|
||||||
|
{
|
||||||
|
gammaRamp = new DisplayGammaRamp(gammaDump);
|
||||||
|
Logger.WriteLine("Gamma R: " + string.Join("-", gammaRamp.Red));
|
||||||
|
Logger.WriteLine("Gamma G: " + string.Join("-", gammaRamp.Green));
|
||||||
|
Logger.WriteLine("Gamma B: " + string.Join("-", gammaRamp.Blue));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (gammaRamp is null || !gammaRamp.IsOriginal())
|
||||||
|
{
|
||||||
|
Logger.WriteLine("Default Gamma");
|
||||||
|
gammaRamp = new DisplayGammaRamp();
|
||||||
|
}
|
||||||
|
|
||||||
|
var ramp = gammaRamp.AsBrightnessRamp(bright);
|
||||||
|
bool result = ScreenNative.SetDeviceGammaRamp(handle, ref ramp);
|
||||||
|
|
||||||
|
Logger.WriteLine("Brightness " + bright.ToString() + ": " + result);
|
||||||
|
|
||||||
|
} catch (Exception ex)
|
||||||
|
{
|
||||||
|
Logger.WriteLine(ex.ToString());
|
||||||
|
}
|
||||||
|
|
||||||
|
//ScreenBrightness.Set(60 + (int)(40 * bright));
|
||||||
|
}
|
||||||
|
|
||||||
public void SetScreen(int frequency = -1, int overdrive = -1, int miniled = -1)
|
public void SetScreen(int frequency = -1, int overdrive = -1, int miniled = -1)
|
||||||
{
|
{
|
||||||
var laptopScreen = ScreenNative.FindLaptopScreen(true);
|
var laptopScreen = ScreenNative.FindLaptopScreen(true);
|
||||||
@@ -71,7 +137,8 @@ namespace GHelper.Display
|
|||||||
if (miniled1 >= 0)
|
if (miniled1 >= 0)
|
||||||
{
|
{
|
||||||
miniled = (miniled1 == 1) ? 0 : 1;
|
miniled = (miniled1 == 1) ? 0 : 1;
|
||||||
} else
|
}
|
||||||
|
else
|
||||||
{
|
{
|
||||||
switch (miniled2)
|
switch (miniled2)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -32,6 +32,16 @@ namespace GHelper.Display
|
|||||||
}
|
}
|
||||||
internal class ScreenNative
|
internal class ScreenNative
|
||||||
{
|
{
|
||||||
|
|
||||||
|
[DllImport("gdi32", CharSet = CharSet.Unicode)]
|
||||||
|
internal static extern IntPtr CreateDC(string driver, string device, string port, IntPtr deviceMode);
|
||||||
|
|
||||||
|
[DllImport("gdi32")]
|
||||||
|
internal static extern bool SetDeviceGammaRamp(IntPtr dcHandle, ref GammaRamp ramp);
|
||||||
|
|
||||||
|
[DllImport("gdi32")]
|
||||||
|
internal static extern bool GetDeviceGammaRamp(IntPtr dcHandle, ref GammaRamp ramp);
|
||||||
|
|
||||||
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Ansi)]
|
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Ansi)]
|
||||||
public struct DEVMODE
|
public struct DEVMODE
|
||||||
{
|
{
|
||||||
@@ -146,7 +156,7 @@ namespace GHelper.Display
|
|||||||
public const string defaultDevice = @"\\.\DISPLAY1";
|
public const string defaultDevice = @"\\.\DISPLAY1";
|
||||||
|
|
||||||
|
|
||||||
private static string? FindInternalName(bool log = false)
|
public static string? FindInternalName(bool log = false)
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
|||||||
19
app/Extra.Designer.cs
generated
19
app/Extra.Designer.cs
generated
@@ -120,6 +120,7 @@ namespace GHelper
|
|||||||
comboAPU = new RComboBox();
|
comboAPU = new RComboBox();
|
||||||
pictureAPUMem = new PictureBox();
|
pictureAPUMem = new PictureBox();
|
||||||
labelAPUMem = new Label();
|
labelAPUMem = new Label();
|
||||||
|
pictureScan = new PictureBox();
|
||||||
panelServices.SuspendLayout();
|
panelServices.SuspendLayout();
|
||||||
((System.ComponentModel.ISupportInitialize)pictureService).BeginInit();
|
((System.ComponentModel.ISupportInitialize)pictureService).BeginInit();
|
||||||
panelBindingsHeader.SuspendLayout();
|
panelBindingsHeader.SuspendLayout();
|
||||||
@@ -144,6 +145,7 @@ namespace GHelper
|
|||||||
((System.ComponentModel.ISupportInitialize)pictureHibernate).BeginInit();
|
((System.ComponentModel.ISupportInitialize)pictureHibernate).BeginInit();
|
||||||
panelAPU.SuspendLayout();
|
panelAPU.SuspendLayout();
|
||||||
((System.ComponentModel.ISupportInitialize)pictureAPUMem).BeginInit();
|
((System.ComponentModel.ISupportInitialize)pictureAPUMem).BeginInit();
|
||||||
|
((System.ComponentModel.ISupportInitialize)pictureScan).BeginInit();
|
||||||
SuspendLayout();
|
SuspendLayout();
|
||||||
//
|
//
|
||||||
// panelServices
|
// panelServices
|
||||||
@@ -1003,6 +1005,7 @@ namespace GHelper
|
|||||||
//
|
//
|
||||||
panelSettingsHeader.AutoSize = true;
|
panelSettingsHeader.AutoSize = true;
|
||||||
panelSettingsHeader.BackColor = SystemColors.ControlLight;
|
panelSettingsHeader.BackColor = SystemColors.ControlLight;
|
||||||
|
panelSettingsHeader.Controls.Add(pictureScan);
|
||||||
panelSettingsHeader.Controls.Add(pictureLog);
|
panelSettingsHeader.Controls.Add(pictureLog);
|
||||||
panelSettingsHeader.Controls.Add(pictureSettings);
|
panelSettingsHeader.Controls.Add(pictureSettings);
|
||||||
panelSettingsHeader.Controls.Add(labelSettings);
|
panelSettingsHeader.Controls.Add(labelSettings);
|
||||||
@@ -1263,6 +1266,20 @@ namespace GHelper
|
|||||||
labelAPUMem.TabIndex = 0;
|
labelAPUMem.TabIndex = 0;
|
||||||
labelAPUMem.Text = "Memory Assigned to GPU";
|
labelAPUMem.Text = "Memory Assigned to GPU";
|
||||||
//
|
//
|
||||||
|
// pictureScan
|
||||||
|
//
|
||||||
|
pictureScan.Anchor = AnchorStyles.Top | AnchorStyles.Right;
|
||||||
|
pictureScan.BackgroundImage = Resources.icons8_heartbeat_32;
|
||||||
|
pictureScan.BackgroundImageLayout = ImageLayout.Zoom;
|
||||||
|
pictureScan.Cursor = Cursors.Hand;
|
||||||
|
pictureScan.Location = new Point(891, 11);
|
||||||
|
pictureScan.Margin = new Padding(4, 3, 4, 3);
|
||||||
|
pictureScan.Name = "pictureScan";
|
||||||
|
pictureScan.Size = new Size(32, 32);
|
||||||
|
pictureScan.TabIndex = 13;
|
||||||
|
pictureScan.TabStop = false;
|
||||||
|
pictureScan.Visible = false;
|
||||||
|
//
|
||||||
// Extra
|
// Extra
|
||||||
//
|
//
|
||||||
AutoScaleDimensions = new SizeF(192F, 192F);
|
AutoScaleDimensions = new SizeF(192F, 192F);
|
||||||
@@ -1326,6 +1343,7 @@ namespace GHelper
|
|||||||
panelAPU.ResumeLayout(false);
|
panelAPU.ResumeLayout(false);
|
||||||
panelAPU.PerformLayout();
|
panelAPU.PerformLayout();
|
||||||
((System.ComponentModel.ISupportInitialize)pictureAPUMem).EndInit();
|
((System.ComponentModel.ISupportInitialize)pictureAPUMem).EndInit();
|
||||||
|
((System.ComponentModel.ISupportInitialize)pictureScan).EndInit();
|
||||||
ResumeLayout(false);
|
ResumeLayout(false);
|
||||||
PerformLayout();
|
PerformLayout();
|
||||||
}
|
}
|
||||||
@@ -1420,5 +1438,6 @@ namespace GHelper
|
|||||||
private PictureBox pictureAPUMem;
|
private PictureBox pictureAPUMem;
|
||||||
private Label labelAPUMem;
|
private Label labelAPUMem;
|
||||||
private RComboBox comboAPU;
|
private RComboBox comboAPU;
|
||||||
|
private PictureBox pictureScan;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
13
app/Extra.cs
13
app/Extra.cs
@@ -386,6 +386,7 @@ namespace GHelper
|
|||||||
buttonServices.Click += ButtonServices_Click;
|
buttonServices.Click += ButtonServices_Click;
|
||||||
|
|
||||||
pictureLog.Click += PictureLog_Click;
|
pictureLog.Click += PictureLog_Click;
|
||||||
|
pictureScan.Click += PictureScan_Click;
|
||||||
|
|
||||||
checkGPUFix.Visible = Program.acpi.IsNVidiaGPU();
|
checkGPUFix.Visible = Program.acpi.IsNVidiaGPU();
|
||||||
checkGPUFix.Checked = AppConfig.IsGPUFix();
|
checkGPUFix.Checked = AppConfig.IsGPUFix();
|
||||||
@@ -398,6 +399,18 @@ namespace GHelper
|
|||||||
InitHibernate();
|
InitHibernate();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void PictureScan_Click(object? sender, EventArgs e)
|
||||||
|
{
|
||||||
|
string logFile = Program.acpi.ScanRange();
|
||||||
|
new Process
|
||||||
|
{
|
||||||
|
StartInfo = new ProcessStartInfo(logFile)
|
||||||
|
{
|
||||||
|
UseShellExecute = true
|
||||||
|
}
|
||||||
|
}.Start();
|
||||||
|
}
|
||||||
|
|
||||||
private void ComboAPU_SelectedIndexChanged(object? sender, EventArgs e)
|
private void ComboAPU_SelectedIndexChanged(object? sender, EventArgs e)
|
||||||
{
|
{
|
||||||
int mem = comboAPU.SelectedIndex;
|
int mem = comboAPU.SelectedIndex;
|
||||||
|
|||||||
@@ -953,7 +953,7 @@ namespace GHelper
|
|||||||
int chartCount = 2;
|
int chartCount = 2;
|
||||||
|
|
||||||
// Middle / system fan check
|
// Middle / system fan check
|
||||||
if (!AsusACPI.IsEmptyCurve(Program.acpi.GetFanCurve(AsusFan.Mid)))
|
if (!AsusACPI.IsEmptyCurve(Program.acpi.GetFanCurve(AsusFan.Mid)) || Program.acpi.GetFan(AsusFan.Mid) >= 0)
|
||||||
{
|
{
|
||||||
AppConfig.Set("mid_fan", 1);
|
AppConfig.Set("mid_fan", 1);
|
||||||
chartCount++;
|
chartCount++;
|
||||||
|
|||||||
@@ -15,7 +15,7 @@
|
|||||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||||
<ProduceReferenceAssembly>False</ProduceReferenceAssembly>
|
<ProduceReferenceAssembly>False</ProduceReferenceAssembly>
|
||||||
<AllowUnsafeBlocks>True</AllowUnsafeBlocks>
|
<AllowUnsafeBlocks>True</AllowUnsafeBlocks>
|
||||||
<AssemblyVersion>0.153</AssemblyVersion>
|
<AssemblyVersion>0.154</AssemblyVersion>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
|
||||||
|
|||||||
@@ -30,7 +30,7 @@ public static class Logger
|
|||||||
try
|
try
|
||||||
{
|
{
|
||||||
var file = File.ReadAllLines(logFile);
|
var file = File.ReadAllLines(logFile);
|
||||||
int skip = Math.Max(0, file.Count() - 1000);
|
int skip = Math.Max(0, file.Count() - 2000);
|
||||||
File.WriteAllLines(logFile, file.Skip(skip).ToArray());
|
File.WriteAllLines(logFile, file.Skip(skip).ToArray());
|
||||||
}
|
}
|
||||||
catch { }
|
catch { }
|
||||||
|
|||||||
@@ -500,7 +500,7 @@ namespace GHelper.Input
|
|||||||
case "micmute":
|
case "micmute":
|
||||||
bool muteStatus = Audio.ToggleMute();
|
bool muteStatus = Audio.ToggleMute();
|
||||||
Program.toast.RunToast(muteStatus ? "Muted" : "Unmuted", muteStatus ? ToastIcon.MicrophoneMute : ToastIcon.Microphone);
|
Program.toast.RunToast(muteStatus ? "Muted" : "Unmuted", muteStatus ? ToastIcon.MicrophoneMute : ToastIcon.Microphone);
|
||||||
if (AppConfig.IsVivobook()) Program.acpi.DeviceSet(AsusACPI.MICMUTE_LED, muteStatus ? 1 : 0, "MicmuteLed");
|
if (AppConfig.IsVivobook()) Program.acpi.DeviceSet(AsusACPI.MicMuteLed, muteStatus ? 1 : 0, "MicmuteLed");
|
||||||
break;
|
break;
|
||||||
case "brightness_up":
|
case "brightness_up":
|
||||||
SetBrightness(+10);
|
SetBrightness(+10);
|
||||||
@@ -628,6 +628,9 @@ namespace GHelper.Input
|
|||||||
{
|
{
|
||||||
switch (EventID)
|
switch (EventID)
|
||||||
{
|
{
|
||||||
|
case 134: // FN + F12 ON OLD DEVICES
|
||||||
|
KeyProcess("m4");
|
||||||
|
return;
|
||||||
case 124: // M3
|
case 124: // M3
|
||||||
KeyProcess("m3");
|
KeyProcess("m3");
|
||||||
return;
|
return;
|
||||||
@@ -706,6 +709,9 @@ namespace GHelper.Input
|
|||||||
else
|
else
|
||||||
Program.acpi.DeviceSet(AsusACPI.UniversalControl, AsusACPI.Brightness_Up, "Brightness");
|
Program.acpi.DeviceSet(AsusACPI.UniversalControl, AsusACPI.Brightness_Up, "Brightness");
|
||||||
break;
|
break;
|
||||||
|
case 133: // Camera Toggle
|
||||||
|
ToggleCamera();
|
||||||
|
break;
|
||||||
case 107: // FN+F10
|
case 107: // FN+F10
|
||||||
ToggleTouchpadEvent();
|
ToggleTouchpadEvent();
|
||||||
break;
|
break;
|
||||||
@@ -784,6 +790,36 @@ namespace GHelper.Input
|
|||||||
Program.toast.RunToast($"Screen Pad " + (toggle == 1 ? "On" : "Off"), toggle > 0 ? ToastIcon.BrightnessUp : ToastIcon.BrightnessDown);
|
Program.toast.RunToast($"Screen Pad " + (toggle == 1 ? "On" : "Off"), toggle > 0 ? ToastIcon.BrightnessUp : ToastIcon.BrightnessDown);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static void ToggleCamera()
|
||||||
|
{
|
||||||
|
if (!ProcessHelper.IsUserAdministrator()) return;
|
||||||
|
|
||||||
|
string CameraRegistryKeyPath = @"HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\CapabilityAccessManager\ConsentStore\webcam";
|
||||||
|
string CameraRegistryValueName = "Value";
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
var status = (string?)Registry.GetValue(CameraRegistryKeyPath, CameraRegistryValueName, "");
|
||||||
|
|
||||||
|
if (status == "Allow") status = "Deny";
|
||||||
|
else if (status == "Deny") status = "Allow";
|
||||||
|
else
|
||||||
|
{
|
||||||
|
Logger.WriteLine("Unknown camera status");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
Registry.SetValue(CameraRegistryKeyPath, CameraRegistryValueName, status, RegistryValueKind.String);
|
||||||
|
Program.acpi.DeviceSet(AsusACPI.CameraLed, (status == "Deny" ? 1 : 0), "Camera");
|
||||||
|
Program.toast.RunToast($"Camera " + (status == "Deny" ? "Off" : "On"));
|
||||||
|
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
Logger.WriteLine(ex.ToString());
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
public static void SetScreenpad(int delta)
|
public static void SetScreenpad(int delta)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -24,26 +24,30 @@ public sealed class KeyboardHook : IDisposable
|
|||||||
public static void KeyPress(Keys key)
|
public static void KeyPress(Keys key)
|
||||||
{
|
{
|
||||||
keybd_event((byte)key, 0, KEYEVENTF_EXTENDEDKEY, IntPtr.Zero);
|
keybd_event((byte)key, 0, KEYEVENTF_EXTENDEDKEY, IntPtr.Zero);
|
||||||
|
|
||||||
|
Thread.Sleep(1);
|
||||||
|
|
||||||
|
keybd_event((byte)key, 0, KEYEVENTF_EXTENDEDKEY | KEYEVENTF_KEYUP, IntPtr.Zero);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void KeyKeyPress(Keys key, Keys key2)
|
public static void KeyKeyPress(Keys key, Keys key2)
|
||||||
{
|
{
|
||||||
keybd_event((byte)key, 0, KEYEVENTF_EXTENDEDKEY, IntPtr.Zero);
|
keybd_event((byte)key, 0, KEYEVENTF_EXTENDEDKEY, IntPtr.Zero);
|
||||||
keybd_event((byte)key2, 0, KEYEVENTF_EXTENDEDKEY, IntPtr.Zero);
|
keybd_event((byte)key2, 0, KEYEVENTF_EXTENDEDKEY, IntPtr.Zero);
|
||||||
|
|
||||||
|
Thread.Sleep(1);
|
||||||
|
|
||||||
keybd_event((byte)key2, 0, KEYEVENTF_EXTENDEDKEY | KEYEVENTF_KEYUP, IntPtr.Zero);
|
keybd_event((byte)key2, 0, KEYEVENTF_EXTENDEDKEY | KEYEVENTF_KEYUP, IntPtr.Zero);
|
||||||
keybd_event((byte)key, 0, KEYEVENTF_EXTENDEDKEY | KEYEVENTF_KEYUP, IntPtr.Zero);
|
keybd_event((byte)key, 0, KEYEVENTF_EXTENDEDKEY | KEYEVENTF_KEYUP, IntPtr.Zero);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void KeyKeyKeyPress(Keys key, Keys key2, Keys key3, int sleep = 0)
|
public static void KeyKeyKeyPress(Keys key, Keys key2, Keys key3, int sleep = 1)
|
||||||
{
|
{
|
||||||
keybd_event((byte)key, 0, KEYEVENTF_EXTENDEDKEY, IntPtr.Zero);
|
keybd_event((byte)key, 0, KEYEVENTF_EXTENDEDKEY, IntPtr.Zero);
|
||||||
keybd_event((byte)key2, 0, KEYEVENTF_EXTENDEDKEY, IntPtr.Zero);
|
keybd_event((byte)key2, 0, KEYEVENTF_EXTENDEDKEY, IntPtr.Zero);
|
||||||
keybd_event((byte)key3, 0, KEYEVENTF_EXTENDEDKEY, IntPtr.Zero);
|
keybd_event((byte)key3, 0, KEYEVENTF_EXTENDEDKEY, IntPtr.Zero);
|
||||||
|
|
||||||
if (sleep > 0)
|
Thread.Sleep(sleep);
|
||||||
{
|
|
||||||
Thread.Sleep(sleep);
|
|
||||||
}
|
|
||||||
|
|
||||||
keybd_event((byte)key3, 0, KEYEVENTF_EXTENDEDKEY | KEYEVENTF_KEYUP, IntPtr.Zero);
|
keybd_event((byte)key3, 0, KEYEVENTF_EXTENDEDKEY | KEYEVENTF_KEYUP, IntPtr.Zero);
|
||||||
keybd_event((byte)key2, 0, KEYEVENTF_EXTENDEDKEY | KEYEVENTF_KEYUP, IntPtr.Zero);
|
keybd_event((byte)key2, 0, KEYEVENTF_EXTENDEDKEY | KEYEVENTF_KEYUP, IntPtr.Zero);
|
||||||
|
|||||||
@@ -66,7 +66,7 @@ namespace GHelper.Input
|
|||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
Logger.WriteLine(ex.ToString());
|
Logger.WriteLine($"Listener exited: {ex.Message}");
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
10
app/Properties/Resources.Designer.cs
generated
10
app/Properties/Resources.Designer.cs
generated
@@ -210,6 +210,16 @@ namespace GHelper.Properties {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
||||||
|
/// </summary>
|
||||||
|
internal static System.Drawing.Bitmap icons8_brightness_32 {
|
||||||
|
get {
|
||||||
|
object obj = ResourceManager.GetObject("icons8-brightness-32", resourceCulture);
|
||||||
|
return ((System.Drawing.Bitmap)(obj));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|||||||
@@ -136,6 +136,9 @@
|
|||||||
<data name="icons8-bicycle-48 (1)" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
<data name="icons8-bicycle-48 (1)" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||||
<value>..\Resources\icons8-bicycle-48 (1).png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
<value>..\Resources\icons8-bicycle-48 (1).png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||||
</data>
|
</data>
|
||||||
|
<data name="standard" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||||
|
<value>..\Resources\standard.ico;System.Drawing.Icon, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||||
|
</data>
|
||||||
<data name="eco" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
<data name="eco" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||||
<value>..\Resources\eco.ico;System.Drawing.Icon, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
<value>..\Resources\eco.ico;System.Drawing.Icon, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||||
</data>
|
</data>
|
||||||
@@ -163,9 +166,15 @@
|
|||||||
<data name="icons8-automation-32" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
<data name="icons8-automation-32" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||||
<value>..\Resources\icons8-automation-32.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
<value>..\Resources\icons8-automation-32.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||||
</data>
|
</data>
|
||||||
|
<data name="icons8-settings-32" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||||
|
<value>..\Resources\icons8-settings-32.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||||
|
</data>
|
||||||
<data name="brightness_up" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
<data name="brightness_up" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||||
<value>..\Resources\brightness-up.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
<value>..\Resources\brightness-up.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||||
</data>
|
</data>
|
||||||
|
<data name="brightness_down" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||||
|
<value>..\Resources\brightness-down.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||||
|
</data>
|
||||||
<data name="icons8_processor_32" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
<data name="icons8_processor_32" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||||
<value>..\Resources\icons8-processor-32.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
<value>..\Resources\icons8-processor-32.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||||
</data>
|
</data>
|
||||||
@@ -187,15 +196,9 @@
|
|||||||
<data name="icons8-laptop-32" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
<data name="icons8-laptop-32" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||||
<value>..\Resources\icons8-laptop-32.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
<value>..\Resources\icons8-laptop-32.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="ally" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
|
||||||
<value>..\Resources\ally.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
|
||||||
</data>
|
|
||||||
<data name="icons8_remove_64" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
<data name="icons8_remove_64" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||||
<value>..\Resources\icons8-remove-64.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
<value>..\Resources\icons8-remove-64.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="icons8_share_32" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
|
||||||
<value>..\Resources\icons8-share-32.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
|
||||||
</data>
|
|
||||||
<data name="icons8_function" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
<data name="icons8_function" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||||
<value>..\Resources\icons8-function-mac-96.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
<value>..\Resources\icons8-function-mac-96.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||||
</data>
|
</data>
|
||||||
@@ -229,14 +232,11 @@
|
|||||||
<data name="icons8-xbox-rt-32" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
<data name="icons8-xbox-rt-32" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||||
<value>..\Resources\icons8-xbox-rt-32.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
<value>..\Resources\icons8-xbox-rt-32.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="icons8_controller_96" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
|
||||||
<value>..\Resources\icons8-controller-96.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
|
||||||
</data>
|
|
||||||
<data name="icons8-fan-48" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
<data name="icons8-fan-48" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||||
<value>..\Resources\icons8-fan-48.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
<value>..\Resources\icons8-fan-48.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="icons8-settings-32" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
<data name="icons8_controller_96" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||||
<value>..\Resources\icons8-settings-32.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
<value>..\Resources\icons8-controller-96.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="icons8_maus_32" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
<data name="icons8_maus_32" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||||
<value>..\Resources\icons8-maus-32.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
<value>..\Resources\icons8-maus-32.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||||
@@ -250,8 +250,11 @@
|
|||||||
<data name="dot_ultimate" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
<data name="dot_ultimate" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||||
<value>..\Resources\dot-ultimate.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
<value>..\Resources\dot-ultimate.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="brightness_down" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
<data name="icons8-heartbeat-32" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||||
<value>..\Resources\brightness-down.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
<value>..\Resources\icons8-heartbeat-32.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||||
|
</data>
|
||||||
|
<data name="ally" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||||
|
<value>..\Resources\ally.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="backlight_up" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
<data name="backlight_up" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||||
<value>..\Resources\backlight-up.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
<value>..\Resources\backlight-up.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||||
@@ -319,8 +322,8 @@
|
|||||||
<data name="icons8_software_32" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
<data name="icons8_software_32" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||||
<value>..\Resources\icons8-software-32.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
<value>..\Resources\icons8-software-32.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="standard" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
<data name="icons8_share_32" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||||
<value>..\Resources\standard.ico;System.Drawing.Icon, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
<value>..\Resources\icons8-share-32.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="icons8-soonvibes-32" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
<data name="icons8-soonvibes-32" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||||
<value>..\Resources\icons8-soonvibes-32.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
<value>..\Resources\icons8-soonvibes-32.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||||
@@ -331,7 +334,7 @@
|
|||||||
<data name="icons8-charging-battery-32" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
<data name="icons8-charging-battery-32" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||||
<value>..\Resources\icons8-charging-battery-32.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
<value>..\Resources\icons8-charging-battery-32.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="icons8-heartbeat-32" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
<data name="icons8-brightness-32" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||||
<value>..\Resources\icons8-heartbeat-32.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
<value>..\Resources\icons8-brightness-32.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||||
</data>
|
</data>
|
||||||
</root>
|
</root>
|
||||||
BIN
app/Resources/icons8-brightness-32.png
Normal file
BIN
app/Resources/icons8-brightness-32.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 420 B |
137
app/Settings.Designer.cs
generated
137
app/Settings.Designer.cs
generated
@@ -34,6 +34,7 @@ namespace GHelper
|
|||||||
tableLayoutMatrix = new TableLayoutPanel();
|
tableLayoutMatrix = new TableLayoutPanel();
|
||||||
comboMatrix = new RComboBox();
|
comboMatrix = new RComboBox();
|
||||||
comboMatrixRunning = new RComboBox();
|
comboMatrixRunning = new RComboBox();
|
||||||
|
comboInterval = new RComboBox();
|
||||||
buttonMatrix = new RButton();
|
buttonMatrix = new RButton();
|
||||||
panelMatrixTitle = new Panel();
|
panelMatrixTitle = new Panel();
|
||||||
pictureMatrix = new PictureBox();
|
pictureMatrix = new PictureBox();
|
||||||
@@ -119,7 +120,12 @@ namespace GHelper
|
|||||||
panelAllyTitle = new Panel();
|
panelAllyTitle = new Panel();
|
||||||
pictureAlly = new PictureBox();
|
pictureAlly = new PictureBox();
|
||||||
labelAlly = new Label();
|
labelAlly = new Label();
|
||||||
comboInterval = new RComboBox();
|
panelGamma = new Panel();
|
||||||
|
sliderGamma = new Slider();
|
||||||
|
panelGammaTitle = new Panel();
|
||||||
|
labelGamma = new Label();
|
||||||
|
pictureGamma = new PictureBox();
|
||||||
|
labelGammaTitle = new Label();
|
||||||
panelMatrix.SuspendLayout();
|
panelMatrix.SuspendLayout();
|
||||||
tableLayoutMatrix.SuspendLayout();
|
tableLayoutMatrix.SuspendLayout();
|
||||||
panelMatrixTitle.SuspendLayout();
|
panelMatrixTitle.SuspendLayout();
|
||||||
@@ -158,6 +164,9 @@ namespace GHelper
|
|||||||
tableLayoutAlly.SuspendLayout();
|
tableLayoutAlly.SuspendLayout();
|
||||||
panelAllyTitle.SuspendLayout();
|
panelAllyTitle.SuspendLayout();
|
||||||
((System.ComponentModel.ISupportInitialize)pictureAlly).BeginInit();
|
((System.ComponentModel.ISupportInitialize)pictureAlly).BeginInit();
|
||||||
|
panelGamma.SuspendLayout();
|
||||||
|
panelGammaTitle.SuspendLayout();
|
||||||
|
((System.ComponentModel.ISupportInitialize)pictureGamma).BeginInit();
|
||||||
SuspendLayout();
|
SuspendLayout();
|
||||||
//
|
//
|
||||||
// panelMatrix
|
// panelMatrix
|
||||||
@@ -169,7 +178,7 @@ namespace GHelper
|
|||||||
panelMatrix.Controls.Add(panelMatrixTitle);
|
panelMatrix.Controls.Add(panelMatrixTitle);
|
||||||
panelMatrix.Controls.Add(checkMatrix);
|
panelMatrix.Controls.Add(checkMatrix);
|
||||||
panelMatrix.Dock = DockStyle.Top;
|
panelMatrix.Dock = DockStyle.Top;
|
||||||
panelMatrix.Location = new Point(11, 827);
|
panelMatrix.Location = new Point(11, 950);
|
||||||
panelMatrix.Margin = new Padding(0);
|
panelMatrix.Margin = new Padding(0);
|
||||||
panelMatrix.Name = "panelMatrix";
|
panelMatrix.Name = "panelMatrix";
|
||||||
panelMatrix.Padding = new Padding(20, 20, 20, 10);
|
panelMatrix.Padding = new Padding(20, 20, 20, 10);
|
||||||
@@ -230,6 +239,21 @@ namespace GHelper
|
|||||||
comboMatrixRunning.Size = new Size(248, 40);
|
comboMatrixRunning.Size = new Size(248, 40);
|
||||||
comboMatrixRunning.TabIndex = 17;
|
comboMatrixRunning.TabIndex = 17;
|
||||||
//
|
//
|
||||||
|
// comboInterval
|
||||||
|
//
|
||||||
|
comboInterval.BorderColor = Color.White;
|
||||||
|
comboInterval.ButtonColor = Color.FromArgb(255, 255, 255);
|
||||||
|
comboInterval.Dock = DockStyle.Top;
|
||||||
|
comboInterval.Font = new Font("Segoe UI", 9F, FontStyle.Regular, GraphicsUnit.Point);
|
||||||
|
comboInterval.FormattingEnabled = true;
|
||||||
|
comboInterval.ItemHeight = 32;
|
||||||
|
comboInterval.Location = new Point(7, 75);
|
||||||
|
comboInterval.Margin = new Padding(7, 11, 7, 8);
|
||||||
|
comboInterval.Name = "comboInterval";
|
||||||
|
comboInterval.Size = new Size(248, 40);
|
||||||
|
comboInterval.TabIndex = 19;
|
||||||
|
comboInterval.Visible = false;
|
||||||
|
//
|
||||||
// buttonMatrix
|
// buttonMatrix
|
||||||
//
|
//
|
||||||
buttonMatrix.Activated = false;
|
buttonMatrix.Activated = false;
|
||||||
@@ -301,7 +325,7 @@ namespace GHelper
|
|||||||
panelBattery.Controls.Add(sliderBattery);
|
panelBattery.Controls.Add(sliderBattery);
|
||||||
panelBattery.Controls.Add(panelBatteryTitle);
|
panelBattery.Controls.Add(panelBatteryTitle);
|
||||||
panelBattery.Dock = DockStyle.Top;
|
panelBattery.Dock = DockStyle.Top;
|
||||||
panelBattery.Location = new Point(11, 1485);
|
panelBattery.Location = new Point(11, 1608);
|
||||||
panelBattery.Margin = new Padding(0);
|
panelBattery.Margin = new Padding(0);
|
||||||
panelBattery.Name = "panelBattery";
|
panelBattery.Name = "panelBattery";
|
||||||
panelBattery.Padding = new Padding(20, 20, 20, 10);
|
panelBattery.Padding = new Padding(20, 20, 20, 10);
|
||||||
@@ -393,7 +417,7 @@ namespace GHelper
|
|||||||
panelFooter.AutoSizeMode = AutoSizeMode.GrowAndShrink;
|
panelFooter.AutoSizeMode = AutoSizeMode.GrowAndShrink;
|
||||||
panelFooter.Controls.Add(tableButtons);
|
panelFooter.Controls.Add(tableButtons);
|
||||||
panelFooter.Dock = DockStyle.Top;
|
panelFooter.Dock = DockStyle.Top;
|
||||||
panelFooter.Location = new Point(11, 1660);
|
panelFooter.Location = new Point(11, 1783);
|
||||||
panelFooter.Margin = new Padding(0);
|
panelFooter.Margin = new Padding(0);
|
||||||
panelFooter.Name = "panelFooter";
|
panelFooter.Name = "panelFooter";
|
||||||
panelFooter.Padding = new Padding(20);
|
panelFooter.Padding = new Padding(20);
|
||||||
@@ -1140,7 +1164,7 @@ namespace GHelper
|
|||||||
panelKeyboard.Controls.Add(tableLayoutKeyboard);
|
panelKeyboard.Controls.Add(tableLayoutKeyboard);
|
||||||
panelKeyboard.Controls.Add(panelKeyboardTitle);
|
panelKeyboard.Controls.Add(panelKeyboardTitle);
|
||||||
panelKeyboard.Dock = DockStyle.Top;
|
panelKeyboard.Dock = DockStyle.Top;
|
||||||
panelKeyboard.Location = new Point(11, 1143);
|
panelKeyboard.Location = new Point(11, 1266);
|
||||||
panelKeyboard.Margin = new Padding(0);
|
panelKeyboard.Margin = new Padding(0);
|
||||||
panelKeyboard.Name = "panelKeyboard";
|
panelKeyboard.Name = "panelKeyboard";
|
||||||
panelKeyboard.Padding = new Padding(20);
|
panelKeyboard.Padding = new Padding(20);
|
||||||
@@ -1316,7 +1340,7 @@ namespace GHelper
|
|||||||
panelVersion.Controls.Add(labelCharge);
|
panelVersion.Controls.Add(labelCharge);
|
||||||
panelVersion.Controls.Add(checkStartup);
|
panelVersion.Controls.Add(checkStartup);
|
||||||
panelVersion.Dock = DockStyle.Top;
|
panelVersion.Dock = DockStyle.Top;
|
||||||
panelVersion.Location = new Point(11, 1604);
|
panelVersion.Location = new Point(11, 1727);
|
||||||
panelVersion.Margin = new Padding(4);
|
panelVersion.Margin = new Padding(4);
|
||||||
panelVersion.Name = "panelVersion";
|
panelVersion.Name = "panelVersion";
|
||||||
panelVersion.Size = new Size(827, 56);
|
panelVersion.Size = new Size(827, 56);
|
||||||
@@ -1341,7 +1365,7 @@ namespace GHelper
|
|||||||
panelPeripherals.Controls.Add(tableLayoutPeripherals);
|
panelPeripherals.Controls.Add(tableLayoutPeripherals);
|
||||||
panelPeripherals.Controls.Add(panelPeripheralsTile);
|
panelPeripherals.Controls.Add(panelPeripheralsTile);
|
||||||
panelPeripherals.Dock = DockStyle.Top;
|
panelPeripherals.Dock = DockStyle.Top;
|
||||||
panelPeripherals.Location = new Point(11, 1287);
|
panelPeripherals.Location = new Point(11, 1410);
|
||||||
panelPeripherals.Margin = new Padding(0);
|
panelPeripherals.Margin = new Padding(0);
|
||||||
panelPeripherals.Name = "panelPeripherals";
|
panelPeripherals.Name = "panelPeripherals";
|
||||||
panelPeripherals.Padding = new Padding(20, 20, 20, 10);
|
panelPeripherals.Padding = new Padding(20, 20, 20, 10);
|
||||||
@@ -1483,7 +1507,7 @@ namespace GHelper
|
|||||||
panelAlly.Controls.Add(tableLayoutAlly);
|
panelAlly.Controls.Add(tableLayoutAlly);
|
||||||
panelAlly.Controls.Add(panelAllyTitle);
|
panelAlly.Controls.Add(panelAllyTitle);
|
||||||
panelAlly.Dock = DockStyle.Top;
|
panelAlly.Dock = DockStyle.Top;
|
||||||
panelAlly.Location = new Point(11, 1003);
|
panelAlly.Location = new Point(11, 1126);
|
||||||
panelAlly.Margin = new Padding(0);
|
panelAlly.Margin = new Padding(0);
|
||||||
panelAlly.Name = "panelAlly";
|
panelAlly.Name = "panelAlly";
|
||||||
panelAlly.Padding = new Padding(20, 20, 20, 0);
|
panelAlly.Padding = new Padding(20, 20, 20, 0);
|
||||||
@@ -1611,20 +1635,79 @@ namespace GHelper
|
|||||||
labelAlly.TabIndex = 26;
|
labelAlly.TabIndex = 26;
|
||||||
labelAlly.Text = "Ally Controller";
|
labelAlly.Text = "Ally Controller";
|
||||||
//
|
//
|
||||||
// comboInterval
|
// panelGamma
|
||||||
//
|
//
|
||||||
comboInterval.BorderColor = Color.White;
|
panelGamma.AutoSize = true;
|
||||||
comboInterval.ButtonColor = Color.FromArgb(255, 255, 255);
|
panelGamma.AutoSizeMode = AutoSizeMode.GrowAndShrink;
|
||||||
comboInterval.Dock = DockStyle.Top;
|
panelGamma.Controls.Add(sliderGamma);
|
||||||
comboInterval.Font = new Font("Segoe UI", 9F, FontStyle.Regular, GraphicsUnit.Point);
|
panelGamma.Controls.Add(panelGammaTitle);
|
||||||
comboInterval.FormattingEnabled = true;
|
panelGamma.Dock = DockStyle.Top;
|
||||||
comboInterval.ItemHeight = 32;
|
panelGamma.Location = new Point(11, 827);
|
||||||
comboInterval.Location = new Point(7, 75);
|
panelGamma.Margin = new Padding(0);
|
||||||
comboInterval.Margin = new Padding(7, 11, 7, 8);
|
panelGamma.Name = "panelGamma";
|
||||||
comboInterval.Name = "comboInterval";
|
panelGamma.Padding = new Padding(20, 20, 20, 10);
|
||||||
comboInterval.Size = new Size(248, 40);
|
panelGamma.Size = new Size(827, 123);
|
||||||
comboInterval.TabIndex = 19;
|
panelGamma.TabIndex = 9;
|
||||||
comboInterval.Visible = false;
|
panelGamma.Visible = false;
|
||||||
|
//
|
||||||
|
// sliderGamma
|
||||||
|
//
|
||||||
|
sliderGamma.Anchor = AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right;
|
||||||
|
sliderGamma.Location = new Point(40, 69);
|
||||||
|
sliderGamma.Margin = new Padding(4);
|
||||||
|
sliderGamma.Max = 100;
|
||||||
|
sliderGamma.Min = 0;
|
||||||
|
sliderGamma.Name = "sliderGamma";
|
||||||
|
sliderGamma.Size = new Size(752, 40);
|
||||||
|
sliderGamma.Step = 10;
|
||||||
|
sliderGamma.TabIndex = 20;
|
||||||
|
sliderGamma.Text = "sliderGamma";
|
||||||
|
sliderGamma.Value = 100;
|
||||||
|
//
|
||||||
|
// panelGammaTitle
|
||||||
|
//
|
||||||
|
panelGammaTitle.Controls.Add(labelGamma);
|
||||||
|
panelGammaTitle.Controls.Add(pictureGamma);
|
||||||
|
panelGammaTitle.Controls.Add(labelGammaTitle);
|
||||||
|
panelGammaTitle.Dock = DockStyle.Top;
|
||||||
|
panelGammaTitle.Location = new Point(20, 20);
|
||||||
|
panelGammaTitle.Margin = new Padding(4);
|
||||||
|
panelGammaTitle.Name = "panelGammaTitle";
|
||||||
|
panelGammaTitle.Padding = new Padding(0, 0, 0, 4);
|
||||||
|
panelGammaTitle.Size = new Size(787, 44);
|
||||||
|
panelGammaTitle.TabIndex = 40;
|
||||||
|
//
|
||||||
|
// labelGamma
|
||||||
|
//
|
||||||
|
labelGamma.Anchor = AnchorStyles.Top | AnchorStyles.Right;
|
||||||
|
labelGamma.Location = new Point(675, 4);
|
||||||
|
labelGamma.Margin = new Padding(8, 0, 8, 0);
|
||||||
|
labelGamma.Name = "labelGamma";
|
||||||
|
labelGamma.Size = new Size(107, 36);
|
||||||
|
labelGamma.TabIndex = 39;
|
||||||
|
labelGamma.Text = " ";
|
||||||
|
labelGamma.TextAlign = ContentAlignment.TopRight;
|
||||||
|
//
|
||||||
|
// pictureGamma
|
||||||
|
//
|
||||||
|
pictureGamma.BackgroundImage = Properties.Resources.icons8_brightness_32;
|
||||||
|
pictureGamma.BackgroundImageLayout = ImageLayout.Zoom;
|
||||||
|
pictureGamma.Location = new Point(4, 2);
|
||||||
|
pictureGamma.Margin = new Padding(4);
|
||||||
|
pictureGamma.Name = "pictureGamma";
|
||||||
|
pictureGamma.Size = new Size(32, 32);
|
||||||
|
pictureGamma.TabIndex = 38;
|
||||||
|
pictureGamma.TabStop = false;
|
||||||
|
//
|
||||||
|
// labelGammaTitle
|
||||||
|
//
|
||||||
|
labelGammaTitle.Font = new Font("Segoe UI", 9F, FontStyle.Bold, GraphicsUnit.Point);
|
||||||
|
labelGammaTitle.Location = new Point(43, 0);
|
||||||
|
labelGammaTitle.Margin = new Padding(8, 0, 8, 0);
|
||||||
|
labelGammaTitle.Name = "labelGammaTitle";
|
||||||
|
labelGammaTitle.Size = new Size(307, 32);
|
||||||
|
labelGammaTitle.TabIndex = 37;
|
||||||
|
labelGammaTitle.Text = "Flicker-free Dimming";
|
||||||
//
|
//
|
||||||
// SettingsForm
|
// SettingsForm
|
||||||
//
|
//
|
||||||
@@ -1632,7 +1715,7 @@ namespace GHelper
|
|||||||
AutoScaleMode = AutoScaleMode.Dpi;
|
AutoScaleMode = AutoScaleMode.Dpi;
|
||||||
AutoSize = true;
|
AutoSize = true;
|
||||||
AutoSizeMode = AutoSizeMode.GrowAndShrink;
|
AutoSizeMode = AutoSizeMode.GrowAndShrink;
|
||||||
ClientSize = new Size(849, 1717);
|
ClientSize = new Size(849, 2119);
|
||||||
Controls.Add(panelFooter);
|
Controls.Add(panelFooter);
|
||||||
Controls.Add(panelVersion);
|
Controls.Add(panelVersion);
|
||||||
Controls.Add(panelBattery);
|
Controls.Add(panelBattery);
|
||||||
@@ -1640,6 +1723,7 @@ namespace GHelper
|
|||||||
Controls.Add(panelKeyboard);
|
Controls.Add(panelKeyboard);
|
||||||
Controls.Add(panelAlly);
|
Controls.Add(panelAlly);
|
||||||
Controls.Add(panelMatrix);
|
Controls.Add(panelMatrix);
|
||||||
|
Controls.Add(panelGamma);
|
||||||
Controls.Add(panelScreen);
|
Controls.Add(panelScreen);
|
||||||
Controls.Add(panelGPU);
|
Controls.Add(panelGPU);
|
||||||
Controls.Add(panelPerformance);
|
Controls.Add(panelPerformance);
|
||||||
@@ -1708,6 +1792,9 @@ namespace GHelper
|
|||||||
panelAllyTitle.ResumeLayout(false);
|
panelAllyTitle.ResumeLayout(false);
|
||||||
panelAllyTitle.PerformLayout();
|
panelAllyTitle.PerformLayout();
|
||||||
((System.ComponentModel.ISupportInitialize)pictureAlly).EndInit();
|
((System.ComponentModel.ISupportInitialize)pictureAlly).EndInit();
|
||||||
|
panelGamma.ResumeLayout(false);
|
||||||
|
panelGammaTitle.ResumeLayout(false);
|
||||||
|
((System.ComponentModel.ISupportInitialize)pictureGamma).EndInit();
|
||||||
ResumeLayout(false);
|
ResumeLayout(false);
|
||||||
PerformLayout();
|
PerformLayout();
|
||||||
}
|
}
|
||||||
@@ -1803,5 +1890,11 @@ namespace GHelper
|
|||||||
private RButton buttonController;
|
private RButton buttonController;
|
||||||
private RButton buttonOverlay;
|
private RButton buttonOverlay;
|
||||||
private RComboBox comboInterval;
|
private RComboBox comboInterval;
|
||||||
|
private Panel panelGamma;
|
||||||
|
private Slider sliderGamma;
|
||||||
|
private Panel panelGammaTitle;
|
||||||
|
private Label labelGamma;
|
||||||
|
private PictureBox pictureGamma;
|
||||||
|
private Label labelGammaTitle;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -253,9 +253,19 @@ namespace GHelper
|
|||||||
VisualiseFnLock();
|
VisualiseFnLock();
|
||||||
buttonFnLock.Click += ButtonFnLock_Click;
|
buttonFnLock.Click += ButtonFnLock_Click;
|
||||||
|
|
||||||
|
panelGamma.Visible = AppConfig.IsOLED();
|
||||||
|
sliderGamma.ValueChanged += SliderGamma_ValueChanged;
|
||||||
|
labelGamma.Text = "100%";
|
||||||
|
|
||||||
panelPerformance.Focus();
|
panelPerformance.Focus();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void SliderGamma_ValueChanged(object? sender, EventArgs e)
|
||||||
|
{
|
||||||
|
screenControl.SetGamma(sliderGamma.Value);
|
||||||
|
labelGamma.Text = sliderGamma.Value + "%";
|
||||||
|
}
|
||||||
|
|
||||||
private void ButtonOverlay_Click(object? sender, EventArgs e)
|
private void ButtonOverlay_Click(object? sender, EventArgs e)
|
||||||
{
|
{
|
||||||
KeyboardHook.KeyKeyKeyPress(Keys.LControlKey, Keys.LShiftKey, Keys.O);
|
KeyboardHook.KeyKeyKeyPress(Keys.LControlKey, Keys.LShiftKey, Keys.O);
|
||||||
|
|||||||
@@ -90,18 +90,24 @@ public static class AsusHid
|
|||||||
if (devices is null) return;
|
if (devices is null) return;
|
||||||
|
|
||||||
foreach (var device in devices)
|
foreach (var device in devices)
|
||||||
using (var stream = device.Open())
|
try
|
||||||
foreach (var data in dataList)
|
{
|
||||||
try
|
using (var stream = device.Open())
|
||||||
{
|
foreach (var data in dataList)
|
||||||
stream.Write(data);
|
try
|
||||||
Logger.WriteLine($"{log} {device.ProductID.ToString("X")}: {BitConverter.ToString(data)}");
|
{
|
||||||
}
|
stream.Write(data);
|
||||||
catch (Exception ex)
|
Logger.WriteLine($"{log} {device.ProductID.ToString("X")}: {BitConverter.ToString(data)}");
|
||||||
{
|
}
|
||||||
Logger.WriteLine($"Error writing {log} {device.ProductID.ToString("X")}: {ex.Message} {BitConverter.ToString(data)} ");
|
catch (Exception ex)
|
||||||
}
|
{
|
||||||
|
Logger.WriteLine($"Error writing {log} {device.ProductID.ToString("X")}: {ex.Message} {BitConverter.ToString(data)} ");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
Logger.WriteLine($"Error opening {log} {device.ProductID.ToString("X")}: {ex.Message}");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void WriteAura(byte[] data)
|
public static void WriteAura(byte[] data)
|
||||||
|
|||||||
@@ -73,6 +73,9 @@ namespace GHelper.USB
|
|||||||
private static AuraMode mode = AuraMode.AuraStatic;
|
private static AuraMode mode = AuraMode.AuraStatic;
|
||||||
private static AuraSpeed speed = AuraSpeed.Normal;
|
private static AuraSpeed speed = AuraSpeed.Normal;
|
||||||
|
|
||||||
|
private static bool backlight = false;
|
||||||
|
private static bool initDirect = false;
|
||||||
|
|
||||||
public static Color Color1 = Color.White;
|
public static Color Color1 = Color.White;
|
||||||
public static Color Color2 = Color.Black;
|
public static Color Color2 = Color.Black;
|
||||||
|
|
||||||
@@ -289,6 +292,8 @@ namespace GHelper.USB
|
|||||||
|
|
||||||
public static void ApplyBrightness(int brightness, string log = "Backlight", bool delay = false)
|
public static void ApplyBrightness(int brightness, string log = "Backlight", bool delay = false)
|
||||||
{
|
{
|
||||||
|
if (brightness == 0) backlight = false;
|
||||||
|
|
||||||
Task.Run(async () =>
|
Task.Run(async () =>
|
||||||
{
|
{
|
||||||
if (delay) await Task.Delay(TimeSpan.FromSeconds(1));
|
if (delay) await Task.Delay(TimeSpan.FromSeconds(1));
|
||||||
@@ -301,6 +306,13 @@ namespace GHelper.USB
|
|||||||
|
|
||||||
if (AppConfig.IsAlly()) ApplyAura();
|
if (AppConfig.IsAlly()) ApplyAura();
|
||||||
|
|
||||||
|
if (brightness > 0)
|
||||||
|
{
|
||||||
|
if (!backlight) initDirect = true;
|
||||||
|
backlight = true;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
@@ -494,6 +506,8 @@ namespace GHelper.USB
|
|||||||
|
|
||||||
public static void ApplyDirect(Color[] color, bool init = false)
|
public static void ApplyDirect(Color[] color, bool init = false)
|
||||||
{
|
{
|
||||||
|
if (!backlight) return;
|
||||||
|
|
||||||
const byte keySet = 167;
|
const byte keySet = 167;
|
||||||
const byte ledCount = 178;
|
const byte ledCount = 178;
|
||||||
const ushort mapSize = 3 * ledCount;
|
const ushort mapSize = 3 * ledCount;
|
||||||
@@ -511,9 +525,9 @@ namespace GHelper.USB
|
|||||||
buffer[6] = 0;
|
buffer[6] = 0;
|
||||||
buffer[7] = 0x10;
|
buffer[7] = 0x10;
|
||||||
|
|
||||||
if (init)
|
if (init || initDirect)
|
||||||
{
|
{
|
||||||
Init();
|
initDirect = false;
|
||||||
AsusHid.WriteAura(new byte[] { AsusHid.AURA_ID, 0xBC });
|
AsusHid.WriteAura(new byte[] { AsusHid.AURA_ID, 0xBC });
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -574,6 +588,8 @@ namespace GHelper.USB
|
|||||||
public static void ApplyDirect(Color color, bool init = false)
|
public static void ApplyDirect(Color color, bool init = false)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
if (!backlight) return;
|
||||||
|
|
||||||
if (isACPI)
|
if (isACPI)
|
||||||
{
|
{
|
||||||
Program.acpi.TUFKeyboardRGB(0, color, 0, null);
|
Program.acpi.TUFKeyboardRGB(0, color, 0, null);
|
||||||
@@ -592,9 +608,9 @@ namespace GHelper.USB
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (init)
|
if (init || initDirect)
|
||||||
{
|
{
|
||||||
//Init();
|
initDirect = false;
|
||||||
AsusHid.WriteAura(new byte[] { AsusHid.AURA_ID, 0xbc, 1 });
|
AsusHid.WriteAura(new byte[] { AsusHid.AURA_ID, 0xbc, 1 });
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -721,6 +737,8 @@ namespace GHelper.USB
|
|||||||
|
|
||||||
public static void ApplyAmbient(bool init = false)
|
public static void ApplyAmbient(bool init = false)
|
||||||
{
|
{
|
||||||
|
if (!backlight) return;
|
||||||
|
|
||||||
var bound = Screen.GetBounds(Point.Empty);
|
var bound = Screen.GetBounds(Point.Empty);
|
||||||
bound.Y += bound.Height / 3;
|
bound.Y += bound.Height / 3;
|
||||||
bound.Height -= (int)Math.Round(bound.Height * (0.33f + 0.022f)); // cut 1/3 of the top screen + windows panel
|
bound.Height -= (int)Math.Round(bound.Height * (0.33f + 0.022f)); // cut 1/3 of the top screen + windows panel
|
||||||
|
|||||||
@@ -107,13 +107,12 @@ Huge thanks to [@IceStormNG](https://github.com/IceStormNG) 👑 for contributio
|
|||||||
### ⌨️ Keybindings
|
### ⌨️ Keybindings
|
||||||
|
|
||||||
- ``Fn + F5 / Fn + Shift + F5`` - Toggle Performance Modes forwards / backwards
|
- ``Fn + F5 / Fn + Shift + F5`` - Toggle Performance Modes forwards / backwards
|
||||||
- ``Shift + Fn + F7 / F8`` - Set Anime Matrix / Slash Lightning brightness Down / Up
|
|
||||||
- ``Ctrl + Shift + F5 / Ctrl + Shift + Alt + F5`` - Toggle Performance Modes forwards / backwards
|
- ``Ctrl + Shift + F5 / Ctrl + Shift + Alt + F5`` - Toggle Performance Modes forwards / backwards
|
||||||
- ``Ctrl + Shift + F12`` - Open G-Helper window
|
- ``Ctrl + Shift + F12`` - Open G-Helper window
|
||||||
- ``Ctrl + M1 / M2`` - Screen brightness Down / Up
|
- ``Ctrl + M1 / M2`` - Screen brightness Down / Up
|
||||||
- ``Shift + M1 / M2`` - Backlight brightness Down / Up
|
- ``Shift + M1 / M2`` - Backlight brightness Down / Up
|
||||||
- ``Fn + C`` - Fn-Lock
|
- ``Fn + C`` - Fn-Lock
|
||||||
- ``Fn + Shift + F7 / F8`` - Matrix brightness Down / Up
|
- ``Fn + Shift + F7 / F8`` - Matrix / Slash Lightning brightness Down / Up
|
||||||
- ``Fn + Shift + F7 / F8`` - Screenpad brightness Down / Up
|
- ``Fn + Shift + F7 / F8`` - Screenpad brightness Down / Up
|
||||||
- ``Ctrl + Shift + F20`` - Mute Microphone
|
- ``Ctrl + Shift + F20`` - Mute Microphone
|
||||||
- ``Ctrl + Shift + Alt + F14`` - Eco GPU Mode
|
- ``Ctrl + Shift + Alt + F14`` - Eco GPU Mode
|
||||||
|
|||||||
Reference in New Issue
Block a user