protected virtual string ReadKeyFromRegistry()
{
// Open the version specific key we need
string versionPath = _licensePath + _licenseVersion.ToString();
RegistryKey versionKey = Registry.CurrentUser.OpenSubKey(versionPath, false);
if (versionKey != null)
{
// Seach for each of the product codes we allow
foreach (string code in _licenseProducts)
{
object ret = versionKey.GetValue(code, null);
if ((ret != null) && (ret is string))
return (string)ret;
}
}
return null;
}