From 830d3f7b351da56698b900dd45062b90474a32cb Mon Sep 17 00:00:00 2001 From: Belim Date: Sun, 20 Sep 2020 19:25:09 +0200 Subject: [PATCH] Delete DisablePassword.cs --- .../Settings/Security/DisablePassword.cs | 55 ------------------- 1 file changed, 55 deletions(-) delete mode 100644 src/Privatezilla/Privatezilla/Settings/Security/DisablePassword.cs diff --git a/src/Privatezilla/Privatezilla/Settings/Security/DisablePassword.cs b/src/Privatezilla/Privatezilla/Settings/Security/DisablePassword.cs deleted file mode 100644 index 56996b7..0000000 --- a/src/Privatezilla/Privatezilla/Settings/Security/DisablePassword.cs +++ /dev/null @@ -1,55 +0,0 @@ -using Microsoft.Win32; - -namespace Privatezilla.Setting.Security -{ - internal class DisablePassword : SettingBase - { - private const string PasswordKey = @"HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Windows\CredUI"; - private const int DesiredValue = 1; - - public override string ID() - { - return Properties.Resources.settingsSecurityDisablePassword; - } - - public override string Info() - { - return Properties.Resources.settingsSecurityDisablePasswordInfo; - } - - public override bool CheckSetting() - { - return !( - RegistryHelper.IntEquals(PasswordKey, "DisablePasswordReveal", DesiredValue) - ); - - } - - public override bool DoSetting() - { - try - { - Registry.SetValue(PasswordKey, "DisablePasswordReveal", DesiredValue, RegistryValueKind.DWord); - return true; - } - catch - { } - - return false; - } - - public override bool UndoSetting() - { - try - { - Registry.SetValue(PasswordKey, "DisablePasswordReveal", 0, RegistryValueKind.DWord); - return true; - } - catch - { } - - return false; - } - - } -} \ No newline at end of file