Code formatting (indents etc.) to get it consistent, simplify it for contributors.

This commit is contained in:
Robin Krom 2021-03-28 19:24:26 +02:00
parent 726644de99
commit e8c0b307ee
No known key found for this signature in database
GPG key ID: BCC01364F1371490
435 changed files with 46647 additions and 39014 deletions

View file

@ -50,22 +50,26 @@ namespace GreenshotPlugin.Core
if (key != null)
{
result = (string)key.GetValue(value);
result = (string) key.GetValue(value);
}
if (string.IsNullOrEmpty(result))
{
result = defaultValue;
}
return result;
}
using var registryKey64 = RegistryKey.OpenBaseKey(registryHive, RegistryView.Registry64);
// Logic for 64 bit Windows, is trying the key which is 64 bit
using (var key = registryKey64.OpenSubKey($@"SOFTWARE\{keyName}", false))
{
if (key != null)
{
result = (string)key.GetValue(value);
result = (string) key.GetValue(value);
}
if (!string.IsNullOrEmpty(result)) return result;
}
@ -74,7 +78,7 @@ namespace GreenshotPlugin.Core
{
if (key != null)
{
result = (string)key.GetValue(value);
result = (string) key.GetValue(value);
}
}
@ -82,6 +86,7 @@ namespace GreenshotPlugin.Core
{
result = defaultValue;
}
return result;
}
}