mirror of
https://github.com/jkocon/g-helper.git
synced 2026-02-23 13:00:52 +01:00
Cleanup
This commit is contained in:
76
app/Fans.Designer.cs
generated
76
app/Fans.Designer.cs
generated
@@ -82,10 +82,6 @@ namespace GHelper
|
||||
labelTemp = new Label();
|
||||
labelLeftTemp = new Label();
|
||||
trackTemp = new TrackBar();
|
||||
panelSkin = new Panel();
|
||||
labelSkin = new Label();
|
||||
labelSkinTitle = new Label();
|
||||
trackSkin = new TrackBar();
|
||||
panelTitleTemp = new Panel();
|
||||
pictureTemp = new PictureBox();
|
||||
labelTempLimit = new Label();
|
||||
@@ -176,8 +172,6 @@ namespace GHelper
|
||||
((System.ComponentModel.ISupportInitialize)pictureUV).BeginInit();
|
||||
panelTemperature.SuspendLayout();
|
||||
((System.ComponentModel.ISupportInitialize)trackTemp).BeginInit();
|
||||
panelSkin.SuspendLayout();
|
||||
((System.ComponentModel.ISupportInitialize)trackSkin).BeginInit();
|
||||
panelTitleTemp.SuspendLayout();
|
||||
((System.ComponentModel.ISupportInitialize)pictureTemp).BeginInit();
|
||||
panelDownload.SuspendLayout();
|
||||
@@ -540,14 +534,13 @@ namespace GHelper
|
||||
panelAdvanced.Controls.Add(panelUViGPU);
|
||||
panelAdvanced.Controls.Add(panelUV);
|
||||
panelAdvanced.Controls.Add(panelTitleAdvanced);
|
||||
panelAdvanced.Controls.Add(panelSkin);
|
||||
panelAdvanced.Controls.Add(panelTemperature);
|
||||
panelAdvanced.Controls.Add(panelTitleTemp);
|
||||
panelAdvanced.Controls.Add(panelDownload);
|
||||
panelAdvanced.Dock = DockStyle.Top;
|
||||
panelAdvanced.Location = new Point(10, 1768);
|
||||
panelAdvanced.Name = "panelAdvanced";
|
||||
panelAdvanced.Size = new Size(520, 1116);
|
||||
panelAdvanced.Size = new Size(520, 992);
|
||||
panelAdvanced.TabIndex = 14;
|
||||
panelAdvanced.Visible = false;
|
||||
//
|
||||
@@ -556,7 +549,7 @@ namespace GHelper
|
||||
panelAdvancedAlways.AutoSize = true;
|
||||
panelAdvancedAlways.Controls.Add(checkApplyUV);
|
||||
panelAdvancedAlways.Dock = DockStyle.Top;
|
||||
panelAdvancedAlways.Location = new Point(0, 1055);
|
||||
panelAdvancedAlways.Location = new Point(0, 931);
|
||||
panelAdvancedAlways.Name = "panelAdvancedAlways";
|
||||
panelAdvancedAlways.Padding = new Padding(16, 0, 16, 15);
|
||||
panelAdvancedAlways.Size = new Size(520, 61);
|
||||
@@ -582,7 +575,7 @@ namespace GHelper
|
||||
panelAdvancedApply.AutoSize = true;
|
||||
panelAdvancedApply.Controls.Add(buttonApplyAdvanced);
|
||||
panelAdvancedApply.Dock = DockStyle.Top;
|
||||
panelAdvancedApply.Location = new Point(0, 975);
|
||||
panelAdvancedApply.Location = new Point(0, 851);
|
||||
panelAdvancedApply.Name = "panelAdvancedApply";
|
||||
panelAdvancedApply.Padding = new Padding(15);
|
||||
panelAdvancedApply.Size = new Size(520, 80);
|
||||
@@ -611,7 +604,7 @@ namespace GHelper
|
||||
labelRisky.BackColor = Color.IndianRed;
|
||||
labelRisky.Dock = DockStyle.Top;
|
||||
labelRisky.ForeColor = SystemColors.ControlLightLight;
|
||||
labelRisky.Location = new Point(0, 732);
|
||||
labelRisky.Location = new Point(0, 608);
|
||||
labelRisky.Margin = new Padding(0);
|
||||
labelRisky.Name = "labelRisky";
|
||||
labelRisky.Padding = new Padding(10, 10, 10, 5);
|
||||
@@ -627,7 +620,7 @@ namespace GHelper
|
||||
panelUViGPU.Controls.Add(labelLeftUViGPU);
|
||||
panelUViGPU.Controls.Add(trackUViGPU);
|
||||
panelUViGPU.Dock = DockStyle.Top;
|
||||
panelUViGPU.Location = new Point(0, 608);
|
||||
panelUViGPU.Location = new Point(0, 484);
|
||||
panelUViGPU.Margin = new Padding(4);
|
||||
panelUViGPU.MaximumSize = new Size(0, 124);
|
||||
panelUViGPU.Name = "panelUViGPU";
|
||||
@@ -675,7 +668,7 @@ namespace GHelper
|
||||
panelUV.Controls.Add(labelLeftUV);
|
||||
panelUV.Controls.Add(trackUV);
|
||||
panelUV.Dock = DockStyle.Top;
|
||||
panelUV.Location = new Point(0, 484);
|
||||
panelUV.Location = new Point(0, 360);
|
||||
panelUV.Margin = new Padding(4);
|
||||
panelUV.MaximumSize = new Size(0, 124);
|
||||
panelUV.Name = "panelUV";
|
||||
@@ -720,7 +713,7 @@ namespace GHelper
|
||||
panelTitleAdvanced.Controls.Add(pictureUV);
|
||||
panelTitleAdvanced.Controls.Add(labelTitleUV);
|
||||
panelTitleAdvanced.Dock = DockStyle.Top;
|
||||
panelTitleAdvanced.Location = new Point(0, 418);
|
||||
panelTitleAdvanced.Location = new Point(0, 294);
|
||||
panelTitleAdvanced.Name = "panelTitleAdvanced";
|
||||
panelTitleAdvanced.Size = new Size(520, 66);
|
||||
panelTitleAdvanced.TabIndex = 48;
|
||||
@@ -796,54 +789,6 @@ namespace GHelper
|
||||
trackTemp.TickFrequency = 5;
|
||||
trackTemp.TickStyle = TickStyle.TopLeft;
|
||||
//
|
||||
// panelSkin
|
||||
//
|
||||
panelSkin.AutoSize = true;
|
||||
panelSkin.AutoSizeMode = AutoSizeMode.GrowAndShrink;
|
||||
panelSkin.Controls.Add(labelSkin);
|
||||
panelSkin.Controls.Add(labelSkinTitle);
|
||||
panelSkin.Controls.Add(trackSkin);
|
||||
panelSkin.Dock = DockStyle.Top;
|
||||
panelSkin.Location = new Point(0, 294);
|
||||
panelSkin.Margin = new Padding(4);
|
||||
panelSkin.MaximumSize = new Size(0, 124);
|
||||
panelSkin.Name = "panelSkin";
|
||||
panelSkin.Size = new Size(520, 124);
|
||||
panelSkin.TabIndex = 53;
|
||||
//
|
||||
// labelSkin
|
||||
//
|
||||
labelSkin.Font = new Font("Segoe UI", 9F, FontStyle.Bold, GraphicsUnit.Point);
|
||||
labelSkin.Location = new Point(347, 13);
|
||||
labelSkin.Margin = new Padding(4, 0, 4, 0);
|
||||
labelSkin.Name = "labelSkin";
|
||||
labelSkin.Size = new Size(148, 32);
|
||||
labelSkin.TabIndex = 13;
|
||||
labelSkin.Text = "T";
|
||||
labelSkin.TextAlign = ContentAlignment.TopRight;
|
||||
//
|
||||
// labelSkinTitle
|
||||
//
|
||||
labelSkinTitle.AutoSize = true;
|
||||
labelSkinTitle.Location = new Point(10, 10);
|
||||
labelSkinTitle.Margin = new Padding(4, 0, 4, 0);
|
||||
labelSkinTitle.Name = "labelSkinTitle";
|
||||
labelSkinTitle.Size = new Size(235, 32);
|
||||
labelSkinTitle.TabIndex = 12;
|
||||
labelSkinTitle.Text = "APU Skin Temp Limit";
|
||||
//
|
||||
// trackSkin
|
||||
//
|
||||
trackSkin.Location = new Point(6, 48);
|
||||
trackSkin.Margin = new Padding(4, 2, 4, 2);
|
||||
trackSkin.Maximum = 0;
|
||||
trackSkin.Minimum = -40;
|
||||
trackSkin.Name = "trackSkin";
|
||||
trackSkin.Size = new Size(508, 90);
|
||||
trackSkin.TabIndex = 11;
|
||||
trackSkin.TickFrequency = 5;
|
||||
trackSkin.TickStyle = TickStyle.TopLeft;
|
||||
//
|
||||
// panelTitleTemp
|
||||
//
|
||||
panelTitleTemp.Controls.Add(pictureTemp);
|
||||
@@ -1776,9 +1721,6 @@ namespace GHelper
|
||||
panelTemperature.ResumeLayout(false);
|
||||
panelTemperature.PerformLayout();
|
||||
((System.ComponentModel.ISupportInitialize)trackTemp).EndInit();
|
||||
panelSkin.ResumeLayout(false);
|
||||
panelSkin.PerformLayout();
|
||||
((System.ComponentModel.ISupportInitialize)trackSkin).EndInit();
|
||||
panelTitleTemp.ResumeLayout(false);
|
||||
panelTitleTemp.PerformLayout();
|
||||
((System.ComponentModel.ISupportInitialize)pictureTemp).EndInit();
|
||||
@@ -1952,9 +1894,5 @@ namespace GHelper
|
||||
private Label labelGPUPower;
|
||||
private Label labelGPUPowerTitle;
|
||||
private TrackBar trackGPUPower;
|
||||
private Panel panelSkin;
|
||||
private Label labelSkin;
|
||||
private Label labelSkinTitle;
|
||||
private TrackBar trackSkin;
|
||||
}
|
||||
}
|
||||
13
app/Fans.cs
13
app/Fans.cs
@@ -184,9 +184,6 @@ namespace GHelper
|
||||
trackTemp.Minimum = RyzenControl.MinTemp;
|
||||
trackTemp.Maximum = RyzenControl.MaxTemp;
|
||||
|
||||
trackSkin.Minimum = RyzenControl.MinSkin;
|
||||
trackSkin.Maximum = RyzenControl.MaxSkin;
|
||||
|
||||
comboPowerMode.DropDownStyle = ComboBoxStyle.DropDownList;
|
||||
comboPowerMode.DataSource = new BindingSource(PowerNative.powerModes, null);
|
||||
comboPowerMode.DisplayMember = "Value";
|
||||
@@ -214,7 +211,6 @@ namespace GHelper
|
||||
trackUV.Scroll += TrackUV_Scroll;
|
||||
trackUViGPU.Scroll += TrackUV_Scroll;
|
||||
trackTemp.Scroll += TrackUV_Scroll;
|
||||
trackSkin.Scroll += TrackUV_Scroll;
|
||||
|
||||
buttonApplyAdvanced.Click += ButtonApplyAdvanced_Click;
|
||||
|
||||
@@ -252,7 +248,6 @@ namespace GHelper
|
||||
panelUV.Visible = true;
|
||||
panelTitleAdvanced.Visible = true;
|
||||
panelTemperature.Visible = true;
|
||||
panelSkin.Visible = true;
|
||||
panelTitleTemp.Visible = true;
|
||||
|
||||
VisualiseAdvanced();
|
||||
@@ -386,15 +381,11 @@ namespace GHelper
|
||||
int temp = AppConfig.GetMode("cpu_temp");
|
||||
if (temp < RyzenControl.MinTemp || temp > RyzenControl.MaxTemp) temp = RyzenControl.MaxTemp;
|
||||
|
||||
int skin = AppConfig.GetMode("skin_temp");
|
||||
if (skin < RyzenControl.MinSkin || skin > RyzenControl.MaxSkin) skin = RyzenControl.MaxSkin;
|
||||
|
||||
checkApplyUV.Enabled = checkApplyUV.Checked = AppConfig.IsMode("auto_uv");
|
||||
|
||||
trackUV.Value = cpuUV;
|
||||
trackUViGPU.Value = igpuUV;
|
||||
trackTemp.Value = temp;
|
||||
trackSkin.Value = skin;
|
||||
|
||||
VisualiseAdvanced();
|
||||
|
||||
@@ -413,7 +404,6 @@ namespace GHelper
|
||||
panelUViGPU.Visible = false;
|
||||
panelTitleTemp.Visible = false;
|
||||
panelTemperature.Visible = false;
|
||||
panelSkin.Visible = false;
|
||||
panelAdvancedAlways.Visible = false;
|
||||
panelAdvancedApply.Visible = false;
|
||||
panelDownload.Visible = true;
|
||||
@@ -440,7 +430,6 @@ namespace GHelper
|
||||
labelUViGPU.Text = trackUViGPU.Value.ToString();
|
||||
|
||||
labelTemp.Text = (trackTemp.Value < RyzenControl.MaxTemp) ? trackTemp.Value.ToString() + "°C" : "Default";
|
||||
labelSkin.Text = (trackSkin.Value < RyzenControl.MaxSkin) ? trackSkin.Value.ToString() + "°C" : "Default";
|
||||
}
|
||||
|
||||
private void AdvancedScroll()
|
||||
@@ -450,7 +439,6 @@ namespace GHelper
|
||||
|
||||
VisualiseAdvanced();
|
||||
|
||||
AppConfig.SetMode("skin_temp", trackSkin.Value);
|
||||
AppConfig.SetMode("cpu_temp", trackTemp.Value);
|
||||
AppConfig.SetMode("cpu_uv", trackUV.Value);
|
||||
AppConfig.SetMode("igpu_uv", trackUViGPU.Value);
|
||||
@@ -1153,7 +1141,6 @@ namespace GHelper
|
||||
trackUV.Value = RyzenControl.MaxCPUUV;
|
||||
trackUViGPU.Value = RyzenControl.MaxIGPUUV;
|
||||
trackTemp.Value = RyzenControl.MaxTemp;
|
||||
trackSkin.Value = RyzenControl.MaxSkin;
|
||||
|
||||
AdvancedScroll();
|
||||
AppConfig.RemoveMode("cpu_temp");
|
||||
|
||||
@@ -31,7 +31,6 @@ namespace GHelper.Mode
|
||||
private void ReapplyTimer_Elapsed(object? sender, System.Timers.ElapsedEventArgs e)
|
||||
{
|
||||
SetCPUTemp(AppConfig.GetMode("cpu_temp"));
|
||||
SetSkinTemp(AppConfig.GetMode("skin_temp"));
|
||||
SetRyzenPower();
|
||||
}
|
||||
|
||||
@@ -410,15 +409,6 @@ namespace GHelper.Mode
|
||||
}
|
||||
}
|
||||
|
||||
public void SetSkinTemp(int? skinTemp, bool init = false)
|
||||
{
|
||||
if (skinTemp >= RyzenControl.MinSkin && skinTemp < RyzenControl.MaxSkin)
|
||||
{
|
||||
var restultAPU = SendCommand.set_apu_skin_temp_limit((uint)skinTemp);
|
||||
if (init) Logger.WriteLine($"APU Skin Temp: {skinTemp} {restultAPU}");
|
||||
}
|
||||
}
|
||||
|
||||
public void SetUV(int cpuUV)
|
||||
{
|
||||
if (!RyzenControl.IsSupportedUV()) return;
|
||||
@@ -459,7 +449,6 @@ namespace GHelper.Mode
|
||||
SetUV(AppConfig.GetMode("cpu_uv", 0));
|
||||
SetUViGPU(AppConfig.GetMode("igpu_uv", 0));
|
||||
SetCPUTemp(AppConfig.GetMode("cpu_temp"), true);
|
||||
SetSkinTemp(AppConfig.GetMode("skin_temp"), true);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
|
||||
@@ -21,8 +21,6 @@ namespace Ryzen
|
||||
|
||||
public static int MinTemp => AppConfig.Get("min_temp", 75);
|
||||
public const int MaxTemp = 98;
|
||||
public static int MinSkin => 25;
|
||||
public const int MaxSkin = 46;
|
||||
|
||||
public static int FAMID { get; protected set; }
|
||||
|
||||
|
||||
Reference in New Issue
Block a user