Compare commits
29 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
cdb633be04 | ||
|
|
7cb9b1f64f | ||
|
|
06be8c726e | ||
|
|
265c6ce417 | ||
|
|
add852ce5d | ||
|
|
d4a5164b16 | ||
|
|
14618ee19e | ||
|
|
0b3a75e373 | ||
|
|
64e390a61f | ||
|
|
1cd808de07 | ||
|
|
d82f1c8d70 | ||
|
|
9189cf0a46 | ||
|
|
3a7c4278a0 | ||
|
|
7065ba8661 | ||
|
|
1bce4a4b51 | ||
|
|
468f9c4034 | ||
|
|
4d347df45c | ||
|
|
d7f1d1d5fd | ||
|
|
6800ae38dd | ||
|
|
9b2b96fbf0 | ||
|
|
04b3a15d8f | ||
|
|
aae0570340 | ||
|
|
b142d566da | ||
|
|
a9115d0dff | ||
|
|
e3a3e81245 | ||
|
|
c50c1807ca | ||
|
|
5767320437 | ||
|
|
74846097db | ||
|
|
5b89556ed3 |
11
.github/ISSUE_TEMPLATE/bug_report.md
vendored
@@ -25,14 +25,7 @@ If applicable, add screenshots to help explain your problem.
|
|||||||
|
|
||||||
**Desktop (please complete the following information):**
|
**Desktop (please complete the following information):**
|
||||||
- OS: [e.g. iOS]
|
- OS: [e.g. iOS]
|
||||||
- Browser [e.g. chrome, safari]
|
- Laptop model
|
||||||
- Version [e.g. 22]
|
|
||||||
|
|
||||||
**Smartphone (please complete the following information):**
|
|
||||||
- Device: [e.g. iPhone6]
|
|
||||||
- OS: [e.g. iOS8.1]
|
|
||||||
- Browser [e.g. stock browser, safari]
|
|
||||||
- Version [e.g. 22]
|
|
||||||
|
|
||||||
**Additional context**
|
**Additional context**
|
||||||
Add any other context about the problem here.
|
Add any other context about the problem here.
|
||||||
|
|||||||
@@ -20,9 +20,11 @@ public class ASUSWmi
|
|||||||
|
|
||||||
public const uint BatteryLimit = 0x00120057;
|
public const uint BatteryLimit = 0x00120057;
|
||||||
public const uint ScreenOverdrive = 0x00050019;
|
public const uint ScreenOverdrive = 0x00050019;
|
||||||
|
public const uint ScreenMiniled = 0x0005001E;
|
||||||
|
|
||||||
public const uint DevsCPUFanCurve = 0x00110024;
|
public const uint DevsCPUFanCurve = 0x00110024;
|
||||||
public const uint DevsGPUFanCurve = 0x00110025;
|
public const uint DevsGPUFanCurve = 0x00110025;
|
||||||
|
public const uint DevsMidFanCurve = 0x00110032;
|
||||||
|
|
||||||
public const int PPT_TotalA0 = 0x001200A0; // Total PPT on 2022 and CPU PPT on 2021
|
public const int PPT_TotalA0 = 0x001200A0; // Total PPT on 2022 and CPU PPT on 2021
|
||||||
public const int PPT_EDCA1 = 0x001200A1; // CPU EDC
|
public const int PPT_EDCA1 = 0x001200A1; // CPU EDC
|
||||||
@@ -184,12 +186,25 @@ public class ASUSWmi
|
|||||||
if (curve.Length != 16) return;
|
if (curve.Length != 16) return;
|
||||||
if (curve.All(singleByte => singleByte == 0)) return;
|
if (curve.All(singleByte => singleByte == 0)) return;
|
||||||
|
|
||||||
Logger.WriteLine("Fans" + ((device == 1) ? "GPU" : "CPU") + " " + BitConverter.ToString(curve));
|
string name;
|
||||||
|
|
||||||
if (device == 1)
|
switch (device)
|
||||||
DeviceSet(DevsGPUFanCurve, curve);
|
{
|
||||||
else
|
case 1:
|
||||||
DeviceSet(DevsCPUFanCurve, curve);
|
DeviceSet(DevsGPUFanCurve, curve);
|
||||||
|
name = "GPU";
|
||||||
|
break;
|
||||||
|
case 2:
|
||||||
|
DeviceSet(DevsMidFanCurve, curve);
|
||||||
|
name = "Mid";
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
DeviceSet(DevsCPUFanCurve, curve);
|
||||||
|
name = "CPU";
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
Logger.WriteLine("Fans" + name + " " + BitConverter.ToString(curve));
|
||||||
}
|
}
|
||||||
|
|
||||||
public byte[] GetFanCurve(int device, int mode = 0)
|
public byte[] GetFanCurve(int device, int mode = 0)
|
||||||
@@ -204,10 +219,15 @@ public class ASUSWmi
|
|||||||
default: fan_mode = 0; break;
|
default: fan_mode = 0; break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (device == 1)
|
switch (device)
|
||||||
return DeviceGetBuffer(DevsGPUFanCurve, fan_mode);
|
{
|
||||||
else
|
case 1:
|
||||||
return DeviceGetBuffer(DevsCPUFanCurve, fan_mode);
|
return DeviceGetBuffer(DevsGPUFanCurve, fan_mode);
|
||||||
|
case 2:
|
||||||
|
return DeviceGetBuffer(DevsMidFanCurve, fan_mode);
|
||||||
|
default:
|
||||||
|
return DeviceGetBuffer(DevsCPUFanCurve, fan_mode);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -2,8 +2,8 @@
|
|||||||
|
|
||||||
using Starlight.Communication;
|
using Starlight.Communication;
|
||||||
using System.Diagnostics;
|
using System.Diagnostics;
|
||||||
using System.Text;
|
|
||||||
using System.Management;
|
using System.Management;
|
||||||
|
using System.Text;
|
||||||
|
|
||||||
namespace Starlight.AnimeMatrix
|
namespace Starlight.AnimeMatrix
|
||||||
{
|
{
|
||||||
@@ -62,41 +62,46 @@ namespace Starlight.AnimeMatrix
|
|||||||
Off = 0,
|
Off = 0,
|
||||||
Dim = 1,
|
Dim = 1,
|
||||||
Medium = 2,
|
Medium = 2,
|
||||||
Full = 3
|
Full = 3,
|
||||||
|
Super = 4, //test, doesn't work
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public class AnimeMatrixDevice : Device
|
public class AnimeMatrixDevice : Device
|
||||||
{
|
{
|
||||||
private const int UpdatePageLength = 0x0278;
|
int UpdatePageLength = 490;
|
||||||
|
int LedCount = 1450;
|
||||||
|
|
||||||
public int LedCount => 1450;
|
byte[] _displayBuffer;
|
||||||
|
List<byte[]> frames = new List<byte[]>();
|
||||||
private byte[] _displayBuffer = new byte[UpdatePageLength * 3];
|
|
||||||
private List<byte[]> frames = new List<byte[]>();
|
|
||||||
|
|
||||||
private int pages = 3;
|
|
||||||
|
|
||||||
public int MaxColumns = 34;
|
public int MaxColumns = 34;
|
||||||
public int MaxRows = 61;
|
public int MaxRows = 61;
|
||||||
|
|
||||||
public int FullRows = 11;
|
public int FullRows = 11;
|
||||||
|
|
||||||
|
public int EmptyFirstRow = 1;
|
||||||
|
|
||||||
private int frameIndex = 0;
|
private int frameIndex = 0;
|
||||||
|
|
||||||
public AnimeMatrixDevice()
|
public AnimeMatrixDevice()
|
||||||
: base(0x0B05, 0x193B, 640)
|
: base(0x0B05, 0x193B, 640)
|
||||||
{
|
{
|
||||||
string model = GetModel();
|
string model = GetModel();
|
||||||
Debug.WriteLine(model);
|
|
||||||
if (model is not null && model.Contains("401"))
|
|
||||||
{
|
|
||||||
pages = 2;
|
|
||||||
|
|
||||||
|
Logger.WriteLine("Animatrix: " + model);
|
||||||
|
|
||||||
|
if (model.Contains("401"))
|
||||||
|
{
|
||||||
|
EmptyFirstRow = 1;
|
||||||
FullRows = 6;
|
FullRows = 6;
|
||||||
MaxColumns = 33;
|
MaxColumns = 33;
|
||||||
MaxRows = 55;
|
MaxRows = 55;
|
||||||
|
LedCount = 1214;
|
||||||
|
UpdatePageLength = 410;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
_displayBuffer = new byte[LedCount];
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -119,7 +124,6 @@ namespace Starlight.AnimeMatrix
|
|||||||
|
|
||||||
public void PresentNextFrame()
|
public void PresentNextFrame()
|
||||||
{
|
{
|
||||||
//Debug.WriteLine(frameIndex);
|
|
||||||
if (frameIndex >= frames.Count) frameIndex = 0;
|
if (frameIndex >= frames.Count) frameIndex = 0;
|
||||||
_displayBuffer = frames[frameIndex];
|
_displayBuffer = frames[frameIndex];
|
||||||
Present();
|
Present();
|
||||||
@@ -143,27 +147,25 @@ namespace Starlight.AnimeMatrix
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public int EmptyColumns(int row)
|
public int XStart(int row)
|
||||||
{
|
{
|
||||||
return (int)Math.Ceiling(Math.Max(0, row - FullRows) / 2.0);
|
return (int)Math.Ceiling(Math.Max(0, row - FullRows) / 2.0);
|
||||||
}
|
}
|
||||||
public int Columns(int row)
|
|
||||||
|
public int XEnd(int row)
|
||||||
{
|
{
|
||||||
EnsureRowInRange(row);
|
if (row == 0) return MaxColumns - EmptyFirstRow;
|
||||||
return MaxColumns - EmptyColumns(row);
|
return MaxColumns;
|
||||||
}
|
}
|
||||||
|
|
||||||
public int RowToLinearAddress(int row)
|
public int RowToLinearAddress(int row)
|
||||||
{
|
{
|
||||||
EnsureRowInRange(row);
|
EnsureRowInRange(row);
|
||||||
|
|
||||||
var ret = 0;
|
int ret = 0;
|
||||||
|
|
||||||
if (row > 0)
|
for (var i = 0; i < row; i++)
|
||||||
{
|
ret += XEnd(i) - XStart(i);
|
||||||
for (var i = 0; i < row; i++)
|
|
||||||
ret += Columns(i);
|
|
||||||
}
|
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
@@ -175,13 +177,13 @@ namespace Starlight.AnimeMatrix
|
|||||||
|
|
||||||
public void SetLedLinear(int address, byte value)
|
public void SetLedLinear(int address, byte value)
|
||||||
{
|
{
|
||||||
EnsureAddressableLed(address);
|
if (!IsAddressableLed(address)) return;
|
||||||
_displayBuffer[address] = value;
|
_displayBuffer[address] = value;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void SetLedLinearImmediate(int address, byte value)
|
public void SetLedLinearImmediate(int address, byte value)
|
||||||
{
|
{
|
||||||
EnsureAddressableLed(address);
|
if (!IsAddressableLed(address)) return;
|
||||||
_displayBuffer[address] = value;
|
_displayBuffer[address] = value;
|
||||||
|
|
||||||
Set(Packet<AnimeMatrixPacket>(0xC0, 0x02)
|
Set(Packet<AnimeMatrixPacket>(0xC0, 0x02)
|
||||||
@@ -193,13 +195,20 @@ namespace Starlight.AnimeMatrix
|
|||||||
Set(Packet<AnimeMatrixPacket>(0xC0, 0x03));
|
Set(Packet<AnimeMatrixPacket>(0xC0, 0x03));
|
||||||
}
|
}
|
||||||
|
|
||||||
public void SetLedPlanar(int x, int y, byte value)
|
public int SetLedPlanar(int x, int y, byte value)
|
||||||
{
|
{
|
||||||
EnsureRowInRange(y);
|
EnsureRowInRange(y);
|
||||||
var start = RowToLinearAddress(y) - EmptyColumns(y);
|
var start = RowToLinearAddress(y) - XStart(y);
|
||||||
|
|
||||||
if (x > EmptyColumns(y))
|
if (x >= XStart(y) && x < XEnd(y))
|
||||||
|
{
|
||||||
|
//Debug.Write((start + x).ToString("D4") + ",");
|
||||||
SetLedLinear(start + x, value);
|
SetLedLinear(start + x, value);
|
||||||
|
return start + x;
|
||||||
|
}
|
||||||
|
|
||||||
|
//Debug.Write(" ");
|
||||||
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void Clear(bool present = false)
|
public void Clear(bool present = false)
|
||||||
@@ -214,26 +223,23 @@ namespace Starlight.AnimeMatrix
|
|||||||
public void Present()
|
public void Present()
|
||||||
{
|
{
|
||||||
|
|
||||||
Set(Packet<AnimeMatrixPacket>(0xC0, 0x02)
|
int page = 0;
|
||||||
.AppendData(BitConverter.GetBytes((ushort)(UpdatePageLength * 0 + 1)))
|
int start, end;
|
||||||
.AppendData(BitConverter.GetBytes((ushort)UpdatePageLength))
|
|
||||||
.AppendData(_displayBuffer[(UpdatePageLength * 0)..(UpdatePageLength * 1)])
|
|
||||||
);
|
|
||||||
|
|
||||||
Set(Packet<AnimeMatrixPacket>(0xC0, 0x02)
|
while (page * UpdatePageLength < LedCount)
|
||||||
.AppendData(BitConverter.GetBytes((ushort)(UpdatePageLength * 1 + 1)))
|
{
|
||||||
.AppendData(BitConverter.GetBytes((ushort)UpdatePageLength))
|
start = page * UpdatePageLength;
|
||||||
.AppendData(_displayBuffer[(UpdatePageLength * 1)..(UpdatePageLength * 2)])
|
end = Math.Min(LedCount, (page + 1) * UpdatePageLength);
|
||||||
);
|
|
||||||
|
|
||||||
if (pages > 2)
|
|
||||||
Set(Packet<AnimeMatrixPacket>(0xC0, 0x02)
|
Set(Packet<AnimeMatrixPacket>(0xC0, 0x02)
|
||||||
.AppendData(BitConverter.GetBytes((ushort)(UpdatePageLength * 2 + 1)))
|
.AppendData(BitConverter.GetBytes((ushort)(start + 1)))
|
||||||
.AppendData(BitConverter.GetBytes((ushort)(LedCount - UpdatePageLength * 2)))
|
.AppendData(BitConverter.GetBytes((ushort)(end - start)))
|
||||||
.AppendData(
|
.AppendData(_displayBuffer[start..end])
|
||||||
_displayBuffer[(UpdatePageLength * 2)..(UpdatePageLength * 2 + (LedCount - UpdatePageLength * 2))])
|
|
||||||
);
|
);
|
||||||
|
|
||||||
|
page++;
|
||||||
|
}
|
||||||
|
|
||||||
Set(Packet<AnimeMatrixPacket>(0xC0, 0x03));
|
Set(Packet<AnimeMatrixPacket>(0xC0, 0x03));
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -270,6 +276,11 @@ namespace Starlight.AnimeMatrix
|
|||||||
Set(Packet<AnimeMatrixPacket>(0xC5, animation.AsByte));
|
Set(Packet<AnimeMatrixPacket>(0xC5, animation.AsByte));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static int GetColor(Bitmap bmp, int x, int y)
|
||||||
|
{
|
||||||
|
var pixel = bmp.GetPixel(Math.Max(0, Math.Min(bmp.Width - 1, x)), Math.Max(0, Math.Min(bmp.Height - 1, y)));
|
||||||
|
return (Math.Max((pixel.R + pixel.G + pixel.B) / 3 - 10, 0));
|
||||||
|
}
|
||||||
public void GenerateFrame(Image image)
|
public void GenerateFrame(Image image)
|
||||||
{
|
{
|
||||||
|
|
||||||
@@ -289,18 +300,32 @@ namespace Starlight.AnimeMatrix
|
|||||||
graph.CompositingQuality = System.Drawing.Drawing2D.CompositingQuality.HighQuality;
|
graph.CompositingQuality = System.Drawing.Drawing2D.CompositingQuality.HighQuality;
|
||||||
graph.SmoothingMode = System.Drawing.Drawing2D.SmoothingMode.AntiAlias;
|
graph.SmoothingMode = System.Drawing.Drawing2D.SmoothingMode.AntiAlias;
|
||||||
|
|
||||||
graph.DrawImage(image, ((int)width - scaleWidth), ((int)height - scaleHeight) / 2, scaleWidth, scaleHeight);
|
graph.DrawImage(image, ((int)width - scaleWidth), 0, scaleWidth, scaleHeight);
|
||||||
|
|
||||||
Bitmap bmp = new Bitmap(canvas, MaxColumns, MaxRows);
|
int addr, counter = 0;
|
||||||
|
|
||||||
|
Bitmap bmp = new Bitmap(canvas, MaxColumns * 2, MaxRows);
|
||||||
|
|
||||||
for (int y = 0; y < bmp.Height; y++)
|
for (int y = 0; y < bmp.Height; y++)
|
||||||
{
|
{
|
||||||
for (int x = 0; x < bmp.Width; x++)
|
for (int x = 0; x < bmp.Width; x++)
|
||||||
{
|
{
|
||||||
var pixel = bmp.GetPixel(x, y);
|
if (x % 2 == y % 2)
|
||||||
byte color = (byte)(Math.Max((pixel.R + pixel.G + pixel.B) / 3 - 10, 0));
|
{
|
||||||
SetLedPlanar(x, y, color);
|
var color = GetColor(bmp, x, y);
|
||||||
|
//var color2= GetColor(bmp, x+1, y);
|
||||||
|
addr = SetLedPlanar(x / 2, y, (byte)color);
|
||||||
|
if (addr != -1) {
|
||||||
|
if (addr != counter)
|
||||||
|
Debug.Write("ERROR");
|
||||||
|
counter++;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
//Debug.Write("\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -313,12 +338,9 @@ namespace Starlight.AnimeMatrix
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void EnsureAddressableLed(int address)
|
private bool IsAddressableLed(int address)
|
||||||
{
|
{
|
||||||
if (address < 0 || address >= LedCount)
|
return (address >= 0 && address < LedCount);
|
||||||
{
|
|
||||||
throw new IndexOutOfRangeException($"Linear LED address must be in range of [0, {LedCount - 1}].");
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
<?xml version="1.0" encoding="utf-8" ?>
|
<?xml version="1.0" encoding="utf-8" ?>
|
||||||
<configuration>
|
<configuration>
|
||||||
<System.Windows.Forms.ApplicationConfigurationSection>
|
<System.Windows.Forms.ApplicationConfigurationSection>
|
||||||
<add key="DpiAwareness" value="System" />
|
<add key="DpiAwareness" value="PerMonitorV2" />
|
||||||
</System.Windows.Forms.ApplicationConfigurationSection>
|
</System.Windows.Forms.ApplicationConfigurationSection>
|
||||||
<appSettings>
|
<appSettings>
|
||||||
<add key="EnableWindowsFormsHighDpiAutoResizing" value="true" />
|
<add key="EnableWindowsFormsHighDpiAutoResizing" value="true" />
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
using System.Text.Json;
|
using System.Management;
|
||||||
|
using System.Text.Json;
|
||||||
|
|
||||||
public class AppConfig
|
public class AppConfig
|
||||||
{
|
{
|
||||||
@@ -6,6 +7,8 @@ public class AppConfig
|
|||||||
public string appPath;
|
public string appPath;
|
||||||
string configFile;
|
string configFile;
|
||||||
|
|
||||||
|
string _model;
|
||||||
|
|
||||||
public Dictionary<string, object> config = new Dictionary<string, object>();
|
public Dictionary<string, object> config = new Dictionary<string, object>();
|
||||||
|
|
||||||
public AppConfig()
|
public AppConfig()
|
||||||
@@ -36,6 +39,26 @@ public class AppConfig
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
public bool ContainsModel(string contains)
|
||||||
|
{
|
||||||
|
if (_model is null)
|
||||||
|
{
|
||||||
|
_model = "";
|
||||||
|
using (var searcher = new ManagementObjectSearcher(@"Select * from Win32_ComputerSystem"))
|
||||||
|
{
|
||||||
|
foreach (var process in searcher.Get())
|
||||||
|
{
|
||||||
|
_model = process["Model"].ToString();
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return (_model is not null && _model.Contains(contains));
|
||||||
|
|
||||||
|
}
|
||||||
private void initConfig()
|
private void initConfig()
|
||||||
{
|
{
|
||||||
config = new Dictionary<string, object>();
|
config = new Dictionary<string, object>();
|
||||||
|
|||||||
182
app/ControlHelper.cs
Normal file
@@ -0,0 +1,182 @@
|
|||||||
|
using CustomControls;
|
||||||
|
using System.Drawing.Drawing2D;
|
||||||
|
using System.Windows.Forms.DataVisualization.Charting;
|
||||||
|
|
||||||
|
public static class ControlHelper
|
||||||
|
{
|
||||||
|
|
||||||
|
static bool _invert = false;
|
||||||
|
static bool _resize = false;
|
||||||
|
|
||||||
|
static float _scale = 1;
|
||||||
|
|
||||||
|
static Color formBack;
|
||||||
|
static Color backMain;
|
||||||
|
static Color foreMain;
|
||||||
|
static Color foreAccent;
|
||||||
|
static Color borderMain;
|
||||||
|
static Color buttonMain;
|
||||||
|
|
||||||
|
public static void Adjust(RForm container, bool darkTheme = false, bool invert = false)
|
||||||
|
{
|
||||||
|
|
||||||
|
if (darkTheme)
|
||||||
|
{
|
||||||
|
formBack = Color.FromArgb(255, 35, 35, 35);
|
||||||
|
backMain = Color.FromArgb(255, 50, 50, 50);
|
||||||
|
foreMain = Color.White;
|
||||||
|
foreAccent = Color.FromArgb(255, 100, 100, 100);
|
||||||
|
borderMain = Color.FromArgb(255, 50, 50, 50);
|
||||||
|
buttonMain = Color.FromArgb(255, 80, 80, 80);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
formBack = SystemColors.Control;
|
||||||
|
backMain = SystemColors.ControlLightLight;
|
||||||
|
foreMain = SystemColors.ControlText;
|
||||||
|
foreAccent = Color.LightGray;
|
||||||
|
borderMain = Color.LightGray;
|
||||||
|
buttonMain = SystemColors.ControlLight;
|
||||||
|
}
|
||||||
|
|
||||||
|
container.BackColor = formBack;
|
||||||
|
container.ForeColor = foreMain;
|
||||||
|
|
||||||
|
_invert = invert;
|
||||||
|
AdjustControls(container.Controls);
|
||||||
|
_invert = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void Resize(RForm container, float baseScale = 2)
|
||||||
|
{
|
||||||
|
_scale = GetDpiScale(container).Value / baseScale;
|
||||||
|
ResizeControls(container.Controls);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
private static void ResizeControls(Control.ControlCollection controls)
|
||||||
|
{
|
||||||
|
foreach (Control control in controls)
|
||||||
|
{
|
||||||
|
var button = control as RButton;
|
||||||
|
if (button != null && button.Image is not null)
|
||||||
|
button.Image = ResizeImage(button.Image);
|
||||||
|
|
||||||
|
var pictureBox = control as PictureBox;
|
||||||
|
if (pictureBox != null && pictureBox.BackgroundImage is not null)
|
||||||
|
pictureBox.BackgroundImage = ResizeImage(pictureBox.BackgroundImage);
|
||||||
|
|
||||||
|
ResizeControls(control.Controls);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
private static void AdjustControls(Control.ControlCollection controls)
|
||||||
|
{
|
||||||
|
foreach (Control control in controls)
|
||||||
|
{
|
||||||
|
var button = control as RButton;
|
||||||
|
if (button != null)
|
||||||
|
{
|
||||||
|
button.BackColor = button.Secondary ? buttonMain : backMain;
|
||||||
|
button.ForeColor = foreMain;
|
||||||
|
|
||||||
|
button.FlatStyle = FlatStyle.Flat;
|
||||||
|
button.FlatAppearance.BorderColor = borderMain;
|
||||||
|
|
||||||
|
if (button.Image is not null)
|
||||||
|
button.Image = AdjustImage(button.Image);
|
||||||
|
}
|
||||||
|
|
||||||
|
var pictureBox = control as PictureBox;
|
||||||
|
if (pictureBox != null && pictureBox.BackgroundImage is not null)
|
||||||
|
pictureBox.BackgroundImage = AdjustImage(pictureBox.BackgroundImage);
|
||||||
|
|
||||||
|
|
||||||
|
var combo = control as RComboBox;
|
||||||
|
if (combo != null)
|
||||||
|
{
|
||||||
|
combo.BackColor = backMain;
|
||||||
|
combo.ForeColor = foreMain;
|
||||||
|
combo.BorderColor = backMain;
|
||||||
|
combo.ButtonColor = buttonMain;
|
||||||
|
}
|
||||||
|
|
||||||
|
var gb = control as GroupBox;
|
||||||
|
if (gb != null)
|
||||||
|
{
|
||||||
|
gb.ForeColor = foreMain;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
var chart = control as Chart;
|
||||||
|
if (chart != null)
|
||||||
|
{
|
||||||
|
chart.BackColor = backMain;
|
||||||
|
chart.ChartAreas[0].BackColor = backMain;
|
||||||
|
chart.ChartAreas[0].AxisX.MajorGrid.LineColor = foreAccent;
|
||||||
|
chart.ChartAreas[0].AxisY.MajorGrid.LineColor = foreAccent;
|
||||||
|
|
||||||
|
chart.ChartAreas[0].AxisX.TitleForeColor = foreMain;
|
||||||
|
chart.ChartAreas[0].AxisY.TitleForeColor = foreMain;
|
||||||
|
|
||||||
|
chart.ChartAreas[0].AxisX.LabelStyle.ForeColor = foreMain;
|
||||||
|
chart.ChartAreas[0].AxisY.LabelStyle.ForeColor = foreMain;
|
||||||
|
|
||||||
|
chart.ChartAreas[0].AxisX.MajorTickMark.LineColor = foreMain;
|
||||||
|
chart.ChartAreas[0].AxisY.MajorTickMark.LineColor = foreMain;
|
||||||
|
|
||||||
|
chart.ChartAreas[0].AxisX.LineColor = foreAccent;
|
||||||
|
chart.ChartAreas[0].AxisY.LineColor = foreAccent;
|
||||||
|
|
||||||
|
chart.Titles[0].ForeColor = foreMain;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
AdjustControls(control.Controls);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static Lazy<float> GetDpiScale(Control control)
|
||||||
|
{
|
||||||
|
return new Lazy<float>(() =>
|
||||||
|
{
|
||||||
|
using (var graphics = control.CreateGraphics())
|
||||||
|
return graphics.DpiX / 96.0f;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
private static Image ResizeImage(Image image)
|
||||||
|
{
|
||||||
|
var newSize = new Size((int)(image.Width * _scale), (int)(image.Height * _scale));
|
||||||
|
var pic = new Bitmap(newSize.Width, newSize.Height);
|
||||||
|
|
||||||
|
using (var g = Graphics.FromImage(pic))
|
||||||
|
{
|
||||||
|
g.InterpolationMode = InterpolationMode.HighQualityBicubic;
|
||||||
|
g.DrawImage(image, new Rectangle(new Point(), newSize));
|
||||||
|
}
|
||||||
|
return pic;
|
||||||
|
}
|
||||||
|
|
||||||
|
private static Image AdjustImage(Image image)
|
||||||
|
{
|
||||||
|
var pic = new Bitmap(image);
|
||||||
|
|
||||||
|
if (_invert)
|
||||||
|
{
|
||||||
|
for (int y = 0; (y <= (pic.Height - 1)); y++)
|
||||||
|
{
|
||||||
|
for (int x = 0; (x <= (pic.Width - 1)); x++)
|
||||||
|
{
|
||||||
|
Color col = pic.GetPixel(x, y);
|
||||||
|
pic.SetPixel(x, y, Color.FromArgb(col.A, (255 - col.R), (255 - col.G), (255 - col.B)));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return pic;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
338
app/CustomControls.cs
Normal file
@@ -0,0 +1,338 @@
|
|||||||
|
using Microsoft.Win32;
|
||||||
|
using System.ComponentModel;
|
||||||
|
using System.Drawing.Drawing2D;
|
||||||
|
using System.Runtime.InteropServices;
|
||||||
|
|
||||||
|
namespace CustomControls
|
||||||
|
{
|
||||||
|
|
||||||
|
public class RForm : Form
|
||||||
|
{
|
||||||
|
|
||||||
|
protected static Color colorEco = Color.FromArgb(255, 6, 180, 138);
|
||||||
|
protected static Color colorStandard = Color.FromArgb(255, 58, 174, 239);
|
||||||
|
protected static Color colorTurbo = Color.FromArgb(255, 255, 32, 32);
|
||||||
|
|
||||||
|
[DllImport("UXTheme.dll", SetLastError = true, EntryPoint = "#138")]
|
||||||
|
public static extern bool CheckSystemDarkModeStatus();
|
||||||
|
|
||||||
|
[DllImport("DwmApi")] //System.Runtime.InteropServices
|
||||||
|
private static extern int DwmSetWindowAttribute(IntPtr hwnd, int attr, int[] attrValue, int attrSize);
|
||||||
|
|
||||||
|
public bool darkTheme = false;
|
||||||
|
|
||||||
|
private static bool IsDarkTheme()
|
||||||
|
{
|
||||||
|
using var key = Registry.CurrentUser.OpenSubKey(@"Software\Microsoft\Windows\CurrentVersion\Themes\Personalize");
|
||||||
|
var registryValueObject = key?.GetValue("AppsUseLightTheme");
|
||||||
|
|
||||||
|
if (registryValueObject == null) return false;
|
||||||
|
return (int)registryValueObject <= 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void InitTheme(bool setDPI = true)
|
||||||
|
{
|
||||||
|
bool newDarkTheme = IsDarkTheme();
|
||||||
|
bool changed = (darkTheme != newDarkTheme);
|
||||||
|
darkTheme = newDarkTheme;
|
||||||
|
|
||||||
|
if (setDPI)
|
||||||
|
ControlHelper.Resize(this);
|
||||||
|
|
||||||
|
DwmSetWindowAttribute(this.Handle, 20, new[] { darkTheme ? 1 : 0 }, 4);
|
||||||
|
ControlHelper.Adjust(this, darkTheme, changed);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public class RTrackBar : TrackBar
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public class RComboBox : ComboBox
|
||||||
|
{
|
||||||
|
private Color borderColor = Color.Gray;
|
||||||
|
[DefaultValue(typeof(Color), "Gray")]
|
||||||
|
public Color BorderColor
|
||||||
|
{
|
||||||
|
get { return borderColor; }
|
||||||
|
set
|
||||||
|
{
|
||||||
|
if (borderColor != value)
|
||||||
|
{
|
||||||
|
borderColor = value;
|
||||||
|
Invalidate();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
private Color buttonColor = Color.LightGray;
|
||||||
|
[DefaultValue(typeof(Color), "LightGray")]
|
||||||
|
public Color ButtonColor
|
||||||
|
{
|
||||||
|
get { return buttonColor; }
|
||||||
|
set
|
||||||
|
{
|
||||||
|
if (buttonColor != value)
|
||||||
|
{
|
||||||
|
buttonColor = value;
|
||||||
|
Invalidate();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private Color arrowColor = Color.Black;
|
||||||
|
[DefaultValue(typeof(Color), "Black")]
|
||||||
|
public Color ArrowColor
|
||||||
|
{
|
||||||
|
get { return arrowColor; }
|
||||||
|
set
|
||||||
|
{
|
||||||
|
if (arrowColor != value)
|
||||||
|
{
|
||||||
|
arrowColor = value;
|
||||||
|
Invalidate();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
protected override void WndProc(ref Message m)
|
||||||
|
{
|
||||||
|
if (m.Msg == WM_PAINT && DropDownStyle != ComboBoxStyle.Simple)
|
||||||
|
{
|
||||||
|
var clientRect = ClientRectangle;
|
||||||
|
var dropDownButtonWidth = SystemInformation.HorizontalScrollBarArrowWidth;
|
||||||
|
var outerBorder = new Rectangle(clientRect.Location,
|
||||||
|
new Size(clientRect.Width - 1, clientRect.Height - 1));
|
||||||
|
var innerBorder = new Rectangle(outerBorder.X + 1, outerBorder.Y + 1,
|
||||||
|
outerBorder.Width - dropDownButtonWidth - 2, outerBorder.Height - 2);
|
||||||
|
var innerInnerBorder = new Rectangle(innerBorder.X + 1, innerBorder.Y + 1,
|
||||||
|
innerBorder.Width - 2, innerBorder.Height - 2);
|
||||||
|
var dropDownRect = new Rectangle(innerBorder.Right + 1, innerBorder.Y,
|
||||||
|
dropDownButtonWidth, innerBorder.Height + 1);
|
||||||
|
if (RightToLeft == RightToLeft.Yes)
|
||||||
|
{
|
||||||
|
innerBorder.X = clientRect.Width - innerBorder.Right;
|
||||||
|
innerInnerBorder.X = clientRect.Width - innerInnerBorder.Right;
|
||||||
|
dropDownRect.X = clientRect.Width - dropDownRect.Right;
|
||||||
|
dropDownRect.Width += 1;
|
||||||
|
}
|
||||||
|
var innerBorderColor = Enabled ? BackColor : SystemColors.Control;
|
||||||
|
var outerBorderColor = Enabled ? BorderColor : SystemColors.ControlDark;
|
||||||
|
var buttonColor = Enabled ? ButtonColor : SystemColors.Control;
|
||||||
|
var middle = new Point(dropDownRect.Left + dropDownRect.Width / 2,
|
||||||
|
dropDownRect.Top + dropDownRect.Height / 2);
|
||||||
|
var arrow = new Point[]
|
||||||
|
{
|
||||||
|
new Point(middle.X - 3, middle.Y - 2),
|
||||||
|
new Point(middle.X + 4, middle.Y - 2),
|
||||||
|
new Point(middle.X, middle.Y + 2)
|
||||||
|
};
|
||||||
|
var ps = new PAINTSTRUCT();
|
||||||
|
bool shoulEndPaint = false;
|
||||||
|
IntPtr dc;
|
||||||
|
if (m.WParam == IntPtr.Zero)
|
||||||
|
{
|
||||||
|
dc = BeginPaint(Handle, ref ps);
|
||||||
|
m.WParam = dc;
|
||||||
|
shoulEndPaint = true;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
dc = m.WParam;
|
||||||
|
}
|
||||||
|
var rgn = CreateRectRgn(innerInnerBorder.Left, innerInnerBorder.Top,
|
||||||
|
innerInnerBorder.Right, innerInnerBorder.Bottom);
|
||||||
|
SelectClipRgn(dc, rgn);
|
||||||
|
DefWndProc(ref m);
|
||||||
|
DeleteObject(rgn);
|
||||||
|
rgn = CreateRectRgn(clientRect.Left, clientRect.Top,
|
||||||
|
clientRect.Right, clientRect.Bottom);
|
||||||
|
SelectClipRgn(dc, rgn);
|
||||||
|
using (var g = Graphics.FromHdc(dc))
|
||||||
|
{
|
||||||
|
using (var b = new SolidBrush(buttonColor))
|
||||||
|
{
|
||||||
|
g.FillRectangle(b, dropDownRect);
|
||||||
|
}
|
||||||
|
using (var b = new SolidBrush(arrowColor))
|
||||||
|
{
|
||||||
|
g.FillPolygon(b, arrow);
|
||||||
|
}
|
||||||
|
using (var p = new Pen(innerBorderColor))
|
||||||
|
{
|
||||||
|
g.DrawRectangle(p, innerBorder);
|
||||||
|
g.DrawRectangle(p, innerInnerBorder);
|
||||||
|
}
|
||||||
|
using (var p = new Pen(outerBorderColor))
|
||||||
|
{
|
||||||
|
g.DrawRectangle(p, outerBorder);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (shoulEndPaint)
|
||||||
|
EndPaint(Handle, ref ps);
|
||||||
|
DeleteObject(rgn);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
base.WndProc(ref m);
|
||||||
|
}
|
||||||
|
|
||||||
|
private const int WM_PAINT = 0xF;
|
||||||
|
[StructLayout(LayoutKind.Sequential)]
|
||||||
|
public struct RECT
|
||||||
|
{
|
||||||
|
public int L, T, R, B;
|
||||||
|
}
|
||||||
|
[StructLayout(LayoutKind.Sequential)]
|
||||||
|
public struct PAINTSTRUCT
|
||||||
|
{
|
||||||
|
public IntPtr hdc;
|
||||||
|
public bool fErase;
|
||||||
|
public int rcPaint_left;
|
||||||
|
public int rcPaint_top;
|
||||||
|
public int rcPaint_right;
|
||||||
|
public int rcPaint_bottom;
|
||||||
|
public bool fRestore;
|
||||||
|
public bool fIncUpdate;
|
||||||
|
public int reserved1;
|
||||||
|
public int reserved2;
|
||||||
|
public int reserved3;
|
||||||
|
public int reserved4;
|
||||||
|
public int reserved5;
|
||||||
|
public int reserved6;
|
||||||
|
public int reserved7;
|
||||||
|
public int reserved8;
|
||||||
|
}
|
||||||
|
[DllImport("user32.dll")]
|
||||||
|
private static extern IntPtr BeginPaint(IntPtr hWnd,
|
||||||
|
[In, Out] ref PAINTSTRUCT lpPaint);
|
||||||
|
|
||||||
|
[DllImport("user32.dll")]
|
||||||
|
private static extern bool EndPaint(IntPtr hWnd, ref PAINTSTRUCT lpPaint);
|
||||||
|
|
||||||
|
[DllImport("gdi32.dll")]
|
||||||
|
public static extern int SelectClipRgn(IntPtr hDC, IntPtr hRgn);
|
||||||
|
|
||||||
|
[DllImport("user32.dll")]
|
||||||
|
public static extern int GetUpdateRgn(IntPtr hwnd, IntPtr hrgn, bool fErase);
|
||||||
|
public enum RegionFlags
|
||||||
|
{
|
||||||
|
ERROR = 0,
|
||||||
|
NULLREGION = 1,
|
||||||
|
SIMPLEREGION = 2,
|
||||||
|
COMPLEXREGION = 3,
|
||||||
|
}
|
||||||
|
[DllImport("gdi32.dll")]
|
||||||
|
internal static extern bool DeleteObject(IntPtr hObject);
|
||||||
|
|
||||||
|
[DllImport("gdi32.dll")]
|
||||||
|
private static extern IntPtr CreateRectRgn(int x1, int y1, int x2, int y2);
|
||||||
|
}
|
||||||
|
|
||||||
|
public class RButton : Button
|
||||||
|
{
|
||||||
|
//Fields
|
||||||
|
private int borderSize = 5;
|
||||||
|
private int borderRadius = 5;
|
||||||
|
|
||||||
|
private bool activated = false;
|
||||||
|
private bool secondary = false;
|
||||||
|
|
||||||
|
private Color borderColor = Color.Transparent;
|
||||||
|
|
||||||
|
public Color BorderColor
|
||||||
|
{
|
||||||
|
get { return borderColor; }
|
||||||
|
set
|
||||||
|
{
|
||||||
|
borderColor = value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public bool Activated
|
||||||
|
{
|
||||||
|
get { return activated; }
|
||||||
|
set
|
||||||
|
{
|
||||||
|
if (activated != value)
|
||||||
|
this.Invalidate();
|
||||||
|
activated = value;
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public bool Secondary
|
||||||
|
{
|
||||||
|
get { return secondary; }
|
||||||
|
set
|
||||||
|
{
|
||||||
|
secondary = value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public RButton()
|
||||||
|
{
|
||||||
|
this.FlatStyle = FlatStyle.Flat;
|
||||||
|
this.FlatAppearance.BorderSize = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
private GraphicsPath GetFigurePath(Rectangle rect, int radius)
|
||||||
|
{
|
||||||
|
GraphicsPath path = new GraphicsPath();
|
||||||
|
float curveSize = radius * 2F;
|
||||||
|
|
||||||
|
path.StartFigure();
|
||||||
|
path.AddArc(rect.X, rect.Y, curveSize, curveSize, 180, 90);
|
||||||
|
path.AddArc(rect.Right - curveSize, rect.Y, curveSize, curveSize, 270, 90);
|
||||||
|
path.AddArc(rect.Right - curveSize, rect.Bottom - curveSize, curveSize, curveSize, 0, 90);
|
||||||
|
path.AddArc(rect.X, rect.Bottom - curveSize, curveSize, curveSize, 90, 90);
|
||||||
|
path.CloseFigure();
|
||||||
|
return path;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
protected override void OnPaint(PaintEventArgs pevent)
|
||||||
|
{
|
||||||
|
|
||||||
|
base.OnPaint(pevent);
|
||||||
|
|
||||||
|
float ratio = pevent.Graphics.DpiX / 192.0f;
|
||||||
|
int border = (int)(ratio * borderSize);
|
||||||
|
|
||||||
|
Rectangle rectSurface = this.ClientRectangle;
|
||||||
|
Rectangle rectBorder = Rectangle.Inflate(rectSurface, -border, -border);
|
||||||
|
|
||||||
|
Color borderDrawColor = activated ? borderColor : Color.Transparent;
|
||||||
|
|
||||||
|
using (GraphicsPath pathSurface = GetFigurePath(rectSurface, borderRadius + border))
|
||||||
|
using (GraphicsPath pathBorder = GetFigurePath(rectBorder, borderRadius))
|
||||||
|
using (Pen penSurface = new Pen(this.Parent.BackColor, border))
|
||||||
|
using (Pen penBorder = new Pen(borderDrawColor, border))
|
||||||
|
{
|
||||||
|
penBorder.Alignment = PenAlignment.Outset;
|
||||||
|
pevent.Graphics.SmoothingMode = SmoothingMode.AntiAlias;
|
||||||
|
this.Region = new Region(pathSurface);
|
||||||
|
pevent.Graphics.DrawPath(penSurface, pathSurface);
|
||||||
|
pevent.Graphics.DrawPath(penBorder, pathBorder);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!Enabled && ForeColor != SystemColors.ControlText)
|
||||||
|
{
|
||||||
|
var rect = pevent.ClipRectangle;
|
||||||
|
if (Image is not null)
|
||||||
|
{
|
||||||
|
rect.Y += Image.Height;
|
||||||
|
rect.Height -= Image.Height;
|
||||||
|
}
|
||||||
|
TextFormatFlags flags = TextFormatFlags.HorizontalCenter | TextFormatFlags.VerticalCenter | TextFormatFlags.WordBreak;
|
||||||
|
TextRenderer.DrawText(pevent.Graphics, this.Text, this.Font, rect, Color.Gray, flags);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
120
app/CustomControls.resx
Normal file
@@ -0,0 +1,120 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<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:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||||
|
<xsd:element name="root" msdata:IsDataSet="true">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:choice maxOccurs="unbounded">
|
||||||
|
<xsd:element name="metadata">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||||
|
<xsd:attribute name="type" type="xsd:string" />
|
||||||
|
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||||
|
<xsd:attribute ref="xml:space" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
<xsd:element name="assembly">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:attribute name="alias" type="xsd:string" />
|
||||||
|
<xsd:attribute name="name" type="xsd:string" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
<xsd:element name="data">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||||
|
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||||
|
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||||
|
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||||
|
<xsd:attribute ref="xml:space" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
<xsd:element name="resheader">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
</xsd:choice>
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
</xsd:schema>
|
||||||
|
<resheader name="resmimetype">
|
||||||
|
<value>text/microsoft-resx</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="version">
|
||||||
|
<value>2.0</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="reader">
|
||||||
|
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="writer">
|
||||||
|
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
|
</resheader>
|
||||||
|
</root>
|
||||||
107
app/Fans.Designer.cs
generated
@@ -1,4 +1,7 @@
|
|||||||
namespace GHelper
|
using CustomControls;
|
||||||
|
using System.Windows.Forms.DataVisualization.Charting;
|
||||||
|
|
||||||
|
namespace GHelper
|
||||||
{
|
{
|
||||||
partial class Fans
|
partial class Fans
|
||||||
{
|
{
|
||||||
@@ -28,24 +31,30 @@
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
private void InitializeComponent()
|
private void InitializeComponent()
|
||||||
{
|
{
|
||||||
System.Windows.Forms.DataVisualization.Charting.ChartArea chartArea1 = new System.Windows.Forms.DataVisualization.Charting.ChartArea();
|
ChartArea chartArea1 = new ChartArea();
|
||||||
System.Windows.Forms.DataVisualization.Charting.ChartArea chartArea2 = new System.Windows.Forms.DataVisualization.Charting.ChartArea();
|
Title title1 = new Title();
|
||||||
|
ChartArea chartArea2 = new ChartArea();
|
||||||
|
Title title2 = new Title();
|
||||||
|
ChartArea chartArea3 = new ChartArea();
|
||||||
|
Title title3 = new Title();
|
||||||
panelFans = new Panel();
|
panelFans = new Panel();
|
||||||
|
labelTip = new Label();
|
||||||
labelBoost = new Label();
|
labelBoost = new Label();
|
||||||
comboBoost = new ComboBox();
|
comboBoost = new RComboBox();
|
||||||
picturePerf = new PictureBox();
|
picturePerf = new PictureBox();
|
||||||
tableFanCharts = new TableLayoutPanel();
|
tableFanCharts = new TableLayoutPanel();
|
||||||
chartGPU = new System.Windows.Forms.DataVisualization.Charting.Chart();
|
chartGPU = new Chart();
|
||||||
chartCPU = new System.Windows.Forms.DataVisualization.Charting.Chart();
|
chartCPU = new Chart();
|
||||||
|
chartMid = new Chart();
|
||||||
labelFans = new Label();
|
labelFans = new Label();
|
||||||
checkAuto = new CheckBox();
|
checkAuto = new CheckBox();
|
||||||
buttonReset = new Button();
|
buttonReset = new RButton();
|
||||||
buttonApply = new Button();
|
buttonApply = new RButton();
|
||||||
panelPower = new Panel();
|
panelPower = new Panel();
|
||||||
pictureBox1 = new PictureBox();
|
pictureBox1 = new PictureBox();
|
||||||
labelPowerLimits = new Label();
|
labelPowerLimits = new Label();
|
||||||
checkApplyPower = new CheckBox();
|
checkApplyPower = new CheckBox();
|
||||||
buttonApplyPower = new Button();
|
buttonApplyPower = new RButton();
|
||||||
panelCPU = new Panel();
|
panelCPU = new Panel();
|
||||||
labelCPU = new Label();
|
labelCPU = new Label();
|
||||||
label2 = new Label();
|
label2 = new Label();
|
||||||
@@ -62,6 +71,7 @@
|
|||||||
tableFanCharts.SuspendLayout();
|
tableFanCharts.SuspendLayout();
|
||||||
((System.ComponentModel.ISupportInitialize)chartGPU).BeginInit();
|
((System.ComponentModel.ISupportInitialize)chartGPU).BeginInit();
|
||||||
((System.ComponentModel.ISupportInitialize)chartCPU).BeginInit();
|
((System.ComponentModel.ISupportInitialize)chartCPU).BeginInit();
|
||||||
|
((System.ComponentModel.ISupportInitialize)chartMid).BeginInit();
|
||||||
panelPower.SuspendLayout();
|
panelPower.SuspendLayout();
|
||||||
((System.ComponentModel.ISupportInitialize)pictureBox1).BeginInit();
|
((System.ComponentModel.ISupportInitialize)pictureBox1).BeginInit();
|
||||||
panelCPU.SuspendLayout();
|
panelCPU.SuspendLayout();
|
||||||
@@ -73,6 +83,7 @@
|
|||||||
//
|
//
|
||||||
// panelFans
|
// panelFans
|
||||||
//
|
//
|
||||||
|
panelFans.Controls.Add(labelTip);
|
||||||
panelFans.Controls.Add(labelBoost);
|
panelFans.Controls.Add(labelBoost);
|
||||||
panelFans.Controls.Add(comboBoost);
|
panelFans.Controls.Add(comboBoost);
|
||||||
panelFans.Controls.Add(picturePerf);
|
panelFans.Controls.Add(picturePerf);
|
||||||
@@ -89,6 +100,17 @@
|
|||||||
panelFans.Size = new Size(824, 1159);
|
panelFans.Size = new Size(824, 1159);
|
||||||
panelFans.TabIndex = 12;
|
panelFans.TabIndex = 12;
|
||||||
//
|
//
|
||||||
|
// labelTip
|
||||||
|
//
|
||||||
|
labelTip.AutoSize = true;
|
||||||
|
labelTip.BackColor = SystemColors.ControlLightLight;
|
||||||
|
labelTip.Location = new Point(245, 13);
|
||||||
|
labelTip.Name = "labelTip";
|
||||||
|
labelTip.Padding = new Padding(5);
|
||||||
|
labelTip.Size = new Size(107, 42);
|
||||||
|
labelTip.TabIndex = 40;
|
||||||
|
labelTip.Text = "500,300";
|
||||||
|
//
|
||||||
// labelBoost
|
// labelBoost
|
||||||
//
|
//
|
||||||
labelBoost.AutoSize = true;
|
labelBoost.AutoSize = true;
|
||||||
@@ -101,6 +123,7 @@
|
|||||||
// comboBoost
|
// comboBoost
|
||||||
//
|
//
|
||||||
comboBoost.Anchor = AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right;
|
comboBoost.Anchor = AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right;
|
||||||
|
comboBoost.BorderColor = Color.White;
|
||||||
comboBoost.DropDownStyle = ComboBoxStyle.DropDownList;
|
comboBoost.DropDownStyle = ComboBoxStyle.DropDownList;
|
||||||
comboBoost.FormattingEnabled = true;
|
comboBoost.FormattingEnabled = true;
|
||||||
comboBoost.Items.AddRange(new object[] { "Disabled", "Enabled", "Aggressive", "Efficient Enabled", "Efficient Aggressive" });
|
comboBoost.Items.AddRange(new object[] { "Disabled", "Enabled", "Aggressive", "Efficient Enabled", "Efficient Aggressive" });
|
||||||
@@ -128,14 +151,14 @@
|
|||||||
tableFanCharts.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 100F));
|
tableFanCharts.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 100F));
|
||||||
tableFanCharts.Controls.Add(chartGPU, 0, 1);
|
tableFanCharts.Controls.Add(chartGPU, 0, 1);
|
||||||
tableFanCharts.Controls.Add(chartCPU, 0, 0);
|
tableFanCharts.Controls.Add(chartCPU, 0, 0);
|
||||||
|
tableFanCharts.Controls.Add(chartMid, 0, 2);
|
||||||
tableFanCharts.Location = new Point(28, 64);
|
tableFanCharts.Location = new Point(28, 64);
|
||||||
tableFanCharts.Margin = new Padding(6);
|
tableFanCharts.Margin = new Padding(6);
|
||||||
tableFanCharts.Name = "tableFanCharts";
|
tableFanCharts.Name = "tableFanCharts";
|
||||||
tableFanCharts.RowCount = 2;
|
tableFanCharts.RowCount = 2;
|
||||||
tableFanCharts.RowStyles.Add(new RowStyle(SizeType.Percent, 50F));
|
tableFanCharts.RowStyles.Add(new RowStyle(SizeType.Percent, 33F));
|
||||||
tableFanCharts.RowStyles.Add(new RowStyle(SizeType.Percent, 50F));
|
tableFanCharts.RowStyles.Add(new RowStyle(SizeType.Percent, 33F));
|
||||||
tableFanCharts.RowStyles.Add(new RowStyle(SizeType.Absolute, 40F));
|
tableFanCharts.RowStyles.Add(new RowStyle(SizeType.Percent, 33F));
|
||||||
tableFanCharts.RowStyles.Add(new RowStyle(SizeType.Absolute, 40F));
|
|
||||||
tableFanCharts.Size = new Size(764, 992);
|
tableFanCharts.Size = new Size(764, 992);
|
||||||
tableFanCharts.TabIndex = 36;
|
tableFanCharts.TabIndex = 36;
|
||||||
//
|
//
|
||||||
@@ -144,12 +167,14 @@
|
|||||||
chartArea1.Name = "ChartArea1";
|
chartArea1.Name = "ChartArea1";
|
||||||
chartGPU.ChartAreas.Add(chartArea1);
|
chartGPU.ChartAreas.Add(chartArea1);
|
||||||
chartGPU.Dock = DockStyle.Fill;
|
chartGPU.Dock = DockStyle.Fill;
|
||||||
chartGPU.Location = new Point(2, 506);
|
chartGPU.Location = new Point(2, 340);
|
||||||
chartGPU.Margin = new Padding(2, 10, 2, 10);
|
chartGPU.Margin = new Padding(2, 10, 2, 10);
|
||||||
chartGPU.Name = "chartGPU";
|
chartGPU.Name = "chartGPU";
|
||||||
chartGPU.Size = new Size(760, 476);
|
chartGPU.Size = new Size(760, 310);
|
||||||
chartGPU.TabIndex = 17;
|
chartGPU.TabIndex = 17;
|
||||||
chartGPU.Text = "chart1";
|
chartGPU.Text = "chartGPU";
|
||||||
|
title1.Name = "Title1";
|
||||||
|
chartGPU.Titles.Add(title1);
|
||||||
//
|
//
|
||||||
// chartCPU
|
// chartCPU
|
||||||
//
|
//
|
||||||
@@ -159,9 +184,25 @@
|
|||||||
chartCPU.Location = new Point(2, 10);
|
chartCPU.Location = new Point(2, 10);
|
||||||
chartCPU.Margin = new Padding(2, 10, 2, 10);
|
chartCPU.Margin = new Padding(2, 10, 2, 10);
|
||||||
chartCPU.Name = "chartCPU";
|
chartCPU.Name = "chartCPU";
|
||||||
chartCPU.Size = new Size(760, 476);
|
chartCPU.Size = new Size(760, 310);
|
||||||
chartCPU.TabIndex = 14;
|
chartCPU.TabIndex = 14;
|
||||||
chartCPU.Text = "chartCPU";
|
chartCPU.Text = "chartCPU";
|
||||||
|
title2.Name = "Title1";
|
||||||
|
chartCPU.Titles.Add(title2);
|
||||||
|
//
|
||||||
|
// chartMid
|
||||||
|
//
|
||||||
|
chartArea3.Name = "ChartArea3";
|
||||||
|
chartMid.ChartAreas.Add(chartArea3);
|
||||||
|
chartMid.Dock = DockStyle.Fill;
|
||||||
|
chartMid.Location = new Point(2, 670);
|
||||||
|
chartMid.Margin = new Padding(2, 10, 2, 10);
|
||||||
|
chartMid.Name = "chartMid";
|
||||||
|
chartMid.Size = new Size(760, 312);
|
||||||
|
chartMid.TabIndex = 14;
|
||||||
|
chartMid.Text = "chartMid";
|
||||||
|
title3.Name = "Title3";
|
||||||
|
chartMid.Titles.Add(title3);
|
||||||
//
|
//
|
||||||
// labelFans
|
// labelFans
|
||||||
//
|
//
|
||||||
@@ -188,25 +229,35 @@
|
|||||||
//
|
//
|
||||||
// buttonReset
|
// buttonReset
|
||||||
//
|
//
|
||||||
|
buttonReset.Activated = false;
|
||||||
buttonReset.Anchor = AnchorStyles.Bottom | AnchorStyles.Left;
|
buttonReset.Anchor = AnchorStyles.Bottom | AnchorStyles.Left;
|
||||||
|
buttonReset.BackColor = SystemColors.ControlLight;
|
||||||
|
buttonReset.BorderColor = Color.Transparent;
|
||||||
|
buttonReset.FlatStyle = FlatStyle.Flat;
|
||||||
buttonReset.Location = new Point(30, 1081);
|
buttonReset.Location = new Point(30, 1081);
|
||||||
buttonReset.Margin = new Padding(4, 2, 4, 2);
|
buttonReset.Margin = new Padding(4, 2, 4, 2);
|
||||||
buttonReset.Name = "buttonReset";
|
buttonReset.Name = "buttonReset";
|
||||||
|
buttonReset.Secondary = true;
|
||||||
buttonReset.Size = new Size(232, 44);
|
buttonReset.Size = new Size(232, 44);
|
||||||
buttonReset.TabIndex = 15;
|
buttonReset.TabIndex = 15;
|
||||||
buttonReset.Text = "Factory Defaults";
|
buttonReset.Text = "Factory Defaults";
|
||||||
buttonReset.UseVisualStyleBackColor = true;
|
buttonReset.UseVisualStyleBackColor = false;
|
||||||
//
|
//
|
||||||
// buttonApply
|
// buttonApply
|
||||||
//
|
//
|
||||||
|
buttonApply.Activated = false;
|
||||||
buttonApply.Anchor = AnchorStyles.Bottom | AnchorStyles.Right;
|
buttonApply.Anchor = AnchorStyles.Bottom | AnchorStyles.Right;
|
||||||
|
buttonApply.BackColor = SystemColors.ControlLight;
|
||||||
|
buttonApply.BorderColor = Color.Transparent;
|
||||||
|
buttonApply.FlatStyle = FlatStyle.Flat;
|
||||||
buttonApply.Location = new Point(542, 1081);
|
buttonApply.Location = new Point(542, 1081);
|
||||||
buttonApply.Margin = new Padding(4, 2, 4, 2);
|
buttonApply.Margin = new Padding(4, 2, 4, 2);
|
||||||
buttonApply.Name = "buttonApply";
|
buttonApply.Name = "buttonApply";
|
||||||
|
buttonApply.Secondary = true;
|
||||||
buttonApply.Size = new Size(248, 44);
|
buttonApply.Size = new Size(248, 44);
|
||||||
buttonApply.TabIndex = 14;
|
buttonApply.TabIndex = 14;
|
||||||
buttonApply.Text = "Apply Fan Curve";
|
buttonApply.Text = "Apply Fan Curve";
|
||||||
buttonApply.UseVisualStyleBackColor = true;
|
buttonApply.UseVisualStyleBackColor = false;
|
||||||
//
|
//
|
||||||
// panelPower
|
// panelPower
|
||||||
//
|
//
|
||||||
@@ -264,14 +315,19 @@
|
|||||||
//
|
//
|
||||||
// buttonApplyPower
|
// buttonApplyPower
|
||||||
//
|
//
|
||||||
|
buttonApplyPower.Activated = false;
|
||||||
buttonApplyPower.Anchor = AnchorStyles.Bottom | AnchorStyles.Left | AnchorStyles.Right;
|
buttonApplyPower.Anchor = AnchorStyles.Bottom | AnchorStyles.Left | AnchorStyles.Right;
|
||||||
|
buttonApplyPower.BackColor = SystemColors.ControlLight;
|
||||||
|
buttonApplyPower.BorderColor = Color.Transparent;
|
||||||
|
buttonApplyPower.FlatStyle = FlatStyle.Flat;
|
||||||
buttonApplyPower.Location = new Point(20, 1081);
|
buttonApplyPower.Location = new Point(20, 1081);
|
||||||
buttonApplyPower.Margin = new Padding(4, 2, 4, 2);
|
buttonApplyPower.Margin = new Padding(4, 2, 4, 2);
|
||||||
buttonApplyPower.Name = "buttonApplyPower";
|
buttonApplyPower.Name = "buttonApplyPower";
|
||||||
|
buttonApplyPower.Secondary = true;
|
||||||
buttonApplyPower.Size = new Size(324, 44);
|
buttonApplyPower.Size = new Size(324, 44);
|
||||||
buttonApplyPower.TabIndex = 24;
|
buttonApplyPower.TabIndex = 24;
|
||||||
buttonApplyPower.Text = "Apply Power Limits";
|
buttonApplyPower.Text = "Apply Power Limits";
|
||||||
buttonApplyPower.UseVisualStyleBackColor = true;
|
buttonApplyPower.UseVisualStyleBackColor = false;
|
||||||
//
|
//
|
||||||
// panelCPU
|
// panelCPU
|
||||||
//
|
//
|
||||||
@@ -427,6 +483,7 @@
|
|||||||
tableFanCharts.ResumeLayout(false);
|
tableFanCharts.ResumeLayout(false);
|
||||||
((System.ComponentModel.ISupportInitialize)chartGPU).EndInit();
|
((System.ComponentModel.ISupportInitialize)chartGPU).EndInit();
|
||||||
((System.ComponentModel.ISupportInitialize)chartCPU).EndInit();
|
((System.ComponentModel.ISupportInitialize)chartCPU).EndInit();
|
||||||
|
((System.ComponentModel.ISupportInitialize)chartMid).EndInit();
|
||||||
panelPower.ResumeLayout(false);
|
panelPower.ResumeLayout(false);
|
||||||
panelPower.PerformLayout();
|
panelPower.PerformLayout();
|
||||||
((System.ComponentModel.ISupportInitialize)pictureBox1).EndInit();
|
((System.ComponentModel.ISupportInitialize)pictureBox1).EndInit();
|
||||||
@@ -443,11 +500,11 @@
|
|||||||
#endregion
|
#endregion
|
||||||
private Panel panelFans;
|
private Panel panelFans;
|
||||||
private CheckBox checkAuto;
|
private CheckBox checkAuto;
|
||||||
private Button buttonReset;
|
private RButton buttonReset;
|
||||||
private Button buttonApply;
|
private RButton buttonApply;
|
||||||
private Panel panelPower;
|
private Panel panelPower;
|
||||||
private CheckBox checkApplyPower;
|
private CheckBox checkApplyPower;
|
||||||
private Button buttonApplyPower;
|
private RButton buttonApplyPower;
|
||||||
private Panel panelCPU;
|
private Panel panelCPU;
|
||||||
private Label labelCPU;
|
private Label labelCPU;
|
||||||
private Label label2;
|
private Label label2;
|
||||||
@@ -463,10 +520,12 @@
|
|||||||
private TableLayoutPanel tableFanCharts;
|
private TableLayoutPanel tableFanCharts;
|
||||||
private System.Windows.Forms.DataVisualization.Charting.Chart chartGPU;
|
private System.Windows.Forms.DataVisualization.Charting.Chart chartGPU;
|
||||||
private System.Windows.Forms.DataVisualization.Charting.Chart chartCPU;
|
private System.Windows.Forms.DataVisualization.Charting.Chart chartCPU;
|
||||||
|
private System.Windows.Forms.DataVisualization.Charting.Chart chartMid;
|
||||||
private Label labelFans;
|
private Label labelFans;
|
||||||
private PictureBox picturePerf;
|
private PictureBox picturePerf;
|
||||||
private PictureBox pictureBox1;
|
private PictureBox pictureBox1;
|
||||||
private ComboBox comboBoost;
|
private RComboBox comboBoost;
|
||||||
private Label labelBoost;
|
private Label labelBoost;
|
||||||
|
private Label labelTip;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
89
app/Fans.cs
@@ -1,15 +1,25 @@
|
|||||||
using System;
|
using System.Diagnostics;
|
||||||
using System.Diagnostics;
|
|
||||||
using System.Windows.Forms.DataVisualization.Charting;
|
using System.Windows.Forms.DataVisualization.Charting;
|
||||||
|
using CustomControls;
|
||||||
|
|
||||||
namespace GHelper
|
namespace GHelper
|
||||||
{
|
{
|
||||||
public partial class Fans : Form
|
public partial class Fans : RForm
|
||||||
{
|
{
|
||||||
|
|
||||||
DataPoint curPoint = null;
|
DataPoint curPoint = null;
|
||||||
Series seriesCPU;
|
Series seriesCPU;
|
||||||
Series seriesGPU;
|
Series seriesGPU;
|
||||||
|
Series seriesMid;
|
||||||
|
|
||||||
|
static int MinRPM, MaxRPM;
|
||||||
|
|
||||||
|
static string ChartPercToRPM(int percentage, string unit = "")
|
||||||
|
{
|
||||||
|
if (percentage == 0) return "OFF";
|
||||||
|
|
||||||
|
return (200 * Math.Round((float)(MinRPM + (MaxRPM - MinRPM) * percentage * 0.01) / 200)).ToString() + unit;
|
||||||
|
}
|
||||||
|
|
||||||
void SetChart(Chart chart, int device)
|
void SetChart(Chart chart, int device)
|
||||||
{
|
{
|
||||||
@@ -18,19 +28,15 @@ namespace GHelper
|
|||||||
|
|
||||||
if (device == 1)
|
if (device == 1)
|
||||||
title = "GPU Fan Profile";
|
title = "GPU Fan Profile";
|
||||||
|
else if (device == 2)
|
||||||
|
title = "Middle Fan Profile";
|
||||||
else
|
else
|
||||||
title = "CPU Fan Profile";
|
title = "CPU Fan Profile";
|
||||||
|
|
||||||
if (Program.settingsForm.perfName.Length > 0)
|
if (Program.settingsForm.perfName.Length > 0)
|
||||||
labelFans.Text = "Fan Profiles: " + Program.settingsForm.perfName;
|
labelFans.Text = "Fan Profiles: " + Program.settingsForm.perfName;
|
||||||
|
|
||||||
if (chart.Titles.Count > 0)
|
chart.Titles[0].Text = title;
|
||||||
chart.Titles[0].Text = title;
|
|
||||||
else
|
|
||||||
chart.Titles.Add(title);
|
|
||||||
|
|
||||||
chart.ChartAreas[0].AxisX.MajorGrid.LineColor = Color.LightGray;
|
|
||||||
chart.ChartAreas[0].AxisY.MajorGrid.LineColor = Color.LightGray;
|
|
||||||
|
|
||||||
chart.ChartAreas[0].AxisX.Minimum = 10;
|
chart.ChartAreas[0].AxisX.Minimum = 10;
|
||||||
chart.ChartAreas[0].AxisX.Maximum = 100;
|
chart.ChartAreas[0].AxisX.Maximum = 100;
|
||||||
@@ -41,10 +47,8 @@ namespace GHelper
|
|||||||
|
|
||||||
chart.ChartAreas[0].AxisY.LabelStyle.Font = new Font("Arial", 7F);
|
chart.ChartAreas[0].AxisY.LabelStyle.Font = new Font("Arial", 7F);
|
||||||
|
|
||||||
chart.ChartAreas[0].AxisY.CustomLabels.Add(-2, 2, "OFF");
|
for (int i = 0; i <= 90; i += 10)
|
||||||
|
chart.ChartAreas[0].AxisY.CustomLabels.Add(i - 2, i + 2, ChartPercToRPM(i));
|
||||||
for (int i = 1; i <= 9; i++)
|
|
||||||
chart.ChartAreas[0].AxisY.CustomLabels.Add(i * 10 - 2, i * 10 + 2, (1800 + 400 * i).ToString());
|
|
||||||
|
|
||||||
chart.ChartAreas[0].AxisY.CustomLabels.Add(98, 102, "RPM");
|
chart.ChartAreas[0].AxisY.CustomLabels.Add(98, 102, "RPM");
|
||||||
|
|
||||||
@@ -76,14 +80,31 @@ namespace GHelper
|
|||||||
{
|
{
|
||||||
|
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
|
InitTheme();
|
||||||
|
|
||||||
|
MinRPM = 1800;
|
||||||
|
|
||||||
|
if (Program.config.ContainsModel("401"))
|
||||||
|
MaxRPM = 7200;
|
||||||
|
else if (Program.config.ContainsModel("503"))
|
||||||
|
MaxRPM = 6800;
|
||||||
|
else
|
||||||
|
MaxRPM = 5800;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
labelTip.Visible = false;
|
||||||
|
labelTip.BackColor = Color.Transparent;
|
||||||
|
|
||||||
FormClosing += Fans_FormClosing;
|
FormClosing += Fans_FormClosing;
|
||||||
|
|
||||||
seriesCPU = chartCPU.Series.Add("CPU");
|
seriesCPU = chartCPU.Series.Add("CPU");
|
||||||
seriesGPU = chartGPU.Series.Add("GPU");
|
seriesGPU = chartGPU.Series.Add("GPU");
|
||||||
|
seriesMid = chartMid.Series.Add("Mid");
|
||||||
|
|
||||||
seriesCPU.Color = Color.Blue;
|
seriesCPU.Color = colorStandard;
|
||||||
seriesGPU.Color = Color.Red;
|
seriesGPU.Color = colorTurbo;
|
||||||
|
seriesMid.Color = colorEco;
|
||||||
|
|
||||||
chartCPU.MouseMove += ChartCPU_MouseMove;
|
chartCPU.MouseMove += ChartCPU_MouseMove;
|
||||||
chartCPU.MouseUp += ChartCPU_MouseUp;
|
chartCPU.MouseUp += ChartCPU_MouseUp;
|
||||||
@@ -91,6 +112,9 @@ namespace GHelper
|
|||||||
chartGPU.MouseMove += ChartCPU_MouseMove;
|
chartGPU.MouseMove += ChartCPU_MouseMove;
|
||||||
chartGPU.MouseUp += ChartCPU_MouseUp;
|
chartGPU.MouseUp += ChartCPU_MouseUp;
|
||||||
|
|
||||||
|
chartMid.MouseMove += ChartCPU_MouseMove;
|
||||||
|
chartMid.MouseUp += ChartCPU_MouseUp;
|
||||||
|
|
||||||
buttonReset.Click += ButtonReset_Click;
|
buttonReset.Click += ButtonReset_Click;
|
||||||
buttonApply.Click += ButtonApply_Click;
|
buttonApply.Click += ButtonApply_Click;
|
||||||
|
|
||||||
@@ -126,7 +150,7 @@ namespace GHelper
|
|||||||
{
|
{
|
||||||
int boost = NativeMethods.GetCPUBoost();
|
int boost = NativeMethods.GetCPUBoost();
|
||||||
if (boost >= 0)
|
if (boost >= 0)
|
||||||
comboBoost.SelectedIndex = boost;
|
comboBoost.SelectedIndex = Math.Min(boost, comboBoost.Items.Count - 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void ComboBoost_Changed(object? sender, EventArgs e)
|
private void ComboBoost_Changed(object? sender, EventArgs e)
|
||||||
@@ -234,12 +258,12 @@ namespace GHelper
|
|||||||
{
|
{
|
||||||
if (applied)
|
if (applied)
|
||||||
{
|
{
|
||||||
labelApplied.ForeColor = Color.Blue;
|
labelApplied.ForeColor = colorStandard;
|
||||||
labelApplied.Text = "Applied";
|
labelApplied.Text = "Applied";
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
labelApplied.ForeColor = Color.Red;
|
labelApplied.ForeColor = colorTurbo;
|
||||||
labelApplied.Text = "Not Applied";
|
labelApplied.Text = "Not Applied";
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -248,6 +272,21 @@ namespace GHelper
|
|||||||
public void InitFans()
|
public void InitFans()
|
||||||
{
|
{
|
||||||
|
|
||||||
|
byte[] curve = Program.wmi.GetFanCurve(2);
|
||||||
|
|
||||||
|
if (curve.All(singleByte => singleByte == 0))
|
||||||
|
{
|
||||||
|
Program.config.setConfig("mid_fan", 0);
|
||||||
|
chartMid.Visible = false;
|
||||||
|
|
||||||
|
} else
|
||||||
|
{
|
||||||
|
Program.config.setConfig("mid_fan", 1);
|
||||||
|
SetChart(chartMid, 2);
|
||||||
|
LoadProfile(seriesMid, 2);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
SetChart(chartCPU, 0);
|
SetChart(chartCPU, 0);
|
||||||
SetChart(chartGPU, 1);
|
SetChart(chartGPU, 1);
|
||||||
|
|
||||||
@@ -312,6 +351,8 @@ namespace GHelper
|
|||||||
{
|
{
|
||||||
ApplyProfile(seriesCPU, 0);
|
ApplyProfile(seriesCPU, 0);
|
||||||
ApplyProfile(seriesGPU, 1);
|
ApplyProfile(seriesGPU, 1);
|
||||||
|
if (Program.config.getConfig("mid_fan") == 1)
|
||||||
|
ApplyProfile(seriesMid, 2);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void ButtonReset_Click(object? sender, EventArgs e)
|
private void ButtonReset_Click(object? sender, EventArgs e)
|
||||||
@@ -319,6 +360,8 @@ namespace GHelper
|
|||||||
|
|
||||||
LoadProfile(seriesCPU, 0, 1);
|
LoadProfile(seriesCPU, 0, 1);
|
||||||
LoadProfile(seriesGPU, 1, 1);
|
LoadProfile(seriesGPU, 1, 1);
|
||||||
|
if (Program.config.getConfig("mid_fan") == 1)
|
||||||
|
LoadProfile(seriesMid, 2, 1);
|
||||||
|
|
||||||
checkAuto.Checked = false;
|
checkAuto.Checked = false;
|
||||||
checkApplyPower.Checked = false;
|
checkApplyPower.Checked = false;
|
||||||
@@ -334,6 +377,7 @@ namespace GHelper
|
|||||||
private void ChartCPU_MouseUp(object? sender, MouseEventArgs e)
|
private void ChartCPU_MouseUp(object? sender, MouseEventArgs e)
|
||||||
{
|
{
|
||||||
curPoint = null;
|
curPoint = null;
|
||||||
|
labelTip.Visible = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void ChartCPU_MouseMove(object? sender, MouseEventArgs e)
|
private void ChartCPU_MouseMove(object? sender, MouseEventArgs e)
|
||||||
@@ -371,13 +415,18 @@ namespace GHelper
|
|||||||
if (dy < 0) dy = 0;
|
if (dy < 0) dy = 0;
|
||||||
if (dy > 100) dy = 100;
|
if (dy > 100) dy = 100;
|
||||||
|
|
||||||
dymin = (dx - 60) * 1.2;
|
dymin = (dx - 65) * 1.2;
|
||||||
|
|
||||||
if (dy < dymin) dy = dymin;
|
if (dy < dymin) dy = dymin;
|
||||||
|
|
||||||
curPoint.XValue = dx;
|
curPoint.XValue = dx;
|
||||||
curPoint.YValues[0] = dy;
|
curPoint.YValues[0] = dy;
|
||||||
|
|
||||||
|
labelTip.Visible = true;
|
||||||
|
labelTip.Text = Math.Round(dx) + "C, " + ChartPercToRPM((int)dy, " RPM");
|
||||||
|
labelTip.Top = e.Y + ((Control)sender).Top;
|
||||||
|
labelTip.Left = e.X;
|
||||||
|
|
||||||
}
|
}
|
||||||
catch
|
catch
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -16,9 +16,15 @@
|
|||||||
<PlatformTarget>x64</PlatformTarget>
|
<PlatformTarget>x64</PlatformTarget>
|
||||||
<ProduceReferenceAssembly>False</ProduceReferenceAssembly>
|
<ProduceReferenceAssembly>False</ProduceReferenceAssembly>
|
||||||
<AllowUnsafeBlocks>True</AllowUnsafeBlocks>
|
<AllowUnsafeBlocks>True</AllowUnsafeBlocks>
|
||||||
<AssemblyVersion>0.29</AssemblyVersion>
|
<AssemblyVersion>0.35</AssemblyVersion>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
|
<ItemGroup>
|
||||||
|
<Compile Remove="screenshots\**" />
|
||||||
|
<EmbeddedResource Remove="screenshots\**" />
|
||||||
|
<None Remove="screenshots\**" />
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<None Remove="Resources\eco.ico" />
|
<None Remove="Resources\eco.ico" />
|
||||||
<None Remove="Resources\icons8-charging-battery-48.png" />
|
<None Remove="Resources\icons8-charging-battery-48.png" />
|
||||||
@@ -45,15 +51,6 @@
|
|||||||
<PackageReference Include="WinForms.DataVisualization" Version="1.7.0" />
|
<PackageReference Include="WinForms.DataVisualization" Version="1.7.0" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
|
||||||
<Reference Include="Microsoft.Management.Infrastructure">
|
|
||||||
<HintPath>..\..\.nuget\packages\microsoft.management.infrastructure\2.0.0\ref\net451\Microsoft.Management.Infrastructure.dll</HintPath>
|
|
||||||
</Reference>
|
|
||||||
<Reference Include="Microsoft.Management.Infrastructure.Native">
|
|
||||||
<HintPath>..\..\.nuget\packages\microsoft.management.infrastructure.runtime.win\2.0.0\runtimes\win10-x64\lib\netstandard1.6\Microsoft.Management.Infrastructure.Native.dll</HintPath>
|
|
||||||
</Reference>
|
|
||||||
</ItemGroup>
|
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Content Include="Resources\eco.ico">
|
<Content Include="Resources\eco.ico">
|
||||||
<CopyToOutputDirectory>Never</CopyToOutputDirectory>
|
<CopyToOutputDirectory>Never</CopyToOutputDirectory>
|
||||||
@@ -102,8 +99,4 @@
|
|||||||
</None>
|
</None>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
|
||||||
<Folder Include="screenshots\" />
|
|
||||||
</ItemGroup>
|
|
||||||
|
|
||||||
</Project>
|
</Project>
|
||||||
@@ -58,28 +58,36 @@ public static class HardwareMonitor
|
|||||||
}
|
}
|
||||||
|
|
||||||
public static void RecreateGpuTemperatureProvider() {
|
public static void RecreateGpuTemperatureProvider() {
|
||||||
try {
|
try
|
||||||
|
{
|
||||||
GpuTemperatureProvider?.Dispose();
|
GpuTemperatureProvider?.Dispose();
|
||||||
|
|
||||||
// Detect valid GPU temperature provider.
|
// Detect valid GPU temperature provider.
|
||||||
// We start with NVIDIA because there's always at least an integrated AMD GPU
|
// We start with NVIDIA because there's always at least an integrated AMD GPU
|
||||||
IGpuTemperatureProvider gpuTemperatureProvider = new NvidiaGpuTemperatureProvider();
|
IGpuTemperatureProvider gpuTemperatureProvider = new NvidiaGpuTemperatureProvider();
|
||||||
if (gpuTemperatureProvider.IsValid) {
|
if (gpuTemperatureProvider.IsValid)
|
||||||
|
{
|
||||||
GpuTemperatureProvider = gpuTemperatureProvider;
|
GpuTemperatureProvider = gpuTemperatureProvider;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
gpuTemperatureProvider.Dispose();
|
gpuTemperatureProvider.Dispose();
|
||||||
gpuTemperatureProvider = new AmdGpuTemperatureProvider();
|
gpuTemperatureProvider = new AmdGpuTemperatureProvider();
|
||||||
if (gpuTemperatureProvider.IsValid) {
|
if (gpuTemperatureProvider.IsValid)
|
||||||
|
{
|
||||||
GpuTemperatureProvider = gpuTemperatureProvider;
|
GpuTemperatureProvider = gpuTemperatureProvider;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
gpuTemperatureProvider.Dispose();
|
gpuTemperatureProvider.Dispose();
|
||||||
|
|
||||||
GpuTemperatureProvider = null;
|
GpuTemperatureProvider = null;
|
||||||
} finally {
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
finally
|
||||||
|
{
|
||||||
Logger.WriteLine($"GpuTemperatureProvider: {GpuTemperatureProvider?.GetType().Name}");
|
Logger.WriteLine($"GpuTemperatureProvider: {GpuTemperatureProvider?.GetType().Name}");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
16
app/Keyboard.Designer.cs
generated
@@ -1,4 +1,6 @@
|
|||||||
namespace GHelper
|
using CustomControls;
|
||||||
|
|
||||||
|
namespace GHelper
|
||||||
{
|
{
|
||||||
partial class Keyboard
|
partial class Keyboard
|
||||||
{
|
{
|
||||||
@@ -31,12 +33,12 @@
|
|||||||
groupBox1 = new GroupBox();
|
groupBox1 = new GroupBox();
|
||||||
textM4 = new TextBox();
|
textM4 = new TextBox();
|
||||||
textM3 = new TextBox();
|
textM3 = new TextBox();
|
||||||
comboM4 = new ComboBox();
|
comboM4 = new RComboBox();
|
||||||
labelM4 = new Label();
|
labelM4 = new Label();
|
||||||
comboM3 = new ComboBox();
|
comboM3 = new RComboBox();
|
||||||
labelM3 = new Label();
|
labelM3 = new Label();
|
||||||
textFNF4 = new TextBox();
|
textFNF4 = new TextBox();
|
||||||
comboFNF4 = new ComboBox();
|
comboFNF4 = new RComboBox();
|
||||||
labelFNF4 = new Label();
|
labelFNF4 = new Label();
|
||||||
groupBox1.SuspendLayout();
|
groupBox1.SuspendLayout();
|
||||||
SuspendLayout();
|
SuspendLayout();
|
||||||
@@ -161,13 +163,13 @@
|
|||||||
|
|
||||||
private GroupBox groupBox1;
|
private GroupBox groupBox1;
|
||||||
private Label labelM3;
|
private Label labelM3;
|
||||||
private ComboBox comboM3;
|
private RComboBox comboM3;
|
||||||
private ComboBox comboM4;
|
private RComboBox comboM4;
|
||||||
private Label labelM4;
|
private Label labelM4;
|
||||||
private TextBox textM4;
|
private TextBox textM4;
|
||||||
private TextBox textM3;
|
private TextBox textM3;
|
||||||
private TextBox textFNF4;
|
private TextBox textFNF4;
|
||||||
private ComboBox comboFNF4;
|
private RComboBox comboFNF4;
|
||||||
private Label labelFNF4;
|
private Label labelFNF4;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1,6 +1,8 @@
|
|||||||
namespace GHelper
|
using CustomControls;
|
||||||
|
|
||||||
|
namespace GHelper
|
||||||
{
|
{
|
||||||
public partial class Keyboard : Form
|
public partial class Keyboard : RForm
|
||||||
{
|
{
|
||||||
|
|
||||||
Dictionary<string, string> customActions = new Dictionary<string, string>
|
Dictionary<string, string> customActions = new Dictionary<string, string>
|
||||||
@@ -51,6 +53,7 @@
|
|||||||
public Keyboard()
|
public Keyboard()
|
||||||
{
|
{
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
|
InitTheme();
|
||||||
|
|
||||||
SetKeyCombo(comboM3, textM3, "m3");
|
SetKeyCombo(comboM3, textM3, "m3");
|
||||||
SetKeyCombo(comboM4, textM4, "m4");
|
SetKeyCombo(comboM4, textM4, "m4");
|
||||||
|
|||||||
@@ -27,6 +27,7 @@ namespace GHelper
|
|||||||
private static IntPtr ds;
|
private static IntPtr ds;
|
||||||
|
|
||||||
private static long lastAuto;
|
private static long lastAuto;
|
||||||
|
private static long lastTheme;
|
||||||
|
|
||||||
// The main entry point for the application
|
// The main entry point for the application
|
||||||
public static void Main()
|
public static void Main()
|
||||||
@@ -48,6 +49,9 @@ namespace GHelper
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
SystemEvents.UserPreferenceChanged += new
|
||||||
|
UserPreferenceChangedEventHandler(SystemEvents_UserPreferenceChanged);
|
||||||
|
|
||||||
Application.EnableVisualStyles();
|
Application.EnableVisualStyles();
|
||||||
|
|
||||||
ds = settingsForm.Handle;
|
ds = settingsForm.Handle;
|
||||||
@@ -60,8 +64,6 @@ namespace GHelper
|
|||||||
settingsForm.InitAura();
|
settingsForm.InitAura();
|
||||||
settingsForm.InitMatrix();
|
settingsForm.InitMatrix();
|
||||||
|
|
||||||
settingsForm.VisualiseGPUAuto(config.getConfig("gpu_auto"));
|
|
||||||
settingsForm.VisualiseScreenAuto(config.getConfig("screen_auto"));
|
|
||||||
settingsForm.SetStartupCheck(Startup.IsScheduled());
|
settingsForm.SetStartupCheck(Startup.IsScheduled());
|
||||||
|
|
||||||
SetAutoModes();
|
SetAutoModes();
|
||||||
@@ -79,6 +81,31 @@ namespace GHelper
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
static void SystemEvents_UserPreferenceChanged(object sender, UserPreferenceChangedEventArgs e)
|
||||||
|
{
|
||||||
|
|
||||||
|
if (Math.Abs(DateTimeOffset.Now.ToUnixTimeMilliseconds() - lastTheme) < 2000) return;
|
||||||
|
lastTheme = DateTimeOffset.Now.ToUnixTimeMilliseconds();
|
||||||
|
|
||||||
|
switch (e.Category)
|
||||||
|
{
|
||||||
|
case UserPreferenceCategory.General:
|
||||||
|
Debug.WriteLine("Theme Changed");
|
||||||
|
Thread.Sleep(500);
|
||||||
|
settingsForm.InitTheme(false);
|
||||||
|
|
||||||
|
if (settingsForm.fans is not null && settingsForm.fans.Text != "")
|
||||||
|
settingsForm.fans.InitTheme(false);
|
||||||
|
|
||||||
|
if (settingsForm.keyb is not null && settingsForm.keyb.Text != "")
|
||||||
|
settingsForm.keyb.InitTheme(false);
|
||||||
|
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
static async void CheckForUpdates()
|
static async void CheckForUpdates()
|
||||||
{
|
{
|
||||||
|
|
||||||
@@ -114,7 +141,7 @@ namespace GHelper
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public static void SetAutoModes()
|
public static void SetAutoModes(bool wait = false)
|
||||||
{
|
{
|
||||||
|
|
||||||
if (Math.Abs(DateTimeOffset.Now.ToUnixTimeMilliseconds() - lastAuto) < 1000) return;
|
if (Math.Abs(DateTimeOffset.Now.ToUnixTimeMilliseconds() - lastAuto) < 1000) return;
|
||||||
@@ -128,6 +155,9 @@ namespace GHelper
|
|||||||
|
|
||||||
settingsForm.AutoPerformance(isPlugged);
|
settingsForm.AutoPerformance(isPlugged);
|
||||||
|
|
||||||
|
// waiting a bit before turning off dGPU
|
||||||
|
// if (wait && isPlugged != PowerLineStatus.Online) Thread.Sleep(3000);
|
||||||
|
|
||||||
bool switched = settingsForm.AutoGPUMode(isPlugged);
|
bool switched = settingsForm.AutoGPUMode(isPlugged);
|
||||||
if (!switched) settingsForm.AutoScreen(isPlugged);
|
if (!switched) settingsForm.AutoScreen(isPlugged);
|
||||||
|
|
||||||
@@ -137,7 +167,7 @@ namespace GHelper
|
|||||||
private static void SystemEvents_PowerModeChanged(object sender, PowerModeChangedEventArgs e)
|
private static void SystemEvents_PowerModeChanged(object sender, PowerModeChangedEventArgs e)
|
||||||
{
|
{
|
||||||
Logger.WriteLine("Windows - Power Mode Changed");
|
Logger.WriteLine("Windows - Power Mode Changed");
|
||||||
SetAutoModes();
|
SetAutoModes(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
170
app/Properties/Resources.Designer.cs
generated
@@ -80,6 +80,26 @@ namespace GHelper.Properties {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
||||||
|
/// </summary>
|
||||||
|
internal static System.Drawing.Bitmap icons8_balance_symbol_96 {
|
||||||
|
get {
|
||||||
|
object obj = ResourceManager.GetObject("icons8-balance-symbol-96", resourceCulture);
|
||||||
|
return ((System.Drawing.Bitmap)(obj));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
||||||
|
/// </summary>
|
||||||
|
internal static System.Drawing.Bitmap icons8_bicycle_48__1_ {
|
||||||
|
get {
|
||||||
|
object obj = ResourceManager.GetObject("icons8-bicycle-48 (1)", 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>
|
||||||
@@ -90,6 +110,16 @@ namespace GHelper.Properties {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
||||||
|
/// </summary>
|
||||||
|
internal static System.Drawing.Bitmap icons8_fan_48 {
|
||||||
|
get {
|
||||||
|
object obj = ResourceManager.GetObject("icons8-fan-48", 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>
|
||||||
@@ -100,6 +130,36 @@ namespace GHelper.Properties {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
||||||
|
/// </summary>
|
||||||
|
internal static System.Drawing.Bitmap icons8_fan_speed_48 {
|
||||||
|
get {
|
||||||
|
object obj = ResourceManager.GetObject("icons8-fan-speed-48", resourceCulture);
|
||||||
|
return ((System.Drawing.Bitmap)(obj));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
||||||
|
/// </summary>
|
||||||
|
internal static System.Drawing.Bitmap icons8_fiat_500_48 {
|
||||||
|
get {
|
||||||
|
object obj = ResourceManager.GetObject("icons8-fiat-500-48", resourceCulture);
|
||||||
|
return ((System.Drawing.Bitmap)(obj));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
||||||
|
/// </summary>
|
||||||
|
internal static System.Drawing.Bitmap icons8_game_controller_48 {
|
||||||
|
get {
|
||||||
|
object obj = ResourceManager.GetObject("icons8-game-controller-48", 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>
|
||||||
@@ -120,6 +180,36 @@ namespace GHelper.Properties {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
||||||
|
/// </summary>
|
||||||
|
internal static System.Drawing.Bitmap icons8_launch_96 {
|
||||||
|
get {
|
||||||
|
object obj = ResourceManager.GetObject("icons8-launch-96", resourceCulture);
|
||||||
|
return ((System.Drawing.Bitmap)(obj));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
||||||
|
/// </summary>
|
||||||
|
internal static System.Drawing.Bitmap icons8_leaf_48 {
|
||||||
|
get {
|
||||||
|
object obj = ResourceManager.GetObject("icons8-leaf-48", resourceCulture);
|
||||||
|
return ((System.Drawing.Bitmap)(obj));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
||||||
|
/// </summary>
|
||||||
|
internal static System.Drawing.Bitmap icons8_leaf_96 {
|
||||||
|
get {
|
||||||
|
object obj = ResourceManager.GetObject("icons8-leaf-96", 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>
|
||||||
@@ -130,6 +220,26 @@ namespace GHelper.Properties {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
||||||
|
/// </summary>
|
||||||
|
internal static System.Drawing.Bitmap icons8_organic_food_96 {
|
||||||
|
get {
|
||||||
|
object obj = ResourceManager.GetObject("icons8-organic-food-96", resourceCulture);
|
||||||
|
return ((System.Drawing.Bitmap)(obj));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
||||||
|
/// </summary>
|
||||||
|
internal static System.Drawing.Bitmap icons8_organic_food_961 {
|
||||||
|
get {
|
||||||
|
object obj = ResourceManager.GetObject("icons8-organic-food-961", 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>
|
||||||
@@ -140,6 +250,56 @@ namespace GHelper.Properties {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
||||||
|
/// </summary>
|
||||||
|
internal static System.Drawing.Bitmap icons8_project_management_48 {
|
||||||
|
get {
|
||||||
|
object obj = ResourceManager.GetObject("icons8-project-management-48", resourceCulture);
|
||||||
|
return ((System.Drawing.Bitmap)(obj));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
||||||
|
/// </summary>
|
||||||
|
internal static System.Drawing.Bitmap icons8_project_management_48__1_ {
|
||||||
|
get {
|
||||||
|
object obj = ResourceManager.GetObject("icons8-project-management-48 (1)", resourceCulture);
|
||||||
|
return ((System.Drawing.Bitmap)(obj));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
||||||
|
/// </summary>
|
||||||
|
internal static System.Drawing.Bitmap icons8_rocket_48 {
|
||||||
|
get {
|
||||||
|
object obj = ResourceManager.GetObject("icons8-rocket-48", resourceCulture);
|
||||||
|
return ((System.Drawing.Bitmap)(obj));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
||||||
|
/// </summary>
|
||||||
|
internal static System.Drawing.Bitmap icons8_spa_flower_48 {
|
||||||
|
get {
|
||||||
|
object obj = ResourceManager.GetObject("icons8-spa-flower-48", resourceCulture);
|
||||||
|
return ((System.Drawing.Bitmap)(obj));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
||||||
|
/// </summary>
|
||||||
|
internal static System.Drawing.Bitmap icons8_spa_flower_96 {
|
||||||
|
get {
|
||||||
|
object obj = ResourceManager.GetObject("icons8-spa-flower-96", 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>
|
||||||
@@ -170,6 +330,16 @@ namespace GHelper.Properties {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
||||||
|
/// </summary>
|
||||||
|
internal static System.Drawing.Bitmap icons8_xbox_controller_96 {
|
||||||
|
get {
|
||||||
|
object obj = ResourceManager.GetObject("icons8-xbox-controller-96", resourceCulture);
|
||||||
|
return ((System.Drawing.Bitmap)(obj));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Looks up a localized resource of type System.Drawing.Icon similar to (Icon).
|
/// Looks up a localized resource of type System.Drawing.Icon similar to (Icon).
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|||||||
@@ -118,43 +118,94 @@
|
|||||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
</resheader>
|
</resheader>
|
||||||
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
|
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
|
||||||
<data name="eco" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
<data name="icons8-leaf-96" 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\icons8-leaf-96.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="icons8-matrix-desktop-48" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
<data name="icons8-launch-96" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||||
<value>..\Resources\icons8-matrix-desktop-48.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
<value>..\Resources\icons8-launch-96.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||||
|
</data>
|
||||||
|
<data name="icons8-charging-battery-48" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||||
|
<value>..\Resources\icons8-charging-battery-48.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||||
|
</data>
|
||||||
|
<data name="icons8-organic-food-96" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||||
|
<value>..\Resources\icons8-organic-food-96.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||||
|
</data>
|
||||||
|
<data name="icons8-fiat-500-48" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||||
|
<value>..\Resources\icons8-fiat-500-48.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||||
|
</data>
|
||||||
|
<data name="icons8-video-card-48" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||||
|
<value>..\Resources\icons8-video-card-48.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||||
|
</data>
|
||||||
|
<data name="icons8-project-management-48 (1)" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||||
|
<value>..\Resources\icons8-project-management-48 (1).png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||||
|
</data>
|
||||||
|
<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>
|
||||||
|
</data>
|
||||||
|
<data name="icons8-fan-head-96" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||||
|
<value>..\Resources\icons8-fan-head-96.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||||
|
</data>
|
||||||
|
<data name="icons8-processor-96" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||||
|
<value>..\Resources\icons8-processor-96.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||||
|
</data>
|
||||||
|
<data name="icons8-spa-flower-48" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||||
|
<value>..\Resources\icons8-spa-flower-48.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||||
|
</data>
|
||||||
|
<data name="icons8-spa-flower-96" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||||
|
<value>..\Resources\icons8-spa-flower-96.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||||
|
</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>
|
||||||
<data name="icons8-keyboard-48" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
<data name="icons8-keyboard-48" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||||
<value>..\Resources\icons8-keyboard-48.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
<value>..\Resources\icons8-keyboard-48.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||||
</data>
|
</data>
|
||||||
|
<data name="icons8-fan-speed-48" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||||
|
<value>..\Resources\icons8-fan-speed-48.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||||
|
</data>
|
||||||
|
<data name="icons8-speed-96" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||||
|
<value>..\Resources\icons8-speed-96.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||||
|
</data>
|
||||||
|
<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>
|
||||||
|
</data>
|
||||||
|
<data name="icons8-laptop-48" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||||
|
<value>..\Resources\icons8-laptop-48.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||||
|
</data>
|
||||||
|
<data name="icons8-rocket-48" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||||
|
<value>..\Resources\icons8-rocket-48.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||||
|
</data>
|
||||||
|
<data name="icons8-organic-food-961" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||||
|
<value>..\Resources\icons8-organic-food-961.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||||
|
</data>
|
||||||
|
<data name="icons8-balance-symbol-96" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||||
|
<value>..\Resources\icons8-balance-symbol-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">
|
||||||
|
<value>..\Resources\icons8-fan-48.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||||
|
</data>
|
||||||
|
<data name="icons8-matrix-desktop-48" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||||
|
<value>..\Resources\icons8-matrix-desktop-48.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||||
|
</data>
|
||||||
|
<data name="icons8-xbox-controller-96" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||||
|
<value>..\Resources\icons8-xbox-controller-96.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||||
|
</data>
|
||||||
|
<data name="icons8-project-management-48" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||||
|
<value>..\Resources\icons8-project-management-48.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||||
|
</data>
|
||||||
|
<data name="icons8-leaf-48" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||||
|
<value>..\Resources\icons8-leaf-48.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||||
|
</data>
|
||||||
<data name="ultimate" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
<data name="ultimate" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||||
<value>..\Resources\ultimate.ico;System.Drawing.Icon, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
<value>..\Resources\ultimate.ico;System.Drawing.Icon, 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="icons8-speed-48" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
<data name="icons8-speed-48" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||||
<value>..\Resources\icons8-speed-48.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
<value>..\Resources\icons8-speed-48.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="everything-is-fine-itsfine" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
<data name="everything-is-fine-itsfine" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||||
<value>..\Resources\everything-is-fine-itsfine.gif;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
<value>..\Resources\everything-is-fine-itsfine.gif;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="icons8-speed-96" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
<data name="icons8-game-controller-48" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||||
<value>..\Resources\icons8-speed-96.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
<value>..\Resources\icons8-game-controller-48.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||||
</data>
|
|
||||||
<data name="icons8-video-card-48" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
|
||||||
<value>..\Resources\icons8-video-card-48.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
|
||||||
</data>
|
|
||||||
<data name="icons8-fan-head-96" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
|
||||||
<value>..\Resources\icons8-fan-head-96.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
|
||||||
</data>
|
|
||||||
<data name="icons8-charging-battery-48" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
|
||||||
<value>..\Resources\icons8-charging-battery-48.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
|
||||||
</data>
|
|
||||||
<data name="icons8-laptop-48" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
|
||||||
<value>..\Resources\icons8-laptop-48.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
|
||||||
</data>
|
|
||||||
<data name="icons8-processor-96" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
|
||||||
<value>..\Resources\icons8-processor-96.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
|
||||||
</data>
|
</data>
|
||||||
</root>
|
</root>
|
||||||
BIN
app/Resources/icons8-balance-symbol-96.png
Normal file
|
After Width: | Height: | Size: 710 B |
BIN
app/Resources/icons8-bicycle-48 (1).png
Normal file
|
After Width: | Height: | Size: 924 B |
BIN
app/Resources/icons8-fan-48.png
Normal file
|
After Width: | Height: | Size: 992 B |
BIN
app/Resources/icons8-fan-speed-48.png
Normal file
|
After Width: | Height: | Size: 870 B |
BIN
app/Resources/icons8-fiat-500-48.png
Normal file
|
After Width: | Height: | Size: 784 B |
BIN
app/Resources/icons8-game-controller-48.png
Normal file
|
After Width: | Height: | Size: 611 B |
BIN
app/Resources/icons8-launch-96.png
Normal file
|
After Width: | Height: | Size: 648 B |
BIN
app/Resources/icons8-leaf-48.png
Normal file
|
After Width: | Height: | Size: 851 B |
BIN
app/Resources/icons8-leaf-96.png
Normal file
|
After Width: | Height: | Size: 910 B |
BIN
app/Resources/icons8-organic-food-96.png
Normal file
|
After Width: | Height: | Size: 2.0 KiB |
BIN
app/Resources/icons8-organic-food-961.png
Normal file
|
After Width: | Height: | Size: 1.1 KiB |
BIN
app/Resources/icons8-project-management-48 (1).png
Normal file
|
After Width: | Height: | Size: 837 B |
BIN
app/Resources/icons8-project-management-48.png
Normal file
|
After Width: | Height: | Size: 1.0 KiB |
BIN
app/Resources/icons8-rocket-48.png
Normal file
|
After Width: | Height: | Size: 763 B |
BIN
app/Resources/icons8-spa-flower-48.png
Normal file
|
After Width: | Height: | Size: 949 B |
BIN
app/Resources/icons8-spa-flower-96.png
Normal file
|
After Width: | Height: | Size: 954 B |
BIN
app/Resources/icons8-xbox-controller-96.png
Normal file
|
After Width: | Height: | Size: 724 B |
@@ -1,78 +0,0 @@
|
|||||||
using System.ComponentModel;
|
|
||||||
using System.Drawing.Drawing2D;
|
|
||||||
|
|
||||||
namespace CustomControls
|
|
||||||
{
|
|
||||||
public class RoundedButton : Button
|
|
||||||
{
|
|
||||||
//Fields
|
|
||||||
private int borderSize = 5;
|
|
||||||
private int borderRadius = 5;
|
|
||||||
private bool activated = false;
|
|
||||||
private Color borderColor = Color.Transparent;
|
|
||||||
|
|
||||||
public Color BorderColor
|
|
||||||
{
|
|
||||||
get { return borderColor; }
|
|
||||||
set
|
|
||||||
{
|
|
||||||
borderColor = value;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
public bool Activated
|
|
||||||
{
|
|
||||||
get { return activated; }
|
|
||||||
set
|
|
||||||
{
|
|
||||||
if (activated != value)
|
|
||||||
this.Invalidate();
|
|
||||||
activated = value;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public RoundedButton()
|
|
||||||
{
|
|
||||||
this.FlatStyle = FlatStyle.Flat;
|
|
||||||
this.FlatAppearance.BorderSize = 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
private GraphicsPath GetFigurePath(Rectangle rect, int radius)
|
|
||||||
{
|
|
||||||
GraphicsPath path = new GraphicsPath();
|
|
||||||
float curveSize = radius * 2F;
|
|
||||||
|
|
||||||
path.StartFigure();
|
|
||||||
path.AddArc(rect.X, rect.Y, curveSize, curveSize, 180, 90);
|
|
||||||
path.AddArc(rect.Right - curveSize, rect.Y, curveSize, curveSize, 270, 90);
|
|
||||||
path.AddArc(rect.Right - curveSize, rect.Bottom - curveSize, curveSize, curveSize, 0, 90);
|
|
||||||
path.AddArc(rect.X, rect.Bottom - curveSize, curveSize, curveSize, 90, 90);
|
|
||||||
path.CloseFigure();
|
|
||||||
return path;
|
|
||||||
}
|
|
||||||
|
|
||||||
protected override void OnPaint(PaintEventArgs pevent)
|
|
||||||
{
|
|
||||||
base.OnPaint(pevent);
|
|
||||||
|
|
||||||
Rectangle rectSurface = this.ClientRectangle;
|
|
||||||
Rectangle rectBorder = Rectangle.Inflate(rectSurface, -borderSize, -borderSize);
|
|
||||||
|
|
||||||
Color borderDrawColor = activated ? borderColor : Color.Transparent;
|
|
||||||
|
|
||||||
using (GraphicsPath pathSurface = GetFigurePath(rectSurface, borderRadius+borderSize))
|
|
||||||
using (GraphicsPath pathBorder = GetFigurePath(rectBorder, borderRadius))
|
|
||||||
using (Pen penSurface = new Pen(this.Parent.BackColor, borderSize))
|
|
||||||
using (Pen penBorder = new Pen(borderDrawColor, borderSize))
|
|
||||||
{
|
|
||||||
penBorder.Alignment = PenAlignment.Outset;
|
|
||||||
pevent.Graphics.SmoothingMode = SmoothingMode.AntiAlias;
|
|
||||||
this.Region = new Region(pathSurface);
|
|
||||||
pevent.Graphics.DrawPath(penSurface, pathSurface);
|
|
||||||
pevent.Graphics.DrawPath(penBorder, pathBorder);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
834
app/Settings.Designer.cs
generated
302
app/Settings.cs
@@ -1,19 +1,15 @@
|
|||||||
using Starlight.AnimeMatrix;
|
using CustomControls;
|
||||||
|
using Starlight.AnimeMatrix;
|
||||||
using System.Diagnostics;
|
using System.Diagnostics;
|
||||||
using System.Drawing.Imaging;
|
using System.Drawing.Imaging;
|
||||||
using System.Timers;
|
using System.Timers;
|
||||||
|
|
||||||
|
|
||||||
namespace GHelper
|
namespace GHelper
|
||||||
{
|
{
|
||||||
|
|
||||||
public partial class SettingsForm : Form
|
public partial class SettingsForm : RForm
|
||||||
{
|
{
|
||||||
|
|
||||||
static Color colorEco = Color.FromArgb(255, 6, 180, 138);
|
|
||||||
static Color colorStandard = Color.FromArgb(255, 58, 174, 239);
|
|
||||||
static Color colorTurbo = Color.FromArgb(255, 255, 32, 32);
|
|
||||||
|
|
||||||
static System.Timers.Timer aTimer = default!;
|
static System.Timers.Timer aTimer = default!;
|
||||||
static System.Timers.Timer matrixTimer = default!;
|
static System.Timers.Timer matrixTimer = default!;
|
||||||
|
|
||||||
@@ -21,15 +17,15 @@ namespace GHelper
|
|||||||
|
|
||||||
public string perfName = "Balanced";
|
public string perfName = "Balanced";
|
||||||
|
|
||||||
Fans fans;
|
public Fans fans;
|
||||||
Keyboard keyb;
|
public Keyboard keyb;
|
||||||
|
|
||||||
static AnimeMatrixDevice mat;
|
static AnimeMatrixDevice mat;
|
||||||
|
|
||||||
public SettingsForm()
|
public SettingsForm()
|
||||||
{
|
{
|
||||||
|
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
|
InitTheme();
|
||||||
|
|
||||||
FormClosing += SettingsForm_FormClosing;
|
FormClosing += SettingsForm_FormClosing;
|
||||||
|
|
||||||
@@ -40,10 +36,14 @@ namespace GHelper
|
|||||||
buttonEco.BorderColor = colorEco;
|
buttonEco.BorderColor = colorEco;
|
||||||
buttonStandard.BorderColor = colorStandard;
|
buttonStandard.BorderColor = colorStandard;
|
||||||
buttonUltimate.BorderColor = colorTurbo;
|
buttonUltimate.BorderColor = colorTurbo;
|
||||||
|
buttonOptimized.BorderColor = colorEco;
|
||||||
|
|
||||||
button60Hz.BorderColor = SystemColors.ActiveBorder;
|
button60Hz.BorderColor = SystemColors.ActiveBorder;
|
||||||
button120Hz.BorderColor = SystemColors.ActiveBorder;
|
button120Hz.BorderColor = SystemColors.ActiveBorder;
|
||||||
|
buttonScreenAuto.BorderColor = SystemColors.ActiveBorder;
|
||||||
|
buttonMiniled.BorderColor = colorTurbo;
|
||||||
|
|
||||||
|
buttonOptimized.Click += ButtonOptimized_Click;
|
||||||
buttonSilent.Click += ButtonSilent_Click;
|
buttonSilent.Click += ButtonSilent_Click;
|
||||||
buttonBalanced.Click += ButtonBalanced_Click;
|
buttonBalanced.Click += ButtonBalanced_Click;
|
||||||
buttonTurbo.Click += ButtonTurbo_Click;
|
buttonTurbo.Click += ButtonTurbo_Click;
|
||||||
@@ -58,13 +58,11 @@ namespace GHelper
|
|||||||
|
|
||||||
button60Hz.Click += Button60Hz_Click;
|
button60Hz.Click += Button60Hz_Click;
|
||||||
button120Hz.Click += Button120Hz_Click;
|
button120Hz.Click += Button120Hz_Click;
|
||||||
|
buttonScreenAuto.Click += ButtonScreenAuto_Click;
|
||||||
|
buttonMiniled.Click += ButtonMiniled_Click;
|
||||||
|
|
||||||
buttonQuit.Click += ButtonQuit_Click;
|
buttonQuit.Click += ButtonQuit_Click;
|
||||||
|
|
||||||
checkGPU.CheckedChanged += CheckGPU_CheckedChanged;
|
|
||||||
|
|
||||||
checkScreen.CheckedChanged += checkScreen_CheckedChanged;
|
|
||||||
|
|
||||||
comboKeyboard.DropDownStyle = ComboBoxStyle.DropDownList;
|
comboKeyboard.DropDownStyle = ComboBoxStyle.DropDownList;
|
||||||
comboKeyboard.SelectedIndex = 0;
|
comboKeyboard.SelectedIndex = 0;
|
||||||
comboKeyboard.SelectedValueChanged += ComboKeyboard_SelectedValueChanged;
|
comboKeyboard.SelectedValueChanged += ComboKeyboard_SelectedValueChanged;
|
||||||
@@ -93,12 +91,96 @@ namespace GHelper
|
|||||||
checkStartup.CheckedChanged += CheckStartup_CheckedChanged;
|
checkStartup.CheckedChanged += CheckStartup_CheckedChanged;
|
||||||
|
|
||||||
labelVersion.Click += LabelVersion_Click;
|
labelVersion.Click += LabelVersion_Click;
|
||||||
|
labelVersion.ForeColor = Color.FromArgb(128, Color.Gray);
|
||||||
|
|
||||||
|
buttonOptimized.MouseMove += ButtonOptimized_MouseHover;
|
||||||
|
buttonOptimized.MouseLeave += ButtonGPU_MouseLeave;
|
||||||
|
|
||||||
|
buttonEco.MouseMove += ButtonEco_MouseHover;
|
||||||
|
buttonEco.MouseLeave += ButtonGPU_MouseLeave;
|
||||||
|
|
||||||
|
buttonStandard.MouseMove += ButtonStandard_MouseHover;
|
||||||
|
buttonStandard.MouseLeave += ButtonGPU_MouseLeave;
|
||||||
|
|
||||||
|
buttonUltimate.MouseMove += ButtonUltimate_MouseHover;
|
||||||
|
buttonUltimate.MouseLeave += ButtonGPU_MouseLeave;
|
||||||
|
|
||||||
|
buttonScreenAuto.MouseMove += ButtonScreenAuto_MouseHover;
|
||||||
|
buttonScreenAuto.MouseLeave += ButtonScreen_MouseLeave;
|
||||||
|
|
||||||
|
button60Hz.MouseMove += Button60Hz_MouseHover;
|
||||||
|
button60Hz.MouseLeave += ButtonScreen_MouseLeave;
|
||||||
|
|
||||||
|
button120Hz.MouseMove += Button120Hz_MouseHover;
|
||||||
|
button120Hz.MouseLeave += ButtonScreen_MouseLeave;
|
||||||
|
|
||||||
|
//buttonStandard.Image = (Image)(new Bitmap(buttonStandard.Image, new Size(16, 16)));
|
||||||
|
|
||||||
SetTimer();
|
SetTimer();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
private void Button120Hz_MouseHover(object? sender, EventArgs e)
|
||||||
|
{
|
||||||
|
labelTipScreen.Text = "Max refresh rate + screen overdrive for lower latency";
|
||||||
|
}
|
||||||
|
|
||||||
|
private void Button60Hz_MouseHover(object? sender, EventArgs e)
|
||||||
|
{
|
||||||
|
labelTipScreen.Text = "60Hz refresh rate to save battery";
|
||||||
|
}
|
||||||
|
|
||||||
|
private void ButtonScreen_MouseLeave(object? sender, EventArgs e)
|
||||||
|
{
|
||||||
|
labelTipScreen.Text = "";
|
||||||
|
}
|
||||||
|
|
||||||
|
private void ButtonScreenAuto_MouseHover(object? sender, EventArgs e)
|
||||||
|
{
|
||||||
|
labelTipScreen.Text = "Sets 60Hz to save battery, and back when plugged";
|
||||||
|
}
|
||||||
|
|
||||||
|
private void ButtonUltimate_MouseHover(object? sender, EventArgs e)
|
||||||
|
{
|
||||||
|
labelTipGPU.Text = "Routes laptop screen to dGPU, maximizing FPS";
|
||||||
|
}
|
||||||
|
|
||||||
|
private void ButtonStandard_MouseHover(object? sender, EventArgs e)
|
||||||
|
{
|
||||||
|
labelTipGPU.Text = "Enables dGPU for standard use";
|
||||||
|
}
|
||||||
|
|
||||||
|
private void ButtonEco_MouseHover(object? sender, EventArgs e)
|
||||||
|
{
|
||||||
|
labelTipGPU.Text = "Disables dGPU for battery savings";
|
||||||
|
}
|
||||||
|
|
||||||
|
private void ButtonOptimized_MouseHover(object? sender, EventArgs e)
|
||||||
|
{
|
||||||
|
labelTipGPU.Text = "Switch to Eco on battery and to Standard when plugged";
|
||||||
|
}
|
||||||
|
|
||||||
|
private void ButtonGPU_MouseLeave(object? sender, EventArgs e)
|
||||||
|
{
|
||||||
|
labelTipGPU.Text = "";
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
private void ButtonOptimized_Click(object? sender, EventArgs e)
|
||||||
|
{
|
||||||
|
Program.config.setConfig("gpu_auto", (Program.config.getConfig("gpu_auto") == 1) ? 0 : 1);
|
||||||
|
VisualiseGPUMode();
|
||||||
|
AutoGPUMode(SystemInformation.PowerStatus.PowerLineStatus);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void ButtonScreenAuto_Click(object? sender, EventArgs e)
|
||||||
|
{
|
||||||
|
Program.config.setConfig("screen_auto", 1);
|
||||||
|
InitScreen();
|
||||||
|
AutoScreen(SystemInformation.PowerStatus.PowerLineStatus);
|
||||||
|
}
|
||||||
|
|
||||||
protected override void WndProc(ref Message m)
|
protected override void WndProc(ref Message m)
|
||||||
{
|
{
|
||||||
switch (m.Msg)
|
switch (m.Msg)
|
||||||
@@ -130,12 +212,6 @@ namespace GHelper
|
|||||||
base.WndProc(ref m);
|
base.WndProc(ref m);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void CheckGPU_CheckedChanged(object? sender, EventArgs e)
|
|
||||||
{
|
|
||||||
if (sender is null) return;
|
|
||||||
CheckBox check = (CheckBox)sender;
|
|
||||||
Program.config.setConfig("gpu_auto", check.Checked ? 1 : 0);
|
|
||||||
}
|
|
||||||
|
|
||||||
public void SetVersionLabel(string label, string url = null)
|
public void SetVersionLabel(string label, string url = null)
|
||||||
{
|
{
|
||||||
@@ -456,8 +532,8 @@ namespace GHelper
|
|||||||
int brightness = Program.config.getConfig("matrix_brightness");
|
int brightness = Program.config.getConfig("matrix_brightness");
|
||||||
int running = Program.config.getConfig("matrix_running");
|
int running = Program.config.getConfig("matrix_running");
|
||||||
|
|
||||||
comboMatrix.SelectedIndex = (brightness != -1) ? brightness : 0;
|
comboMatrix.SelectedIndex = (brightness != -1) ? Math.Min(brightness, comboMatrix.Items.Count-1) : 0;
|
||||||
comboMatrixRunning.SelectedIndex = (running != -1) ? running : 0;
|
comboMatrixRunning.SelectedIndex = (running != -1) ? Math.Min(running, comboMatrixRunning.Items.Count - 1) : 0;
|
||||||
|
|
||||||
checkMatrix.Checked = (Program.config.getConfig("matrix_auto") == 1);
|
checkMatrix.Checked = (Program.config.getConfig("matrix_auto") == 1);
|
||||||
|
|
||||||
@@ -528,21 +604,27 @@ namespace GHelper
|
|||||||
|
|
||||||
private void Button120Hz_Click(object? sender, EventArgs e)
|
private void Button120Hz_Click(object? sender, EventArgs e)
|
||||||
{
|
{
|
||||||
|
Program.config.setConfig("screen_auto", 0);
|
||||||
SetScreen(1000, 1);
|
SetScreen(1000, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void Button60Hz_Click(object? sender, EventArgs e)
|
private void Button60Hz_Click(object? sender, EventArgs e)
|
||||||
{
|
{
|
||||||
|
Program.config.setConfig("screen_auto", 0);
|
||||||
SetScreen(60, 0);
|
SetScreen(60, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void ButtonMiniled_Click(object? sender, EventArgs e)
|
||||||
|
{
|
||||||
|
int miniled = (Program.config.getConfig("miniled") == 1) ? 0 : 1;
|
||||||
|
Program.config.setConfig("miniled", miniled);
|
||||||
|
SetScreen(-1, -1, miniled);
|
||||||
|
}
|
||||||
|
|
||||||
public void SetScreen(int frequency = -1, int overdrive = -1)
|
public void SetScreen(int frequency = -1, int overdrive = -1, int miniled = -1)
|
||||||
{
|
{
|
||||||
|
|
||||||
int currentFrequency = NativeMethods.GetRefreshRate();
|
if (NativeMethods.GetRefreshRate() < 0) // Laptop screen not detected or has unknown refresh rate
|
||||||
|
|
||||||
if (currentFrequency < 0) // Laptop screen not detected or has unknown refresh rate
|
|
||||||
{
|
{
|
||||||
InitScreen();
|
InitScreen();
|
||||||
return;
|
return;
|
||||||
@@ -551,18 +633,25 @@ namespace GHelper
|
|||||||
if (frequency >= 1000)
|
if (frequency >= 1000)
|
||||||
{
|
{
|
||||||
frequency = Program.config.getConfig("max_frequency");
|
frequency = Program.config.getConfig("max_frequency");
|
||||||
if (frequency <= 60)
|
if (frequency <= 60) frequency = 120;
|
||||||
frequency = 120;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (frequency <= 0) return;
|
if (frequency > 0)
|
||||||
|
{
|
||||||
|
NativeMethods.SetRefreshRate(frequency);
|
||||||
|
Logger.WriteLine("Screen " + frequency.ToString() + "Hz");
|
||||||
|
}
|
||||||
|
|
||||||
NativeMethods.SetRefreshRate(frequency);
|
if (overdrive >= 0)
|
||||||
if (overdrive > 0)
|
|
||||||
Program.wmi.DeviceSet(ASUSWmi.ScreenOverdrive, overdrive);
|
Program.wmi.DeviceSet(ASUSWmi.ScreenOverdrive, overdrive);
|
||||||
|
|
||||||
|
if (miniled >= 0)
|
||||||
|
{
|
||||||
|
Program.wmi.DeviceSet(ASUSWmi.ScreenMiniled, miniled);
|
||||||
|
Debug.WriteLine("Miniled " + miniled);
|
||||||
|
}
|
||||||
|
|
||||||
InitScreen();
|
InitScreen();
|
||||||
Logger.WriteLine("Screen " + frequency.ToString() + "Hz");
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -572,37 +661,31 @@ namespace GHelper
|
|||||||
int frequency = NativeMethods.GetRefreshRate();
|
int frequency = NativeMethods.GetRefreshRate();
|
||||||
int maxFrequency = Program.config.getConfig("max_frequency");
|
int maxFrequency = Program.config.getConfig("max_frequency");
|
||||||
|
|
||||||
if (frequency < 0)
|
bool screenAuto = (Program.config.getConfig("screen_auto") == 1);
|
||||||
{
|
|
||||||
button60Hz.Enabled = false;
|
|
||||||
button120Hz.Enabled = false;
|
|
||||||
labelSreen.Text = "Laptop Screen: Turned off";
|
|
||||||
button60Hz.BackColor = SystemColors.ControlLight;
|
|
||||||
button120Hz.BackColor = SystemColors.ControlLight;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
button60Hz.Enabled = true;
|
|
||||||
button120Hz.Enabled = true;
|
|
||||||
button60Hz.BackColor = SystemColors.ControlLightLight;
|
|
||||||
button120Hz.BackColor = SystemColors.ControlLightLight;
|
|
||||||
labelSreen.Text = "Laptop Screen";
|
|
||||||
}
|
|
||||||
|
|
||||||
int overdrive = 0;
|
int overdrive = Program.wmi.DeviceGet(ASUSWmi.ScreenOverdrive);
|
||||||
try
|
int miniled = Program.wmi.DeviceGet(ASUSWmi.ScreenMiniled);
|
||||||
{
|
|
||||||
overdrive = Program.wmi.DeviceGet(ASUSWmi.ScreenOverdrive);
|
bool screenEnabled = (frequency >= 0);
|
||||||
}
|
|
||||||
catch
|
ButtonEnabled(button60Hz, screenEnabled);
|
||||||
{
|
ButtonEnabled(button120Hz, screenEnabled);
|
||||||
Logger.WriteLine("Screen Overdrive not supported");
|
ButtonEnabled(buttonScreenAuto, screenEnabled);
|
||||||
}
|
ButtonEnabled(buttonMiniled, screenEnabled);
|
||||||
|
|
||||||
|
labelSreen.Text = screenEnabled
|
||||||
|
? "Laptop Screen: " + frequency + "Hz" + ((overdrive == 1) ? " + Overdrive" : "")
|
||||||
|
: "Laptop Screen: Turned off";
|
||||||
|
|
||||||
button60Hz.Activated = false;
|
button60Hz.Activated = false;
|
||||||
button120Hz.Activated = false;
|
button120Hz.Activated = false;
|
||||||
|
buttonScreenAuto.Activated = false;
|
||||||
|
|
||||||
if (frequency == 60)
|
if (screenAuto)
|
||||||
|
{
|
||||||
|
buttonScreenAuto.Activated = true;
|
||||||
|
}
|
||||||
|
else if (frequency == 60)
|
||||||
{
|
{
|
||||||
button60Hz.Activated = true;
|
button60Hz.Activated = true;
|
||||||
}
|
}
|
||||||
@@ -620,6 +703,15 @@ namespace GHelper
|
|||||||
button120Hz.Text = maxFrequency.ToString() + "Hz + OD";
|
button120Hz.Text = maxFrequency.ToString() + "Hz + OD";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (miniled >= 0)
|
||||||
|
{
|
||||||
|
buttonMiniled.Activated = (miniled == 1);
|
||||||
|
Program.config.setConfig("miniled", miniled);
|
||||||
|
} else
|
||||||
|
{
|
||||||
|
buttonMiniled.Visible = false;
|
||||||
|
}
|
||||||
|
|
||||||
Program.config.setConfig("frequency", frequency);
|
Program.config.setConfig("frequency", frequency);
|
||||||
Program.config.setConfig("overdrive", overdrive);
|
Program.config.setConfig("overdrive", overdrive);
|
||||||
}
|
}
|
||||||
@@ -760,6 +852,9 @@ namespace GHelper
|
|||||||
{
|
{
|
||||||
Program.wmi.SetFanCurve(0, Program.config.getFanConfig(0));
|
Program.wmi.SetFanCurve(0, Program.config.getFanConfig(0));
|
||||||
Program.wmi.SetFanCurve(1, Program.config.getFanConfig(1));
|
Program.wmi.SetFanCurve(1, Program.config.getFanConfig(1));
|
||||||
|
|
||||||
|
if (Program.config.getConfig("mid_fan") == 1)
|
||||||
|
Program.wmi.SetFanCurve(2, Program.config.getFanConfig(2));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Program.config.getConfigPerf("auto_apply_power") == 1)
|
if (Program.config.getConfigPerf("auto_apply_power") == 1)
|
||||||
@@ -857,8 +952,7 @@ namespace GHelper
|
|||||||
|
|
||||||
public void AutoScreen(PowerLineStatus Plugged = PowerLineStatus.Online)
|
public void AutoScreen(PowerLineStatus Plugged = PowerLineStatus.Online)
|
||||||
{
|
{
|
||||||
int ScreenAuto = Program.config.getConfig("screen_auto");
|
if (Program.config.getConfig("screen_auto") != 1) return;
|
||||||
if (ScreenAuto != 1) return;
|
|
||||||
|
|
||||||
if (Plugged == PowerLineStatus.Online)
|
if (Plugged == PowerLineStatus.Online)
|
||||||
SetScreen(1000, 1);
|
SetScreen(1000, 1);
|
||||||
@@ -871,8 +965,8 @@ namespace GHelper
|
|||||||
public bool AutoGPUMode(PowerLineStatus Plugged = PowerLineStatus.Online)
|
public bool AutoGPUMode(PowerLineStatus Plugged = PowerLineStatus.Online)
|
||||||
{
|
{
|
||||||
|
|
||||||
int GpuAuto = Program.config.getConfig("gpu_auto");
|
bool GpuAuto = Program.config.getConfig("gpu_auto") == 1;
|
||||||
if (GpuAuto != 1) return false;
|
if (!GpuAuto) return false;
|
||||||
|
|
||||||
int eco = Program.wmi.DeviceGet(ASUSWmi.GPUEco);
|
int eco = Program.wmi.DeviceGet(ASUSWmi.GPUEco);
|
||||||
int mux = Program.wmi.DeviceGet(ASUSWmi.GPUMux);
|
int mux = Program.wmi.DeviceGet(ASUSWmi.GPUMux);
|
||||||
@@ -897,6 +991,29 @@ namespace GHelper
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void UltimateUI(bool ultimate)
|
||||||
|
{
|
||||||
|
if (!ultimate)
|
||||||
|
{
|
||||||
|
tableGPU.Controls.Remove(buttonUltimate);
|
||||||
|
|
||||||
|
/*
|
||||||
|
* buttonFans.Image = null;
|
||||||
|
buttonFans.Height = 44;
|
||||||
|
*/
|
||||||
|
|
||||||
|
tablePerf.ColumnCount = 0;
|
||||||
|
tableGPU.ColumnCount = 0;
|
||||||
|
tableScreen.ColumnCount = 0;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
tableLayoutKeyboard.ColumnCount = 0;
|
||||||
|
tableLayoutMatrix.ColumnCount = 0;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
public int InitGPUMode()
|
public int InitGPUMode()
|
||||||
{
|
{
|
||||||
|
|
||||||
@@ -914,14 +1031,17 @@ namespace GHelper
|
|||||||
else
|
else
|
||||||
GpuMode = ASUSWmi.GPUModeStandard;
|
GpuMode = ASUSWmi.GPUModeStandard;
|
||||||
|
|
||||||
buttonUltimate.Visible = (mux == 1);
|
UltimateUI(mux == 1);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Program.config.setConfig("gpu_mode", GpuMode);
|
||||||
|
|
||||||
|
ButtonEnabled(buttonOptimized, true);
|
||||||
ButtonEnabled(buttonEco, true);
|
ButtonEnabled(buttonEco, true);
|
||||||
ButtonEnabled(buttonStandard, true);
|
ButtonEnabled(buttonStandard, true);
|
||||||
ButtonEnabled(buttonUltimate, true);
|
ButtonEnabled(buttonUltimate, true);
|
||||||
|
|
||||||
Program.config.setConfig("gpu_mode", GpuMode);
|
|
||||||
VisualiseGPUMode(GpuMode);
|
VisualiseGPUMode(GpuMode);
|
||||||
|
|
||||||
return GpuMode;
|
return GpuMode;
|
||||||
@@ -932,6 +1052,7 @@ namespace GHelper
|
|||||||
public void SetEcoGPU(int eco)
|
public void SetEcoGPU(int eco)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
ButtonEnabled(buttonOptimized, false);
|
||||||
ButtonEnabled(buttonEco, false);
|
ButtonEnabled(buttonEco, false);
|
||||||
ButtonEnabled(buttonStandard, false);
|
ButtonEnabled(buttonStandard, false);
|
||||||
ButtonEnabled(buttonUltimate, false);
|
ButtonEnabled(buttonUltimate, false);
|
||||||
@@ -944,7 +1065,7 @@ namespace GHelper
|
|||||||
|
|
||||||
if (eco == 1)
|
if (eco == 1)
|
||||||
{
|
{
|
||||||
string[] tokill = { "EADesktop" };
|
string[] tokill = { "EADesktop", "RadeonSoftware" };
|
||||||
foreach (string kill in tokill)
|
foreach (string kill in tokill)
|
||||||
foreach (var process in Process.GetProcessesByName(kill)) process.Kill();
|
foreach (var process in Process.GetProcessesByName(kill)) process.Kill();
|
||||||
}
|
}
|
||||||
@@ -968,9 +1089,13 @@ namespace GHelper
|
|||||||
{
|
{
|
||||||
|
|
||||||
int CurrentGPU = Program.config.getConfig("gpu_mode");
|
int CurrentGPU = Program.config.getConfig("gpu_mode");
|
||||||
|
Program.config.setConfig("gpu_auto", 0);
|
||||||
|
|
||||||
if (CurrentGPU == GPUMode)
|
if (CurrentGPU == GPUMode)
|
||||||
|
{
|
||||||
|
VisualiseGPUMode();
|
||||||
return;
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
var restart = false;
|
var restart = false;
|
||||||
var changed = false;
|
var changed = false;
|
||||||
@@ -987,7 +1112,7 @@ namespace GHelper
|
|||||||
}
|
}
|
||||||
else if (GPUMode == ASUSWmi.GPUModeUltimate)
|
else if (GPUMode == ASUSWmi.GPUModeUltimate)
|
||||||
{
|
{
|
||||||
DialogResult dialogResult = MessageBox.Show(" Ultimate Mode requires restart", "Reboot now?", MessageBoxButtons.YesNo);
|
DialogResult dialogResult = MessageBox.Show("Ultimate Mode requires restart", "Reboot now?", MessageBoxButtons.YesNo);
|
||||||
if (dialogResult == DialogResult.Yes)
|
if (dialogResult == DialogResult.Yes)
|
||||||
{
|
{
|
||||||
Program.wmi.DeviceSet(ASUSWmi.GPUMux, 0);
|
Program.wmi.DeviceSet(ASUSWmi.GPUMux, 0);
|
||||||
@@ -1012,60 +1137,55 @@ namespace GHelper
|
|||||||
if (changed)
|
if (changed)
|
||||||
{
|
{
|
||||||
Program.config.setConfig("gpu_mode", GPUMode);
|
Program.config.setConfig("gpu_mode", GPUMode);
|
||||||
|
|
||||||
HardwareMonitor.RecreateGpuTemperatureProviderWithRetry();
|
HardwareMonitor.RecreateGpuTemperatureProviderWithRetry();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (restart)
|
if (restart)
|
||||||
{
|
{
|
||||||
VisualiseGPUMode(GPUMode);
|
VisualiseGPUMode();
|
||||||
Process.Start("shutdown", "/r /t 1");
|
Process.Start("shutdown", "/r /t 1");
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public void VisualiseGPUAuto(int GPUAuto)
|
|
||||||
{
|
|
||||||
checkGPU.Checked = (GPUAuto == 1);
|
|
||||||
}
|
|
||||||
|
|
||||||
public void VisualiseScreenAuto(int ScreenAuto)
|
|
||||||
{
|
|
||||||
checkScreen.Checked = (ScreenAuto == 1);
|
|
||||||
}
|
|
||||||
|
|
||||||
public void VisualiseGPUMode(int GPUMode = -1)
|
public void VisualiseGPUMode(int GPUMode = -1)
|
||||||
{
|
{
|
||||||
|
|
||||||
if (GPUMode == -1)
|
if (GPUMode == -1)
|
||||||
{
|
|
||||||
GPUMode = Program.config.getConfig("gpu_mode");
|
GPUMode = Program.config.getConfig("gpu_mode");
|
||||||
}
|
|
||||||
|
bool GPUAuto = (Program.config.getConfig("gpu_auto") == 1);
|
||||||
|
|
||||||
buttonEco.Activated = false;
|
buttonEco.Activated = false;
|
||||||
buttonStandard.Activated = false;
|
buttonStandard.Activated = false;
|
||||||
buttonUltimate.Activated = false;
|
buttonUltimate.Activated = false;
|
||||||
|
buttonOptimized.Activated = false;
|
||||||
|
|
||||||
switch (GPUMode)
|
switch (GPUMode)
|
||||||
{
|
{
|
||||||
case ASUSWmi.GPUModeEco:
|
case ASUSWmi.GPUModeEco:
|
||||||
buttonEco.Activated = true;
|
buttonOptimized.BorderColor = colorEco;
|
||||||
|
buttonEco.Activated = !GPUAuto;
|
||||||
|
buttonOptimized.Activated = GPUAuto;
|
||||||
labelGPU.Text = "GPU Mode: iGPU only";
|
labelGPU.Text = "GPU Mode: iGPU only";
|
||||||
Program.trayIcon.Icon = GHelper.Properties.Resources.eco;
|
Program.trayIcon.Icon = Properties.Resources.eco;
|
||||||
break;
|
break;
|
||||||
case ASUSWmi.GPUModeUltimate:
|
case ASUSWmi.GPUModeUltimate:
|
||||||
buttonUltimate.Activated = true;
|
buttonUltimate.Activated = true;
|
||||||
labelGPU.Text = "GPU Mode: dGPU exclusive";
|
labelGPU.Text = "GPU Mode: dGPU exclusive";
|
||||||
Program.trayIcon.Icon = GHelper.Properties.Resources.ultimate;
|
Program.trayIcon.Icon = Properties.Resources.ultimate;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
buttonStandard.Activated = true;
|
buttonOptimized.BorderColor = colorStandard;
|
||||||
|
buttonStandard.Activated = !GPUAuto;
|
||||||
|
buttonOptimized.Activated = GPUAuto;
|
||||||
labelGPU.Text = "GPU Mode: iGPU + dGPU";
|
labelGPU.Text = "GPU Mode: iGPU + dGPU";
|
||||||
Program.trayIcon.Icon = GHelper.Properties.Resources.standard;
|
Program.trayIcon.Icon = Properties.Resources.standard;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -1089,10 +1209,10 @@ namespace GHelper
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void ButtonEnabled(Button but, bool enabled)
|
public void ButtonEnabled(RButton but, bool enabled)
|
||||||
{
|
{
|
||||||
but.Enabled = enabled;
|
but.Enabled = enabled;
|
||||||
but.BackColor = enabled ? SystemColors.ControlLightLight : SystemColors.ControlLight;
|
but.BackColor = but.Enabled ? Color.FromArgb(255, but.BackColor) : Color.FromArgb(100, but.BackColor);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void SetStartupCheck(bool status)
|
public void SetStartupCheck(bool status)
|
||||||
@@ -1123,14 +1243,6 @@ namespace GHelper
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
private void checkScreen_CheckedChanged(object? sender, EventArgs e)
|
|
||||||
{
|
|
||||||
if (sender is null) return;
|
|
||||||
CheckBox check = (CheckBox)sender;
|
|
||||||
Program.config.setConfig("screen_auto", check.Checked ? 1 : 0);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -54,8 +54,8 @@
|
|||||||
<application xmlns="urn:schemas-microsoft-com:asm.v3">
|
<application xmlns="urn:schemas-microsoft-com:asm.v3">
|
||||||
<windowsSettings>
|
<windowsSettings>
|
||||||
<!--<dpiAwareness xmlns="http://schemas.microsoft.com/SMI/2016/WindowsSettings">PerMonitor/dpiAwareness>-->
|
<!--<dpiAwareness xmlns="http://schemas.microsoft.com/SMI/2016/WindowsSettings">PerMonitor/dpiAwareness>-->
|
||||||
<dpiAware xmlns="http://schemas.microsoft.com/SMI/2005/WindowsSettings">true</dpiAware>
|
|
||||||
<dpiAwareness xmlns="http://schemas.microsoft.com/SMI/2016/WindowsSettings">System</dpiAwareness>
|
<dpiAwareness xmlns="http://schemas.microsoft.com/SMI/2016/WindowsSettings">System</dpiAwareness>
|
||||||
|
<dpiAware xmlns="http://schemas.microsoft.com/SMI/2005/WindowsSettings">true</dpiAware>
|
||||||
</windowsSettings>
|
</windowsSettings>
|
||||||
</application>
|
</application>
|
||||||
|
|
||||||
|
|||||||
@@ -1,11 +1,10 @@
|
|||||||
# [G-Helper (GHelper)](https://github.com/seerge/g-helper)
|
# [G-Helper (GHelper)](https://github.com/seerge/g-helper)
|
||||||
|
|
||||||
[](https://GitHub.com/seerge/g-helper/releases/) [](https://GitHub.com/seerge/g-helper/releases/) [](https://github.com/seerge/g-helper/blob/master/LICENSE)
|
[](https://GitHub.com/seerge/g-helper/releases/) [](https://GitHub.com/seerge/g-helper/releases/) [](https://GitHub.com/seerge/g-helper/stargazers/)
|
||||||
[](https://GitHub.com/seerge/g-helper/stargazers/)
|
|
||||||
|
|
||||||
## Open source Armory Crate alternative for Asus ROG Zephyrus G14, G15, Flow X13, Flow X16, and other models
|
## Open source Armoury Crate alternative for Asus ROG Zephyrus G14, G15, Flow X13, Flow X16, and other models
|
||||||
|
|
||||||
A small utility that allows you to do almost everything you could do with Armory Crate but without extra bloat and unnecessary services.
|
A small utility that allows you to do almost everything you could do with Armoury Crate but without extra bloat and unnecessary services.
|
||||||
|
|
||||||
### :gift: Main advantages
|
### :gift: Main advantages
|
||||||
|
|
||||||
@@ -15,14 +14,14 @@ A small utility that allows you to do almost everything you could do with Armory
|
|||||||
|
|
||||||
### [:floppy_disk: Download latest release](https://github.com/seerge/g-helper/releases/latest/download/GHelper.zip)
|
### [:floppy_disk: Download latest release](https://github.com/seerge/g-helper/releases/latest/download/GHelper.zip)
|
||||||
|
|
||||||
If you like this app, please star :star: it on Github and spread a word about it!
|
If you like this app, please [star :star: it on Github](https://github.com/seerge/g-helper) and spread a word about it!
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
### :zap: Main features
|
### :zap: Main features
|
||||||
|
|
||||||
1. Built-in **Performance modes**: Silent - Balanced - Turbo (with default fan curves)
|
1. Built-in **Performance modes**: Silent - Balanced - Turbo (with default fan curves)
|
||||||
2. **GPU modes**: Eco -Standard - Ultimate
|
2. **GPU modes**: Eco - Standard - Ultimate - Optimized
|
||||||
3. Laptop screen refresh rate 60hz or 120hz (144hz, etc depending on the model) with display overdrive (OD)
|
3. Laptop screen refresh rate 60hz or 120hz (144hz, etc depending on the model) with display overdrive (OD)
|
||||||
4. Default and custom fan profiles for every performance mode
|
4. Default and custom fan profiles for every performance mode
|
||||||
5. Power limits (PPT) for every performance mode
|
5. Power limits (PPT) for every performance mode
|
||||||
@@ -36,8 +35,8 @@ If you like this app, please star :star: it on Github and spread a word about it
|
|||||||
|
|
||||||
### :apple: Automatic switching of modes when on battery or plugged in
|
### :apple: Automatic switching of modes when on battery or plugged in
|
||||||
- Performance modes (app remembers last mode used on battery or when plugged)
|
- Performance modes (app remembers last mode used on battery or when plugged)
|
||||||
- GPU modes (eco on battery, stanard when plugged)
|
- Optimized GPU mode - disables dGPU on battery and enables when plugged
|
||||||
- Screen refresh rate (60hz on battery, 120+ hz when plugged)
|
- Auto Screen refresh rate (60hz on battery, 120+ hz when plugged)
|
||||||
|
|
||||||
To keep auto switching and hotkeys working the app needs to stay in running in the tray. It doesn't consume any resources.
|
To keep auto switching and hotkeys working the app needs to stay in running in the tray. It doesn't consume any resources.
|
||||||
|
|
||||||
@@ -56,6 +55,7 @@ PPTs are shown for G14 2022, for other models PPTs will be different as they are
|
|||||||
1. Eco mode : only low power integrated GPU enabled, iGPU drives built in display
|
1. Eco mode : only low power integrated GPU enabled, iGPU drives built in display
|
||||||
2. Standard mode (Windows Hybrid) : iGPU and dGPU enabled, iGPU drives built in display
|
2. Standard mode (Windows Hybrid) : iGPU and dGPU enabled, iGPU drives built in display
|
||||||
3. Ultimate mode: iGPU and dGPU enabled, but dGPU drives built in display (supported only on G14 2022 model)
|
3. Ultimate mode: iGPU and dGPU enabled, but dGPU drives built in display (supported only on G14 2022 model)
|
||||||
|
4. Optimized (formely existed as a checkbox): disables dGPU on battery (Eco) and enables when plugged (Standard)
|
||||||
|
|
||||||
### :question: FAQ
|
### :question: FAQ
|
||||||
|
|
||||||
|
|||||||
BIN
docs/screenshot-dark.png
Normal file
|
After Width: | Height: | Size: 1.3 MiB |
|
Before Width: | Height: | Size: 3.6 MiB After Width: | Height: | Size: 4.2 MiB |