mirror of
https://github.com/QL-Win/QuickLook.git
synced 2025-09-15 04:39:07 +00:00
Convert to .NET SDK type csproj
This commit is contained in:
@@ -3,37 +3,36 @@ using QuickLook.Common.ExtensionMethods;
|
||||
using QuickLook.Plugin.VideoViewer.Properties;
|
||||
using RegFileParser;
|
||||
|
||||
namespace QuickLook.Plugin.VideoViewer
|
||||
namespace QuickLook.Plugin.VideoViewer;
|
||||
|
||||
internal static class QLVRegistry
|
||||
{
|
||||
internal static class QLVRegistry
|
||||
internal static void Register()
|
||||
{
|
||||
internal static void Register()
|
||||
{
|
||||
var obj = new RegFileObject(Resource.QLV);
|
||||
var obj = new RegFileObject(Resource.QLV);
|
||||
|
||||
obj.RegValues.ForEach(k => k.Value.ForEach(k2 => ImportKey(k2.Value)));
|
||||
}
|
||||
|
||||
private static void ImportKey(RegValueObject key)
|
||||
{
|
||||
var kind = RegistryValueKind.Unknown;
|
||||
|
||||
if (key.Type == "REG_NONE")
|
||||
kind = RegistryValueKind.None;
|
||||
else if (key.Type == "REG_SZ")
|
||||
kind = RegistryValueKind.String;
|
||||
else if (key.Type == "EXPAND_SZ")
|
||||
kind = RegistryValueKind.ExpandString;
|
||||
else if (key.Type == "REG_BINARY")
|
||||
kind = RegistryValueKind.Binary;
|
||||
else if (key.Type == "REG_DWORD")
|
||||
kind = RegistryValueKind.DWord;
|
||||
else if (key.Type == "REG_MULTI_SZ")
|
||||
kind = RegistryValueKind.MultiString;
|
||||
else if (key.Type == "REG_QWORD")
|
||||
kind = RegistryValueKind.QWord;
|
||||
|
||||
Registry.SetValue(key.ParentKey, key.Entry, key.Value, kind);
|
||||
}
|
||||
obj.RegValues.ForEach(k => k.Value.ForEach(k2 => ImportKey(k2.Value)));
|
||||
}
|
||||
}
|
||||
|
||||
private static void ImportKey(RegValueObject key)
|
||||
{
|
||||
var kind = RegistryValueKind.Unknown;
|
||||
|
||||
if (key.Type == "REG_NONE")
|
||||
kind = RegistryValueKind.None;
|
||||
else if (key.Type == "REG_SZ")
|
||||
kind = RegistryValueKind.String;
|
||||
else if (key.Type == "EXPAND_SZ")
|
||||
kind = RegistryValueKind.ExpandString;
|
||||
else if (key.Type == "REG_BINARY")
|
||||
kind = RegistryValueKind.Binary;
|
||||
else if (key.Type == "REG_DWORD")
|
||||
kind = RegistryValueKind.DWord;
|
||||
else if (key.Type == "REG_MULTI_SZ")
|
||||
kind = RegistryValueKind.MultiString;
|
||||
else if (key.Type == "REG_QWORD")
|
||||
kind = RegistryValueKind.QWord;
|
||||
|
||||
Registry.SetValue(key.ParentKey, key.Entry, key.Value, kind);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user