Delete CellularData.cs

This commit is contained in:
Belim 2020-09-20 19:19:59 +02:00 committed by GitHub
parent 7d826b9332
commit a0810f3bb7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1,54 +0,0 @@
using Microsoft.Win32;
namespace Privatezilla.Setting.Apps
{
internal class CellularData : SettingBase
{
private const string AppKey = @"HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\CapabilityAccessManager\ConsentStore\cellularData";
private const string DesiredValue = "Deny";
public override string ID()
{
return Properties.Resources.settingsAppsCellularData;
}
public override string Info()
{
return Properties.Resources.settingsAppsCellularDataInfo.Replace("\\n", "\n");
}
public override bool CheckSetting()
{
return !(
RegistryHelper.StringEquals(AppKey, "Value", DesiredValue)
);
}
public override bool DoSetting()
{
try
{
Registry.SetValue(AppKey, "Value", DesiredValue, RegistryValueKind.String);
return true;
}
catch
{ }
return false;
}
public override bool UndoSetting()
{
try
{
Registry.SetValue(AppKey, "Value", "Allow", RegistryValueKind.String);
return true;
}
catch
{ }
return false;
}
}
}