mirror of
https://github.com/jkocon/g-helper.git
synced 2026-02-23 13:00:52 +01:00
Advanced Settings Plugin downloader
This commit is contained in:
106
app/Fans.Designer.cs
generated
106
app/Fans.Designer.cs
generated
@@ -31,14 +31,14 @@ namespace GHelper
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
private void InitializeComponent()
|
private void InitializeComponent()
|
||||||
{
|
{
|
||||||
ChartArea chartArea5 = new ChartArea();
|
ChartArea chartArea1 = new ChartArea();
|
||||||
Title title5 = new Title();
|
Title title1 = new Title();
|
||||||
ChartArea chartArea6 = new ChartArea();
|
ChartArea chartArea2 = new ChartArea();
|
||||||
Title title6 = new Title();
|
Title title2 = new Title();
|
||||||
ChartArea chartArea7 = new ChartArea();
|
ChartArea chartArea3 = new ChartArea();
|
||||||
Title title7 = new Title();
|
Title title3 = new Title();
|
||||||
ChartArea chartArea8 = new ChartArea();
|
ChartArea chartArea4 = new ChartArea();
|
||||||
Title title8 = new Title();
|
Title title4 = new Title();
|
||||||
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Fans));
|
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Fans));
|
||||||
panelFans = new Panel();
|
panelFans = new Panel();
|
||||||
labelTip = new Label();
|
labelTip = new Label();
|
||||||
@@ -85,6 +85,8 @@ namespace GHelper
|
|||||||
panelTitleTemp = new Panel();
|
panelTitleTemp = new Panel();
|
||||||
pictureTemp = new PictureBox();
|
pictureTemp = new PictureBox();
|
||||||
labelTempLimit = new Label();
|
labelTempLimit = new Label();
|
||||||
|
panelDownload = new Panel();
|
||||||
|
buttonDownload = new RButton();
|
||||||
panelPower = new Panel();
|
panelPower = new Panel();
|
||||||
panelApplyPower = new Panel();
|
panelApplyPower = new Panel();
|
||||||
checkApplyPower = new RCheckBox();
|
checkApplyPower = new RCheckBox();
|
||||||
@@ -168,6 +170,7 @@ namespace GHelper
|
|||||||
((System.ComponentModel.ISupportInitialize)trackTemp).BeginInit();
|
((System.ComponentModel.ISupportInitialize)trackTemp).BeginInit();
|
||||||
panelTitleTemp.SuspendLayout();
|
panelTitleTemp.SuspendLayout();
|
||||||
((System.ComponentModel.ISupportInitialize)pictureTemp).BeginInit();
|
((System.ComponentModel.ISupportInitialize)pictureTemp).BeginInit();
|
||||||
|
panelDownload.SuspendLayout();
|
||||||
panelPower.SuspendLayout();
|
panelPower.SuspendLayout();
|
||||||
panelApplyPower.SuspendLayout();
|
panelApplyPower.SuspendLayout();
|
||||||
panelCPU.SuspendLayout();
|
panelCPU.SuspendLayout();
|
||||||
@@ -257,8 +260,8 @@ namespace GHelper
|
|||||||
//
|
//
|
||||||
// chartGPU
|
// chartGPU
|
||||||
//
|
//
|
||||||
chartArea5.Name = "ChartArea1";
|
chartArea1.Name = "ChartArea1";
|
||||||
chartGPU.ChartAreas.Add(chartArea5);
|
chartGPU.ChartAreas.Add(chartArea1);
|
||||||
chartGPU.Dock = DockStyle.Fill;
|
chartGPU.Dock = DockStyle.Fill;
|
||||||
chartGPU.Location = new Point(12, 493);
|
chartGPU.Location = new Point(12, 493);
|
||||||
chartGPU.Margin = new Padding(2, 10, 2, 10);
|
chartGPU.Margin = new Padding(2, 10, 2, 10);
|
||||||
@@ -266,13 +269,13 @@ namespace GHelper
|
|||||||
chartGPU.Size = new Size(782, 463);
|
chartGPU.Size = new Size(782, 463);
|
||||||
chartGPU.TabIndex = 17;
|
chartGPU.TabIndex = 17;
|
||||||
chartGPU.Text = "chartGPU";
|
chartGPU.Text = "chartGPU";
|
||||||
title5.Name = "Title1";
|
title1.Name = "Title1";
|
||||||
chartGPU.Titles.Add(title5);
|
chartGPU.Titles.Add(title1);
|
||||||
//
|
//
|
||||||
// chartCPU
|
// chartCPU
|
||||||
//
|
//
|
||||||
chartArea6.Name = "ChartArea1";
|
chartArea2.Name = "ChartArea1";
|
||||||
chartCPU.ChartAreas.Add(chartArea6);
|
chartCPU.ChartAreas.Add(chartArea2);
|
||||||
chartCPU.Dock = DockStyle.Fill;
|
chartCPU.Dock = DockStyle.Fill;
|
||||||
chartCPU.Location = new Point(12, 10);
|
chartCPU.Location = new Point(12, 10);
|
||||||
chartCPU.Margin = new Padding(2, 10, 2, 10);
|
chartCPU.Margin = new Padding(2, 10, 2, 10);
|
||||||
@@ -280,13 +283,13 @@ namespace GHelper
|
|||||||
chartCPU.Size = new Size(782, 463);
|
chartCPU.Size = new Size(782, 463);
|
||||||
chartCPU.TabIndex = 14;
|
chartCPU.TabIndex = 14;
|
||||||
chartCPU.Text = "chartCPU";
|
chartCPU.Text = "chartCPU";
|
||||||
title6.Name = "Title1";
|
title2.Name = "Title1";
|
||||||
chartCPU.Titles.Add(title6);
|
chartCPU.Titles.Add(title2);
|
||||||
//
|
//
|
||||||
// chartXGM
|
// chartXGM
|
||||||
//
|
//
|
||||||
chartArea7.Name = "ChartAreaXGM";
|
chartArea3.Name = "ChartAreaXGM";
|
||||||
chartXGM.ChartAreas.Add(chartArea7);
|
chartXGM.ChartAreas.Add(chartArea3);
|
||||||
chartXGM.Dock = DockStyle.Fill;
|
chartXGM.Dock = DockStyle.Fill;
|
||||||
chartXGM.Location = new Point(12, 1459);
|
chartXGM.Location = new Point(12, 1459);
|
||||||
chartXGM.Margin = new Padding(2, 10, 2, 10);
|
chartXGM.Margin = new Padding(2, 10, 2, 10);
|
||||||
@@ -294,14 +297,14 @@ namespace GHelper
|
|||||||
chartXGM.Size = new Size(782, 463);
|
chartXGM.Size = new Size(782, 463);
|
||||||
chartXGM.TabIndex = 14;
|
chartXGM.TabIndex = 14;
|
||||||
chartXGM.Text = "chartXGM";
|
chartXGM.Text = "chartXGM";
|
||||||
title7.Name = "Title4";
|
title3.Name = "Title4";
|
||||||
chartXGM.Titles.Add(title7);
|
chartXGM.Titles.Add(title3);
|
||||||
chartXGM.Visible = false;
|
chartXGM.Visible = false;
|
||||||
//
|
//
|
||||||
// chartMid
|
// chartMid
|
||||||
//
|
//
|
||||||
chartArea8.Name = "ChartArea3";
|
chartArea4.Name = "ChartArea3";
|
||||||
chartMid.ChartAreas.Add(chartArea8);
|
chartMid.ChartAreas.Add(chartArea4);
|
||||||
chartMid.Dock = DockStyle.Fill;
|
chartMid.Dock = DockStyle.Fill;
|
||||||
chartMid.Location = new Point(12, 976);
|
chartMid.Location = new Point(12, 976);
|
||||||
chartMid.Margin = new Padding(2, 10, 2, 10);
|
chartMid.Margin = new Padding(2, 10, 2, 10);
|
||||||
@@ -309,8 +312,8 @@ namespace GHelper
|
|||||||
chartMid.Size = new Size(782, 463);
|
chartMid.Size = new Size(782, 463);
|
||||||
chartMid.TabIndex = 14;
|
chartMid.TabIndex = 14;
|
||||||
chartMid.Text = "chartMid";
|
chartMid.Text = "chartMid";
|
||||||
title8.Name = "Title3";
|
title4.Name = "Title3";
|
||||||
chartMid.Titles.Add(title8);
|
chartMid.Titles.Add(title4);
|
||||||
chartMid.Visible = false;
|
chartMid.Visible = false;
|
||||||
//
|
//
|
||||||
// panelTitleFans
|
// panelTitleFans
|
||||||
@@ -528,10 +531,11 @@ namespace GHelper
|
|||||||
panelAdvanced.Controls.Add(panelTitleAdvanced);
|
panelAdvanced.Controls.Add(panelTitleAdvanced);
|
||||||
panelAdvanced.Controls.Add(panelTemperature);
|
panelAdvanced.Controls.Add(panelTemperature);
|
||||||
panelAdvanced.Controls.Add(panelTitleTemp);
|
panelAdvanced.Controls.Add(panelTitleTemp);
|
||||||
|
panelAdvanced.Controls.Add(panelDownload);
|
||||||
panelAdvanced.Dock = DockStyle.Top;
|
panelAdvanced.Dock = DockStyle.Top;
|
||||||
panelAdvanced.Location = new Point(10, 1644);
|
panelAdvanced.Location = new Point(10, 1644);
|
||||||
panelAdvanced.Name = "panelAdvanced";
|
panelAdvanced.Name = "panelAdvanced";
|
||||||
panelAdvanced.Size = new Size(520, 888);
|
panelAdvanced.Size = new Size(520, 992);
|
||||||
panelAdvanced.TabIndex = 14;
|
panelAdvanced.TabIndex = 14;
|
||||||
panelAdvanced.Visible = false;
|
panelAdvanced.Visible = false;
|
||||||
//
|
//
|
||||||
@@ -540,7 +544,7 @@ namespace GHelper
|
|||||||
panelAdvancedAlways.AutoSize = true;
|
panelAdvancedAlways.AutoSize = true;
|
||||||
panelAdvancedAlways.Controls.Add(checkApplyUV);
|
panelAdvancedAlways.Controls.Add(checkApplyUV);
|
||||||
panelAdvancedAlways.Dock = DockStyle.Top;
|
panelAdvancedAlways.Dock = DockStyle.Top;
|
||||||
panelAdvancedAlways.Location = new Point(0, 827);
|
panelAdvancedAlways.Location = new Point(0, 931);
|
||||||
panelAdvancedAlways.Name = "panelAdvancedAlways";
|
panelAdvancedAlways.Name = "panelAdvancedAlways";
|
||||||
panelAdvancedAlways.Padding = new Padding(16, 0, 16, 15);
|
panelAdvancedAlways.Padding = new Padding(16, 0, 16, 15);
|
||||||
panelAdvancedAlways.Size = new Size(520, 61);
|
panelAdvancedAlways.Size = new Size(520, 61);
|
||||||
@@ -566,7 +570,7 @@ namespace GHelper
|
|||||||
panelAdvancedApply.AutoSize = true;
|
panelAdvancedApply.AutoSize = true;
|
||||||
panelAdvancedApply.Controls.Add(buttonApplyAdvanced);
|
panelAdvancedApply.Controls.Add(buttonApplyAdvanced);
|
||||||
panelAdvancedApply.Dock = DockStyle.Top;
|
panelAdvancedApply.Dock = DockStyle.Top;
|
||||||
panelAdvancedApply.Location = new Point(0, 747);
|
panelAdvancedApply.Location = new Point(0, 851);
|
||||||
panelAdvancedApply.Name = "panelAdvancedApply";
|
panelAdvancedApply.Name = "panelAdvancedApply";
|
||||||
panelAdvancedApply.Padding = new Padding(15);
|
panelAdvancedApply.Padding = new Padding(15);
|
||||||
panelAdvancedApply.Size = new Size(520, 80);
|
panelAdvancedApply.Size = new Size(520, 80);
|
||||||
@@ -595,7 +599,7 @@ namespace GHelper
|
|||||||
labelRisky.BackColor = Color.IndianRed;
|
labelRisky.BackColor = Color.IndianRed;
|
||||||
labelRisky.Dock = DockStyle.Top;
|
labelRisky.Dock = DockStyle.Top;
|
||||||
labelRisky.ForeColor = SystemColors.ControlLightLight;
|
labelRisky.ForeColor = SystemColors.ControlLightLight;
|
||||||
labelRisky.Location = new Point(0, 504);
|
labelRisky.Location = new Point(0, 608);
|
||||||
labelRisky.Margin = new Padding(0);
|
labelRisky.Margin = new Padding(0);
|
||||||
labelRisky.Name = "labelRisky";
|
labelRisky.Name = "labelRisky";
|
||||||
labelRisky.Padding = new Padding(10, 10, 10, 5);
|
labelRisky.Padding = new Padding(10, 10, 10, 5);
|
||||||
@@ -611,7 +615,7 @@ namespace GHelper
|
|||||||
panelUViGPU.Controls.Add(labelLeftUViGPU);
|
panelUViGPU.Controls.Add(labelLeftUViGPU);
|
||||||
panelUViGPU.Controls.Add(trackUViGPU);
|
panelUViGPU.Controls.Add(trackUViGPU);
|
||||||
panelUViGPU.Dock = DockStyle.Top;
|
panelUViGPU.Dock = DockStyle.Top;
|
||||||
panelUViGPU.Location = new Point(0, 380);
|
panelUViGPU.Location = new Point(0, 484);
|
||||||
panelUViGPU.Margin = new Padding(4);
|
panelUViGPU.Margin = new Padding(4);
|
||||||
panelUViGPU.MaximumSize = new Size(0, 124);
|
panelUViGPU.MaximumSize = new Size(0, 124);
|
||||||
panelUViGPU.Name = "panelUViGPU";
|
panelUViGPU.Name = "panelUViGPU";
|
||||||
@@ -659,7 +663,7 @@ namespace GHelper
|
|||||||
panelUV.Controls.Add(labelLeftUV);
|
panelUV.Controls.Add(labelLeftUV);
|
||||||
panelUV.Controls.Add(trackUV);
|
panelUV.Controls.Add(trackUV);
|
||||||
panelUV.Dock = DockStyle.Top;
|
panelUV.Dock = DockStyle.Top;
|
||||||
panelUV.Location = new Point(0, 256);
|
panelUV.Location = new Point(0, 360);
|
||||||
panelUV.Margin = new Padding(4);
|
panelUV.Margin = new Padding(4);
|
||||||
panelUV.MaximumSize = new Size(0, 124);
|
panelUV.MaximumSize = new Size(0, 124);
|
||||||
panelUV.Name = "panelUV";
|
panelUV.Name = "panelUV";
|
||||||
@@ -704,7 +708,7 @@ namespace GHelper
|
|||||||
panelTitleAdvanced.Controls.Add(pictureUV);
|
panelTitleAdvanced.Controls.Add(pictureUV);
|
||||||
panelTitleAdvanced.Controls.Add(labelTitleUV);
|
panelTitleAdvanced.Controls.Add(labelTitleUV);
|
||||||
panelTitleAdvanced.Dock = DockStyle.Top;
|
panelTitleAdvanced.Dock = DockStyle.Top;
|
||||||
panelTitleAdvanced.Location = new Point(0, 190);
|
panelTitleAdvanced.Location = new Point(0, 294);
|
||||||
panelTitleAdvanced.Name = "panelTitleAdvanced";
|
panelTitleAdvanced.Name = "panelTitleAdvanced";
|
||||||
panelTitleAdvanced.Size = new Size(520, 66);
|
panelTitleAdvanced.Size = new Size(520, 66);
|
||||||
panelTitleAdvanced.TabIndex = 48;
|
panelTitleAdvanced.TabIndex = 48;
|
||||||
@@ -740,7 +744,7 @@ namespace GHelper
|
|||||||
panelTemperature.Controls.Add(labelLeftTemp);
|
panelTemperature.Controls.Add(labelLeftTemp);
|
||||||
panelTemperature.Controls.Add(trackTemp);
|
panelTemperature.Controls.Add(trackTemp);
|
||||||
panelTemperature.Dock = DockStyle.Top;
|
panelTemperature.Dock = DockStyle.Top;
|
||||||
panelTemperature.Location = new Point(0, 66);
|
panelTemperature.Location = new Point(0, 170);
|
||||||
panelTemperature.Margin = new Padding(4);
|
panelTemperature.Margin = new Padding(4);
|
||||||
panelTemperature.MaximumSize = new Size(0, 124);
|
panelTemperature.MaximumSize = new Size(0, 124);
|
||||||
panelTemperature.Name = "panelTemperature";
|
panelTemperature.Name = "panelTemperature";
|
||||||
@@ -785,7 +789,7 @@ namespace GHelper
|
|||||||
panelTitleTemp.Controls.Add(pictureTemp);
|
panelTitleTemp.Controls.Add(pictureTemp);
|
||||||
panelTitleTemp.Controls.Add(labelTempLimit);
|
panelTitleTemp.Controls.Add(labelTempLimit);
|
||||||
panelTitleTemp.Dock = DockStyle.Top;
|
panelTitleTemp.Dock = DockStyle.Top;
|
||||||
panelTitleTemp.Location = new Point(0, 0);
|
panelTitleTemp.Location = new Point(0, 104);
|
||||||
panelTitleTemp.Name = "panelTitleTemp";
|
panelTitleTemp.Name = "panelTitleTemp";
|
||||||
panelTitleTemp.Size = new Size(520, 66);
|
panelTitleTemp.Size = new Size(520, 66);
|
||||||
panelTitleTemp.TabIndex = 50;
|
panelTitleTemp.TabIndex = 50;
|
||||||
@@ -813,6 +817,38 @@ namespace GHelper
|
|||||||
labelTempLimit.TabIndex = 47;
|
labelTempLimit.TabIndex = 47;
|
||||||
labelTempLimit.Text = "Temp Limit";
|
labelTempLimit.Text = "Temp Limit";
|
||||||
//
|
//
|
||||||
|
// panelDownload
|
||||||
|
//
|
||||||
|
panelDownload.AutoSize = true;
|
||||||
|
panelDownload.Controls.Add(buttonDownload);
|
||||||
|
panelDownload.Dock = DockStyle.Top;
|
||||||
|
panelDownload.Location = new Point(0, 0);
|
||||||
|
panelDownload.Name = "panelDownload";
|
||||||
|
panelDownload.Padding = new Padding(20);
|
||||||
|
panelDownload.Size = new Size(520, 104);
|
||||||
|
panelDownload.TabIndex = 52;
|
||||||
|
panelDownload.Visible = false;
|
||||||
|
//
|
||||||
|
// buttonDownload
|
||||||
|
//
|
||||||
|
buttonDownload.Activated = false;
|
||||||
|
buttonDownload.AutoSize = true;
|
||||||
|
buttonDownload.AutoSizeMode = AutoSizeMode.GrowAndShrink;
|
||||||
|
buttonDownload.BackColor = SystemColors.ControlLight;
|
||||||
|
buttonDownload.BorderColor = Color.Transparent;
|
||||||
|
buttonDownload.BorderRadius = 2;
|
||||||
|
buttonDownload.Dock = DockStyle.Top;
|
||||||
|
buttonDownload.FlatStyle = FlatStyle.Flat;
|
||||||
|
buttonDownload.Location = new Point(20, 20);
|
||||||
|
buttonDownload.Margin = new Padding(20);
|
||||||
|
buttonDownload.Name = "buttonDownload";
|
||||||
|
buttonDownload.Padding = new Padding(10);
|
||||||
|
buttonDownload.Secondary = true;
|
||||||
|
buttonDownload.Size = new Size(480, 64);
|
||||||
|
buttonDownload.TabIndex = 19;
|
||||||
|
buttonDownload.Text = "Download Advanced Settings Plugin";
|
||||||
|
buttonDownload.UseVisualStyleBackColor = false;
|
||||||
|
//
|
||||||
// panelPower
|
// panelPower
|
||||||
//
|
//
|
||||||
panelPower.AutoSize = true;
|
panelPower.AutoSize = true;
|
||||||
@@ -1634,6 +1670,8 @@ namespace GHelper
|
|||||||
panelTitleTemp.ResumeLayout(false);
|
panelTitleTemp.ResumeLayout(false);
|
||||||
panelTitleTemp.PerformLayout();
|
panelTitleTemp.PerformLayout();
|
||||||
((System.ComponentModel.ISupportInitialize)pictureTemp).EndInit();
|
((System.ComponentModel.ISupportInitialize)pictureTemp).EndInit();
|
||||||
|
panelDownload.ResumeLayout(false);
|
||||||
|
panelDownload.PerformLayout();
|
||||||
panelPower.ResumeLayout(false);
|
panelPower.ResumeLayout(false);
|
||||||
panelPower.PerformLayout();
|
panelPower.PerformLayout();
|
||||||
panelApplyPower.ResumeLayout(false);
|
panelApplyPower.ResumeLayout(false);
|
||||||
@@ -1793,5 +1831,7 @@ namespace GHelper
|
|||||||
private Label labelSlow;
|
private Label labelSlow;
|
||||||
private Label labelLeftSlow;
|
private Label labelLeftSlow;
|
||||||
private TrackBar trackSlow;
|
private TrackBar trackSlow;
|
||||||
|
private Panel panelDownload;
|
||||||
|
private RButton buttonDownload;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
34
app/Fans.cs
34
app/Fans.cs
@@ -213,6 +213,8 @@ namespace GHelper
|
|||||||
|
|
||||||
buttonCalibrate.Click += ButtonCalibrate_Click;
|
buttonCalibrate.Click += ButtonCalibrate_Click;
|
||||||
|
|
||||||
|
buttonDownload.Click += ButtonDownload_Click;
|
||||||
|
|
||||||
ToggleNavigation(0);
|
ToggleNavigation(0);
|
||||||
|
|
||||||
if (Program.acpi.DeviceGet(AsusACPI.DevsCPUFanCurve) < 0) buttonCalibrate.Visible = false;
|
if (Program.acpi.DeviceGet(AsusACPI.DevsCPUFanCurve) < 0) buttonCalibrate.Visible = false;
|
||||||
@@ -221,7 +223,21 @@ namespace GHelper
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void ButtonDownload_Click(object? sender, EventArgs e)
|
||||||
|
{
|
||||||
|
RyzenControl.DownloadRing();
|
||||||
|
|
||||||
|
panelAdvancedAlways.Visible = true;
|
||||||
|
panelAdvancedApply.Visible = true;
|
||||||
|
labelRisky.Visible = true;
|
||||||
|
panelUViGPU.Visible = true;
|
||||||
|
panelUV.Visible = true;
|
||||||
|
panelTitleAdvanced.Visible = true;
|
||||||
|
panelTemperature.Visible = true;
|
||||||
|
panelTitleTemp.Visible = true;
|
||||||
|
|
||||||
|
VisualiseAdvanced();
|
||||||
|
}
|
||||||
|
|
||||||
private void ButtonCalibrate_Click(object? sender, EventArgs e)
|
private void ButtonCalibrate_Click(object? sender, EventArgs e)
|
||||||
{
|
{
|
||||||
@@ -365,6 +381,24 @@ namespace GHelper
|
|||||||
|
|
||||||
private void VisualiseAdvanced()
|
private void VisualiseAdvanced()
|
||||||
{
|
{
|
||||||
|
|
||||||
|
if (!RyzenControl.IsRingExsists())
|
||||||
|
{
|
||||||
|
panelTitleAdvanced.Visible = false;
|
||||||
|
labelRisky.Visible = false;
|
||||||
|
panelUV.Visible = false;
|
||||||
|
panelUViGPU.Visible = false;
|
||||||
|
panelTitleTemp.Visible = false;
|
||||||
|
panelTemperature.Visible = false;
|
||||||
|
panelAdvancedAlways.Visible = false;
|
||||||
|
panelAdvancedApply.Visible = false;
|
||||||
|
panelDownload.Visible = true;
|
||||||
|
|
||||||
|
} else
|
||||||
|
{
|
||||||
|
panelDownload.Visible = false;
|
||||||
|
}
|
||||||
|
|
||||||
if (!RyzenControl.IsSupportedUV())
|
if (!RyzenControl.IsSupportedUV())
|
||||||
{
|
{
|
||||||
panelTitleAdvanced.Visible = false;
|
panelTitleAdvanced.Visible = false;
|
||||||
|
|||||||
@@ -15,7 +15,7 @@
|
|||||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||||
<ProduceReferenceAssembly>False</ProduceReferenceAssembly>
|
<ProduceReferenceAssembly>False</ProduceReferenceAssembly>
|
||||||
<AllowUnsafeBlocks>True</AllowUnsafeBlocks>
|
<AllowUnsafeBlocks>True</AllowUnsafeBlocks>
|
||||||
<AssemblyVersion>0.149</AssemblyVersion>
|
<AssemblyVersion>0.150</AssemblyVersion>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
|
||||||
|
|||||||
@@ -4,7 +4,9 @@
|
|||||||
//
|
//
|
||||||
|
|
||||||
|
|
||||||
|
using GHelper.Helpers;
|
||||||
using System.Management;
|
using System.Management;
|
||||||
|
using System.Net;
|
||||||
|
|
||||||
namespace Ryzen
|
namespace Ryzen
|
||||||
{
|
{
|
||||||
@@ -52,7 +54,8 @@ namespace Ryzen
|
|||||||
CPUName = obj["Name"].ToString();
|
CPUName = obj["Name"].ToString();
|
||||||
CPUModel = obj["Caption"].ToString();
|
CPUModel = obj["Caption"].ToString();
|
||||||
}
|
}
|
||||||
} catch (Exception ex)
|
}
|
||||||
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
Logger.WriteLine(ex.Message);
|
Logger.WriteLine(ex.Message);
|
||||||
}
|
}
|
||||||
@@ -142,6 +145,52 @@ namespace Ryzen
|
|||||||
return CPUName.Contains("6900H") || CPUName.Contains("7945H") || CPUName.Contains("7845H");
|
return CPUName.Contains("6900H") || CPUName.Contains("7945H") || CPUName.Contains("7845H");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static bool IsRingExsists()
|
||||||
|
{
|
||||||
|
string exeDir = Path.GetDirectoryName(Application.ExecutablePath);
|
||||||
|
return File.Exists(exeDir + "\\" + "WinRing0x64.dll");
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void DownloadRing()
|
||||||
|
{
|
||||||
|
string requestUri = "https://github.com/seerge/g-helper/releases/latest/download/PluginAdvancedSettings.zip";
|
||||||
|
|
||||||
|
Uri uri = new Uri(requestUri);
|
||||||
|
|
||||||
|
string exeDir = Path.GetDirectoryName(Application.ExecutablePath);
|
||||||
|
string zipName = Path.GetFileName(uri.LocalPath);
|
||||||
|
string zipLocation = exeDir + "\\" + zipName;
|
||||||
|
|
||||||
|
using (WebClient client = new WebClient())
|
||||||
|
{
|
||||||
|
Logger.WriteLine(requestUri);
|
||||||
|
Logger.WriteLine(exeDir);
|
||||||
|
Logger.WriteLine(zipName);
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
client.DownloadFile(uri, zipLocation);
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
Logger.WriteLine(ex.Message);
|
||||||
|
Logger.WriteLine(ex.ToString());
|
||||||
|
if (!ProcessHelper.IsUserAdministrator()) ProcessHelper.RunAsAdmin("uv");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
System.IO.Compression.ZipFile.ExtractToDirectory(zipLocation, exeDir, overwriteFiles: true);
|
||||||
|
File.Delete(zipLocation);
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
Logger.WriteLine(ex.ToString());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public static void SetAddresses()
|
public static void SetAddresses()
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user