Delete WindowsDRM.cs

This commit is contained in:
Belim 2020-09-20 19:25:04 +02:00 committed by GitHub
parent 8b2b92431e
commit 9996a3360f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1,55 +0,0 @@
using Microsoft.Win32;
namespace Privatezilla.Setting.Security
{
internal class WindowsDRM : SettingBase
{
private const string DRMKey = @"HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\WMDRM";
private const int DesiredValue = 1;
public override string ID()
{
return Properties.Resources.settingsSecurityWindowsDRM;
}
public override string Info()
{
return Properties.Resources.settingsSecurityWindowsDRMInfo;
}
public override bool CheckSetting()
{
return !(
RegistryHelper.IntEquals(DRMKey, "DisableOnline", DesiredValue)
);
}
public override bool DoSetting()
{
try
{
Registry.SetValue(DRMKey, "DisableOnline", DesiredValue, RegistryValueKind.DWord);
return true;
}
catch
{ }
return false;
}
public override bool UndoSetting()
{
try
{
Registry.SetValue(DRMKey, "DisableOnline", 0, RegistryValueKind.DWord);
return true;
}
catch
{ }
return false;
}
}
}