mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-04 18:26:39 +02:00
more fixes for getting styleCop up, this will need one more push to get another 15 that will require renaming of vars (#5875)
This commit is contained in:
@@ -121,16 +121,22 @@ namespace Wox.Infrastructure.Exception
|
||||
if (versionKeyName.StartsWith("v"))
|
||||
{
|
||||
RegistryKey versionKey = ndpKey.OpenSubKey(versionKeyName);
|
||||
string name = (string)versionKey.GetValue("Version", "");
|
||||
string sp = versionKey.GetValue("SP", "").ToString();
|
||||
string install = versionKey.GetValue("Install", "").ToString();
|
||||
if (install != "")
|
||||
if (sp != "" && install == "1")
|
||||
string name = (string)versionKey.GetValue("Version", string.Empty);
|
||||
string sp = versionKey.GetValue("SP", string.Empty).ToString();
|
||||
string install = versionKey.GetValue("Install", string.Empty).ToString();
|
||||
if (install != string.Empty)
|
||||
{
|
||||
if (sp != string.Empty && install == "1")
|
||||
{
|
||||
result.Add(string.Format("{0} {1} SP{2}", versionKeyName, name, sp));
|
||||
}
|
||||
else
|
||||
{
|
||||
result.Add(string.Format("{0} {1}", versionKeyName, name));
|
||||
}
|
||||
}
|
||||
|
||||
if (name != "")
|
||||
if (name != string.Empty)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
@@ -138,16 +144,23 @@ namespace Wox.Infrastructure.Exception
|
||||
foreach (string subKeyName in versionKey.GetSubKeyNames())
|
||||
{
|
||||
RegistryKey subKey = versionKey.OpenSubKey(subKeyName);
|
||||
name = (string)subKey.GetValue("Version", "");
|
||||
if (name != "")
|
||||
sp = subKey.GetValue("SP", "").ToString();
|
||||
install = subKey.GetValue("Install", "").ToString();
|
||||
if (install != "")
|
||||
name = (string)subKey.GetValue("Version", string.Empty);
|
||||
if (name != string.Empty)
|
||||
{
|
||||
if (sp != "" && install == "1")
|
||||
sp = subKey.GetValue("SP", string.Empty).ToString();
|
||||
}
|
||||
|
||||
install = subKey.GetValue("Install", string.Empty).ToString();
|
||||
if (install != string.Empty)
|
||||
{
|
||||
if (sp != string.Empty && install == "1")
|
||||
{
|
||||
result.Add(string.Format("{0} {1} {2} SP{3}", versionKeyName, subKeyName, name, sp));
|
||||
}
|
||||
else if (install == "1")
|
||||
{
|
||||
result.Add(string.Format("{0} {1} {2}", versionKeyName, subKeyName, name));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -159,13 +172,19 @@ namespace Wox.Infrastructure.Exception
|
||||
int releaseKey = (int)ndpKey.GetValue("Release");
|
||||
{
|
||||
if (releaseKey == 378389)
|
||||
{
|
||||
result.Add("v4.5");
|
||||
}
|
||||
|
||||
if (releaseKey == 378675)
|
||||
{
|
||||
result.Add("v4.5.1 installed with Windows 8.1");
|
||||
}
|
||||
|
||||
if (releaseKey == 378758)
|
||||
{
|
||||
result.Add("4.5.1 installed on Windows 8, Windows 7 SP1, or Windows Vista SP2");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user