Delete DisableMSExperiments.cs

This commit is contained in:
Belim 2020-09-20 19:24:06 +02:00 committed by GitHub
parent 286d1bf79c
commit 4d4bf50365
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.Privacy
{
internal class DisableMSExperiments: SettingBase
{
private const string ExperimentationKey = @"HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\PolicyManager\current\device\System";
private const int DesiredValue = 0;
public override string ID()
{
return Properties.Resources.settingsPrivacyDisableMSExperiments;
}
public override string Info()
{
return Properties.Resources.settingsPrivacyDisableMSExperimentsInfo;
}
public override bool CheckSetting()
{
return !(
RegistryHelper.IntEquals(ExperimentationKey, "AllowExperimentation", DesiredValue)
);
}
public override bool DoSetting()
{
try
{
Registry.SetValue(ExperimentationKey, "AllowExperimentation", DesiredValue, RegistryValueKind.DWord);
return true;
}
catch
{ }
return false;
}
public override bool UndoSetting()
{
try
{
Registry.SetValue(ExperimentationKey, "AllowExperimentation", 1, RegistryValueKind.DWord);
return true;
}
catch
{ }
return false;
}
}
}