Delete DisableAds.cs
This commit is contained in:
parent
127829a59e
commit
ad9ff3880a
1 changed files with 0 additions and 54 deletions
|
@ -1,54 +0,0 @@
|
|||
using Microsoft.Win32;
|
||||
|
||||
namespace Privatezilla.Setting.Privacy
|
||||
{
|
||||
internal class DisableAds : SettingBase
|
||||
{
|
||||
private const string AdsKey = @"HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\AdvertisingInfo";
|
||||
private const int DesiredValue = 0;
|
||||
|
||||
public override string ID()
|
||||
{
|
||||
return Properties.Resources.settingsPrivacyDisableAds;
|
||||
}
|
||||
|
||||
public override string Info()
|
||||
{
|
||||
return Properties.Resources.settingsPrivacyDisableAdsInfo;
|
||||
}
|
||||
|
||||
public override bool CheckSetting()
|
||||
{
|
||||
return !(
|
||||
RegistryHelper.IntEquals(AdsKey, "Enabled", DesiredValue)
|
||||
);
|
||||
}
|
||||
|
||||
public override bool DoSetting()
|
||||
{
|
||||
try
|
||||
{
|
||||
Registry.SetValue(AdsKey, "Enabled", DesiredValue, RegistryValueKind.DWord);
|
||||
return true;
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
public override bool UndoSetting()
|
||||
{
|
||||
try
|
||||
{
|
||||
Registry.SetValue(AdsKey, "Enabled", 1, RegistryValueKind.DWord);
|
||||
return true;
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
Loading…
Add table
Reference in a new issue