From 7ac0d988202c99dfc0c3b843658d6d09a0ab003e Mon Sep 17 00:00:00 2001 From: Belim Date: Sun, 20 Sep 2020 19:24:38 +0200 Subject: [PATCH] Delete DisableTipsLockScreen.cs --- .../Settings/Privacy/DisableTipsLockScreen.cs | 64 ------------------- 1 file changed, 64 deletions(-) delete mode 100644 src/Privatezilla/Privatezilla/Settings/Privacy/DisableTipsLockScreen.cs diff --git a/src/Privatezilla/Privatezilla/Settings/Privacy/DisableTipsLockScreen.cs b/src/Privatezilla/Privatezilla/Settings/Privacy/DisableTipsLockScreen.cs deleted file mode 100644 index 3426e78..0000000 --- a/src/Privatezilla/Privatezilla/Settings/Privacy/DisableTipsLockScreen.cs +++ /dev/null @@ -1,64 +0,0 @@ -using Microsoft.Win32; - -namespace Privatezilla.Setting.Privacy -{ - internal class DisableTipsLockScreen : SettingBase - { - private const string SpotlightKey = @"HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\ContentDeliveryManager"; - private const string LockScreenKey = @"HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\ContentDeliveryManager"; - private const string TipsTricksSuggestions = @"HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\ContentDeliveryManager"; - private const int DesiredValue = 0; - - public override string ID() - { - return Properties.Resources.settingsPrivacyDisableTipsLockScreen; - - } - - public override string Info() - { - return Properties.Resources.settingsPrivacyDisableTipsLockScreenInfo; - } - - public override bool CheckSetting() - { - return !( - RegistryHelper.IntEquals(SpotlightKey, "RotatingLockScreenEnabled", DesiredValue) && - RegistryHelper.IntEquals(LockScreenKey, "RotatingLockScreenOverlayEnabled", DesiredValue) && - RegistryHelper.IntEquals(TipsTricksSuggestions, "SubscribedContent-338389Enabled", DesiredValue) - ); - } - - public override bool DoSetting() - { - try - { - Registry.SetValue(SpotlightKey, "RotatingLockScreenEnabled", DesiredValue, RegistryValueKind.DWord); - Registry.SetValue(LockScreenKey, "RotatingLockScreenOverlayEnabled", DesiredValue, RegistryValueKind.DWord); - Registry.SetValue(TipsTricksSuggestions, "SubscribedContent-338389Enabled", DesiredValue, RegistryValueKind.DWord); - return true; - - } - catch - { } - - return false; - } - - public override bool UndoSetting() - { - try - { - Registry.SetValue(SpotlightKey, "RotatingLockScreenEnabled", 1, RegistryValueKind.DWord); - Registry.SetValue(LockScreenKey, "RotatingLockScreenOverlayEnabled", 1, RegistryValueKind.DWord); - Registry.SetValue(TipsTricksSuggestions, "SubscribedContent-338389Enabled", 1, RegistryValueKind.DWord); - return true; - } - catch - { } - - return false; - } - - } -} \ No newline at end of file