Delete DisableFeedback.cs
This commit is contained in:
parent
4d25d6f15c
commit
fa3a47deeb
1 changed files with 0 additions and 60 deletions
|
@ -1,60 +0,0 @@
|
|||
using Microsoft.Win32;
|
||||
|
||||
namespace Privatezilla.Setting.Privacy
|
||||
{
|
||||
internal class DisableFeedback: SettingBase
|
||||
{
|
||||
private const string PeriodInNanoSeconds = @"HKEY_CURRENT_USER\Software\Microsoft\Siuf\Rules";
|
||||
private const string NumberOfSIUFInPeriod = @"HKEY_CURRENT_USER\Software\Microsoft\Siuf\Rules";
|
||||
private const int DesiredValue = 0;
|
||||
|
||||
public override string ID()
|
||||
{
|
||||
return Properties.Resources.settingsPrivacyDisableFeedback;
|
||||
}
|
||||
|
||||
public override string Info()
|
||||
{
|
||||
return Properties.Resources.settingsPrivacyDisableFeedbackInfo;
|
||||
}
|
||||
|
||||
public override bool CheckSetting()
|
||||
{
|
||||
return !(
|
||||
RegistryHelper.IntEquals(PeriodInNanoSeconds, "PeriodInNanoSeconds", DesiredValue) &&
|
||||
RegistryHelper.IntEquals(NumberOfSIUFInPeriod, "NumberOfSIUFInPeriod", DesiredValue)
|
||||
);
|
||||
}
|
||||
|
||||
public override bool DoSetting()
|
||||
{
|
||||
try
|
||||
{
|
||||
Registry.SetValue(PeriodInNanoSeconds, "PeriodInNanoSeconds", DesiredValue, RegistryValueKind.DWord);
|
||||
Registry.SetValue(NumberOfSIUFInPeriod, "NumberOfSIUFInPeriod", DesiredValue, RegistryValueKind.DWord);
|
||||
return true;
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
|
||||
return false;
|
||||
}
|
||||
public override bool UndoSetting()
|
||||
{
|
||||
try
|
||||
{
|
||||
var RegKey = Registry.CurrentUser.OpenSubKey(@"Software\Microsoft\Siuf\Rules", true);
|
||||
RegKey.DeleteValue("NumberOfSIUFInPeriod");
|
||||
RegKey.DeleteValue("PeriodInNanoSeconds");
|
||||
return true;
|
||||
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
Loading…
Add table
Reference in a new issue