mirror of
https://github.com/jkocon/g-helper.git
synced 2026-02-23 13:00:52 +01:00
Updates comparison improvements https://github.com/seerge/g-helper/issues/2283
This commit is contained in:
@@ -102,6 +102,8 @@ namespace GHelper
|
||||
LoadUpdates(true);
|
||||
}
|
||||
|
||||
|
||||
|
||||
private Dictionary<string, string> GetDeviceVersions()
|
||||
{
|
||||
using (ManagementObjectSearcher objSearcher = new ManagementObjectSearcher("Select * from Win32_PnPSignedDriver"))
|
||||
@@ -186,7 +188,8 @@ namespace GHelper
|
||||
{
|
||||
_VisualiseNewDriver(position, newer, table);
|
||||
});
|
||||
} else
|
||||
}
|
||||
else
|
||||
{
|
||||
_VisualiseNewDriver(position, newer, table);
|
||||
}
|
||||
@@ -206,6 +209,17 @@ namespace GHelper
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
static string CleanupDeviceId(string input)
|
||||
{
|
||||
int index = input.IndexOf("&REV_");
|
||||
if (index != -1)
|
||||
{
|
||||
return input.Substring(0, index);
|
||||
}
|
||||
return input;
|
||||
}
|
||||
|
||||
public async void DriversAsync(string url, int type, TableLayoutPanel table)
|
||||
{
|
||||
|
||||
@@ -275,6 +289,7 @@ namespace GHelper
|
||||
for (int k = 0; k < driver.hardwares.GetArrayLength(); k++)
|
||||
{
|
||||
var deviceID = driver.hardwares[k].GetProperty("hardwareid").ToString();
|
||||
deviceID = CleanupDeviceId(deviceID);
|
||||
var localVersions = devices.Where(p => p.Key.Contains(deviceID, StringComparison.CurrentCultureIgnoreCase)).Select(p => p.Value);
|
||||
foreach (var localVersion in localVersions)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user