Delete GameBar.cs
This commit is contained in:
parent
925795f6cd
commit
9f08466da2
1 changed files with 0 additions and 54 deletions
|
@ -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;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
Loading…
Add table
Reference in a new issue