From 9f08466da2c5f3dbb499288b0ae55a50b2902dc7 Mon Sep 17 00:00:00 2001 From: Belim Date: Sun, 20 Sep 2020 19:22:58 +0200 Subject: [PATCH] Delete GameBar.cs --- .../Privatezilla/Settings/Gaming/GameBar.cs | 54 ------------------- 1 file changed, 54 deletions(-) delete mode 100644 src/Privatezilla/Privatezilla/Settings/Gaming/GameBar.cs diff --git a/src/Privatezilla/Privatezilla/Settings/Gaming/GameBar.cs b/src/Privatezilla/Privatezilla/Settings/Gaming/GameBar.cs deleted file mode 100644 index 5f7c001..0000000 --- a/src/Privatezilla/Privatezilla/Settings/Gaming/GameBar.cs +++ /dev/null @@ -1,54 +0,0 @@ -using Microsoft.Win32; - -namespace Privatezilla.Setting.Gaming -{ - internal class DisableGameBar : SettingBase - { - private const string GameBarKey = @"HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Windows\GameDVR"; - private const int DesiredValue = 0; - - public override string ID() - { - return Properties.Resources.settingsGamingGameBar; - } - - public override string Info() - { - return Properties.Resources.settingsGamingGameBarInfo; - } - - public override bool CheckSetting() - { - return !( - RegistryHelper.IntEquals(GameBarKey, "AllowGameDVR", DesiredValue) - ); - } - - public override bool DoSetting() - { - try - { - Registry.SetValue(GameBarKey, "AllowGameDVR", DesiredValue, RegistryValueKind.DWord); - return true; - } - catch - { } - - return false; - } - - public override bool UndoSetting() - { - try - { - Registry.SetValue(GameBarKey, "AllowGameDVR", 1, RegistryValueKind.DWord); - return true; - } - catch - { } - - return false; - } - - } -} \ No newline at end of file