Removed unsupported RGB flags for G614J https://github.com/seerge/g-helper/issues/1428

This commit is contained in:
Serge
2023-10-06 10:42:23 +02:00
parent 460f921836
commit 433022b65d
2 changed files with 20 additions and 18 deletions

View File

@@ -9,6 +9,7 @@ public static class AppConfig
private static string configFile; private static string configFile;
private static string? _model; private static string? _model;
private static string? _modelShort;
private static string? _bios; private static string? _bios;
private static Dictionary<string, object> config = new Dictionary<string, object>(); private static Dictionary<string, object> config = new Dictionary<string, object>();
@@ -73,7 +74,7 @@ public static class AppConfig
public static (string, string) GetBiosAndModel() public static (string, string) GetBiosAndModel()
{ {
if (_bios is not null && _model is not null) return (_bios, _model); if (_bios is not null && _modelShort is not null) return (_bios, _modelShort);
using (ManagementObjectSearcher objSearcher = new ManagementObjectSearcher(@"SELECT * FROM Win32_BIOS")) using (ManagementObjectSearcher objSearcher = new ManagementObjectSearcher(@"SELECT * FROM Win32_BIOS"))
{ {
@@ -85,16 +86,16 @@ public static class AppConfig
string[] results = obj["SMBIOSBIOSVersion"].ToString().Split("."); string[] results = obj["SMBIOSBIOSVersion"].ToString().Split(".");
if (results.Length > 1) if (results.Length > 1)
{ {
_model = results[0]; _modelShort = results[0];
_bios = results[1]; _bios = results[1];
} }
else else
{ {
_model = obj["SMBIOSBIOSVersion"].ToString(); _modelShort = obj["SMBIOSBIOSVersion"].ToString();
} }
} }
return (_bios, _model); return (_bios, _modelShort);
} }
} }
} }

View File

@@ -276,22 +276,23 @@ namespace GHelper
checkSleepBar.Visible = false; checkSleepBar.Visible = false;
checkShutdownBar.Visible = false; checkShutdownBar.Visible = false;
if (!AppConfig.IsZ13()) }
{
labelBacklightLid.Visible = false;
checkAwakeLid.Visible = false;
checkBootLid.Visible = false;
checkSleepLid.Visible = false;
checkShutdownLid.Visible = false;
labelBacklightLogo.Visible = false; if ((!AppConfig.IsStrix() && !AppConfig.IsZ13()) || AppConfig.IsStrixLimitedRGB())
checkAwakeLogo.Visible = false; {
checkBootLogo.Visible = false; labelBacklightLid.Visible = false;
checkSleepLogo.Visible = false; checkAwakeLid.Visible = false;
checkShutdownLogo.Visible = false; checkBootLid.Visible = false;
checkSleepLid.Visible = false;
checkShutdownLid.Visible = false;
labelBacklightKeyboard.Visible = false; labelBacklightLogo.Visible = false;
} checkAwakeLogo.Visible = false;
checkBootLogo.Visible = false;
checkSleepLogo.Visible = false;
checkShutdownLogo.Visible = false;
labelBacklightKeyboard.Visible = false;
} }
//checkAutoToggleClamshellMode.Visible = clamshellControl.IsExternalDisplayConnected(); //checkAutoToggleClamshellMode.Visible = clamshellControl.IsExternalDisplayConnected();