mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-03 17:56:44 +02:00
[General]Add setting to disable elevated apps warning (#30628)
This commit is contained in:
@@ -126,6 +126,7 @@ namespace Microsoft.PowerToys.Settings.UI.ViewModels
|
||||
|
||||
_isElevated = isElevated;
|
||||
_runElevated = GeneralSettingsConfig.RunElevated;
|
||||
_enableWarningsElevatedApps = GeneralSettingsConfig.EnableWarningsElevatedApps;
|
||||
|
||||
RunningAsUserDefaultText = runAsUserText;
|
||||
RunningAsAdminDefaultText = runAsAdminText;
|
||||
@@ -150,6 +151,7 @@ namespace Microsoft.PowerToys.Settings.UI.ViewModels
|
||||
private bool _isElevated;
|
||||
private bool _runElevated;
|
||||
private bool _isAdmin;
|
||||
private bool _enableWarningsElevatedApps;
|
||||
private int _themeIndex;
|
||||
|
||||
private bool _autoDownloadUpdates;
|
||||
@@ -270,6 +272,24 @@ namespace Microsoft.PowerToys.Settings.UI.ViewModels
|
||||
}
|
||||
}
|
||||
|
||||
public bool EnableWarningsElevatedApps
|
||||
{
|
||||
get
|
||||
{
|
||||
return _enableWarningsElevatedApps;
|
||||
}
|
||||
|
||||
set
|
||||
{
|
||||
if (_enableWarningsElevatedApps != value)
|
||||
{
|
||||
_enableWarningsElevatedApps = value;
|
||||
GeneralSettingsConfig.EnableWarningsElevatedApps = value;
|
||||
NotifyPropertyChanged();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Are we running a dev build? (Please note that we verify this in the code that gets the newest version from GitHub too.)
|
||||
public static bool AutoUpdatesDisabledOnDevBuild
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user