Delete RegistryHelper.cs

This commit is contained in:
Belim 2020-09-20 19:17:32 +02:00 committed by GitHub
parent 4aab86deac
commit 77fbd20dd4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1,44 +0,0 @@
using Microsoft.Win32;
using Privatezilla.Setting;
using System;
using System.Windows.Forms;
namespace Privatezilla
{
/// <summary>
/// Check whether Registry values equal
/// </summary>
internal class RegistryHelper
{
public SettingBase Setting { get; }
public static bool IntEquals(string keyName, string valueName, int expectedValue)
{
try
{
var value = Registry.GetValue(keyName, valueName, null);
return (value != null && (int)value == expectedValue);
}
catch (Exception ex)
{
MessageBox.Show(keyName, ex.Message, MessageBoxButtons.OK);
return false;
}
}
public static bool StringEquals(string keyName, string valueName, string expectedValue)
{
try
{
var value = Registry.GetValue(keyName, valueName, null);
return (value != null && (string)value == expectedValue);
}
catch (Exception ex)
{
MessageBox.Show(keyName, ex.Message, MessageBoxButtons.OK);
return false;
}
}
}
}