Delete RegistryHelper.cs
This commit is contained in:
parent
4aab86deac
commit
77fbd20dd4
1 changed files with 0 additions and 44 deletions
|
@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Reference in a new issue