mirror of
https://github.com/jkocon/g-helper.git
synced 2026-02-23 13:00:52 +01:00
Debug button
This commit is contained in:
@@ -665,22 +665,32 @@ public class AsusACPI
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void ScanRange()
|
public string ScanRange()
|
||||||
{
|
{
|
||||||
int value;
|
int value;
|
||||||
string appPath = Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) + "\\GHelper";
|
string appPath = Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) + "\\GHelper";
|
||||||
string logFile = appPath + "\\scan.txt";
|
string logFile = appPath + "\\scan.txt";
|
||||||
for (uint i = 0x00000000; i <= 0x00160000; i++)
|
using (StreamWriter w = File.AppendText(logFile))
|
||||||
{
|
{
|
||||||
value = DeviceGet(i);
|
w.WriteLine($"Scan started {DateTime.Now}");
|
||||||
if (value >= 0)
|
for (uint i = 0x00000000; i <= 0x00160000; i += 0x10000)
|
||||||
using (StreamWriter w = File.AppendText(logFile))
|
{
|
||||||
|
for (uint j = 0x00; j <= 0xFF; j++)
|
||||||
{
|
{
|
||||||
w.WriteLine(i.ToString("X8") + ": " + value.ToString("X4") + " (" + value + ")");
|
uint id = i + j;
|
||||||
w.Close();
|
value = DeviceGet(id);
|
||||||
|
if (value >= 0)
|
||||||
|
{
|
||||||
|
w.WriteLine(id.ToString("X8") + ": " + value.ToString("X4") + " (" + value + ")");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
w.WriteLine($"---------------------");
|
||||||
|
w.Close();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return logFile;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void TUFKeyboardBrightness(int brightness)
|
public void TUFKeyboardBrightness(int brightness)
|
||||||
|
|||||||
19
app/Extra.Designer.cs
generated
19
app/Extra.Designer.cs
generated
@@ -120,6 +120,7 @@ namespace GHelper
|
|||||||
comboAPU = new RComboBox();
|
comboAPU = new RComboBox();
|
||||||
pictureAPUMem = new PictureBox();
|
pictureAPUMem = new PictureBox();
|
||||||
labelAPUMem = new Label();
|
labelAPUMem = new Label();
|
||||||
|
pictureScan = new PictureBox();
|
||||||
panelServices.SuspendLayout();
|
panelServices.SuspendLayout();
|
||||||
((System.ComponentModel.ISupportInitialize)pictureService).BeginInit();
|
((System.ComponentModel.ISupportInitialize)pictureService).BeginInit();
|
||||||
panelBindingsHeader.SuspendLayout();
|
panelBindingsHeader.SuspendLayout();
|
||||||
@@ -144,6 +145,7 @@ namespace GHelper
|
|||||||
((System.ComponentModel.ISupportInitialize)pictureHibernate).BeginInit();
|
((System.ComponentModel.ISupportInitialize)pictureHibernate).BeginInit();
|
||||||
panelAPU.SuspendLayout();
|
panelAPU.SuspendLayout();
|
||||||
((System.ComponentModel.ISupportInitialize)pictureAPUMem).BeginInit();
|
((System.ComponentModel.ISupportInitialize)pictureAPUMem).BeginInit();
|
||||||
|
((System.ComponentModel.ISupportInitialize)pictureScan).BeginInit();
|
||||||
SuspendLayout();
|
SuspendLayout();
|
||||||
//
|
//
|
||||||
// panelServices
|
// panelServices
|
||||||
@@ -1003,6 +1005,7 @@ namespace GHelper
|
|||||||
//
|
//
|
||||||
panelSettingsHeader.AutoSize = true;
|
panelSettingsHeader.AutoSize = true;
|
||||||
panelSettingsHeader.BackColor = SystemColors.ControlLight;
|
panelSettingsHeader.BackColor = SystemColors.ControlLight;
|
||||||
|
panelSettingsHeader.Controls.Add(pictureScan);
|
||||||
panelSettingsHeader.Controls.Add(pictureLog);
|
panelSettingsHeader.Controls.Add(pictureLog);
|
||||||
panelSettingsHeader.Controls.Add(pictureSettings);
|
panelSettingsHeader.Controls.Add(pictureSettings);
|
||||||
panelSettingsHeader.Controls.Add(labelSettings);
|
panelSettingsHeader.Controls.Add(labelSettings);
|
||||||
@@ -1263,6 +1266,20 @@ namespace GHelper
|
|||||||
labelAPUMem.TabIndex = 0;
|
labelAPUMem.TabIndex = 0;
|
||||||
labelAPUMem.Text = "Memory Assigned to GPU";
|
labelAPUMem.Text = "Memory Assigned to GPU";
|
||||||
//
|
//
|
||||||
|
// pictureScan
|
||||||
|
//
|
||||||
|
pictureScan.Anchor = AnchorStyles.Top | AnchorStyles.Right;
|
||||||
|
pictureScan.BackgroundImage = Resources.icons8_heartbeat_32;
|
||||||
|
pictureScan.BackgroundImageLayout = ImageLayout.Zoom;
|
||||||
|
pictureScan.Cursor = Cursors.Hand;
|
||||||
|
pictureScan.Location = new Point(891, 11);
|
||||||
|
pictureScan.Margin = new Padding(4, 3, 4, 3);
|
||||||
|
pictureScan.Name = "pictureScan";
|
||||||
|
pictureScan.Size = new Size(32, 32);
|
||||||
|
pictureScan.TabIndex = 13;
|
||||||
|
pictureScan.TabStop = false;
|
||||||
|
pictureScan.Visible = false;
|
||||||
|
//
|
||||||
// Extra
|
// Extra
|
||||||
//
|
//
|
||||||
AutoScaleDimensions = new SizeF(192F, 192F);
|
AutoScaleDimensions = new SizeF(192F, 192F);
|
||||||
@@ -1326,6 +1343,7 @@ namespace GHelper
|
|||||||
panelAPU.ResumeLayout(false);
|
panelAPU.ResumeLayout(false);
|
||||||
panelAPU.PerformLayout();
|
panelAPU.PerformLayout();
|
||||||
((System.ComponentModel.ISupportInitialize)pictureAPUMem).EndInit();
|
((System.ComponentModel.ISupportInitialize)pictureAPUMem).EndInit();
|
||||||
|
((System.ComponentModel.ISupportInitialize)pictureScan).EndInit();
|
||||||
ResumeLayout(false);
|
ResumeLayout(false);
|
||||||
PerformLayout();
|
PerformLayout();
|
||||||
}
|
}
|
||||||
@@ -1420,5 +1438,6 @@ namespace GHelper
|
|||||||
private PictureBox pictureAPUMem;
|
private PictureBox pictureAPUMem;
|
||||||
private Label labelAPUMem;
|
private Label labelAPUMem;
|
||||||
private RComboBox comboAPU;
|
private RComboBox comboAPU;
|
||||||
|
private PictureBox pictureScan;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
13
app/Extra.cs
13
app/Extra.cs
@@ -386,6 +386,7 @@ namespace GHelper
|
|||||||
buttonServices.Click += ButtonServices_Click;
|
buttonServices.Click += ButtonServices_Click;
|
||||||
|
|
||||||
pictureLog.Click += PictureLog_Click;
|
pictureLog.Click += PictureLog_Click;
|
||||||
|
pictureScan.Click += PictureScan_Click;
|
||||||
|
|
||||||
checkGPUFix.Visible = Program.acpi.IsNVidiaGPU();
|
checkGPUFix.Visible = Program.acpi.IsNVidiaGPU();
|
||||||
checkGPUFix.Checked = AppConfig.IsGPUFix();
|
checkGPUFix.Checked = AppConfig.IsGPUFix();
|
||||||
@@ -398,6 +399,18 @@ namespace GHelper
|
|||||||
InitHibernate();
|
InitHibernate();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void PictureScan_Click(object? sender, EventArgs e)
|
||||||
|
{
|
||||||
|
string logFile = Program.acpi.ScanRange();
|
||||||
|
new Process
|
||||||
|
{
|
||||||
|
StartInfo = new ProcessStartInfo(logFile)
|
||||||
|
{
|
||||||
|
UseShellExecute = true
|
||||||
|
}
|
||||||
|
}.Start();
|
||||||
|
}
|
||||||
|
|
||||||
private void ComboAPU_SelectedIndexChanged(object? sender, EventArgs e)
|
private void ComboAPU_SelectedIndexChanged(object? sender, EventArgs e)
|
||||||
{
|
{
|
||||||
int mem = comboAPU.SelectedIndex;
|
int mem = comboAPU.SelectedIndex;
|
||||||
|
|||||||
Reference in New Issue
Block a user