mirror of
https://github.com/jkocon/g-helper.git
synced 2026-02-23 13:00:52 +01:00
Added AutoTDP feature with RTSS source and Intel + ASUS power limiters
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
using GHelper.Ally;
|
||||
using GHelper.AnimeMatrix;
|
||||
using GHelper.AutoTDP;
|
||||
using GHelper.AutoUpdate;
|
||||
using GHelper.Battery;
|
||||
using GHelper.Display;
|
||||
@@ -28,6 +29,7 @@ namespace GHelper
|
||||
AutoUpdateControl updateControl;
|
||||
|
||||
AsusMouseSettings? mouseSettings;
|
||||
AutoTDPUI? autoTdpUi;
|
||||
|
||||
public AniMatrixControl matrixControl;
|
||||
|
||||
@@ -244,6 +246,8 @@ namespace GHelper
|
||||
buttonFPS.Click += ButtonFPS_Click;
|
||||
buttonOverlay.Click += ButtonOverlay_Click;
|
||||
|
||||
buttonAutoTDP.Click += ButtonAutoTDP_Click;
|
||||
|
||||
Text = "G-Helper " + (ProcessHelper.IsUserAdministrator() ? "—" : "-") + " " + AppConfig.GetModelShort();
|
||||
TopMost = AppConfig.Is("topmost");
|
||||
|
||||
@@ -261,6 +265,32 @@ namespace GHelper
|
||||
panelPerformance.Focus();
|
||||
}
|
||||
|
||||
private void ButtonAutoTDP_Click(object? sender, EventArgs e)
|
||||
{
|
||||
autoTdpUi = new AutoTDPUI();
|
||||
autoTdpUi.TopMost = true;
|
||||
autoTdpUi.FormClosed += AutoTdpUi_FormClosed;
|
||||
autoTdpUi.Disposed += AutoTdpUi_Disposed;
|
||||
if (!autoTdpUi.IsDisposed)
|
||||
{
|
||||
autoTdpUi.Show();
|
||||
}
|
||||
else
|
||||
{
|
||||
autoTdpUi = null;
|
||||
}
|
||||
}
|
||||
|
||||
private void AutoTdpUi_Disposed(object? sender, EventArgs e)
|
||||
{
|
||||
autoTdpUi = null;
|
||||
}
|
||||
|
||||
private void AutoTdpUi_FormClosed(object? sender, FormClosedEventArgs e)
|
||||
{
|
||||
autoTdpUi = null;
|
||||
}
|
||||
|
||||
private void SliderGamma_ValueChanged(object? sender, EventArgs e)
|
||||
{
|
||||
screenControl.SetGamma(sliderGamma.Value);
|
||||
@@ -1081,6 +1111,7 @@ namespace GHelper
|
||||
|
||||
private void ButtonQuit_Click(object? sender, EventArgs e)
|
||||
{
|
||||
Program.autoTDPService.Shutdown();
|
||||
matrixControl.Dispose();
|
||||
Close();
|
||||
Program.trayIcon.Visible = false;
|
||||
|
||||
Reference in New Issue
Block a user