Minor tweaks

This commit is contained in:
Serge
2024-02-21 17:29:52 +01:00
parent c82bc874cf
commit 4196ccf33f
2 changed files with 11 additions and 5 deletions

View File

@@ -91,6 +91,8 @@ public static class AppConfig
if (_model is null)
{
_model = "";
try
{
using (var searcher = new ManagementObjectSearcher(@"Select * from Win32_ComputerSystem"))
{
foreach (var process in searcher.Get())
@@ -99,6 +101,10 @@ public static class AppConfig
break;
}
}
} catch (Exception ex)
{
Logger.WriteLine(ex.Message);
}
}
//if (_model.Contains("GA402RK")) _model = "ROG Zephyrus G14 GA403UI"; // Debug Purposes

View File

@@ -218,7 +218,7 @@ namespace GHelper
sliderBattery.ValueChanged += SliderBattery_ValueChanged;
Program.trayIcon.MouseMove += TrayIcon_MouseMove;
sensorTimer = new System.Timers.Timer(1000);
sensorTimer = new System.Timers.Timer(AppConfig.Get("sensor_timer",1000));
sensorTimer.Elapsed += OnTimedEvent;
sensorTimer.Enabled = true;