From b72d39a87a5f69d86f3bc174778647753b3d0bd3 Mon Sep 17 00:00:00 2001 From: Belim Date: Sun, 20 Sep 2020 19:24:27 +0200 Subject: [PATCH] Delete DisableWiFi.cs --- .../Settings/Privacy/DisableWiFi.cs | 55 ------------------- 1 file changed, 55 deletions(-) delete mode 100644 src/Privatezilla/Privatezilla/Settings/Privacy/DisableWiFi.cs diff --git a/src/Privatezilla/Privatezilla/Settings/Privacy/DisableWiFi.cs b/src/Privatezilla/Privatezilla/Settings/Privacy/DisableWiFi.cs deleted file mode 100644 index da24b6f..0000000 --- a/src/Privatezilla/Privatezilla/Settings/Privacy/DisableWiFi.cs +++ /dev/null @@ -1,55 +0,0 @@ -using Microsoft.Win32; - -namespace Privatezilla.Setting.Privacy -{ - internal class DisableWiFi : SettingBase - { - private const string WiFiKey = @"HKEY_LOCAL_MACHINE\Software\Microsoft\WcmSvc\wifinetworkmanager\config"; - private const int DesiredValue = 0; - - public override string ID() - { - return Properties.Resources.settingsPrivacyDisableWiFi; - } - - public override string Info() - { - return Properties.Resources.settingsPrivacyDisableWiFiInfo; - } - - public override bool CheckSetting() - { - return !( - RegistryHelper.IntEquals(WiFiKey, "AutoConnectAllowedOEM", DesiredValue) - - ); - } - - public override bool DoSetting() - { - try - { - Registry.SetValue(WiFiKey, "AutoConnectAllowedOEM", DesiredValue, RegistryValueKind.DWord); - return true; - } - catch - { } - - return false; - } - - public override bool UndoSetting() - { - try - { - Registry.SetValue(WiFiKey, "AutoConnectAllowedOEM", 1, RegistryValueKind.DWord); - return true; - } - catch - { } - - return false; - } - - } -} \ No newline at end of file