Files
PowerToys/src/common/GPOWrapperProjection/GPOWrapper.cs

46 lines
2.0 KiB
C#
Raw Normal View History

2022-10-26 14:02:31 +01:00
// Copyright (c) Microsoft Corporation
// The Microsoft Corporation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
namespace PowerToys.GPOWrapperProjection
{
public enum GpoRuleConfigured : int
{
WrongValue = PowerToys.GPOWrapper.GpoRuleConfigured.WrongValue,
Unavailable = PowerToys.GPOWrapper.GpoRuleConfigured.Unavailable,
NotConfigured = PowerToys.GPOWrapper.GpoRuleConfigured.NotConfigured,
Disabled = PowerToys.GPOWrapper.GpoRuleConfigured.Disabled,
Enabled = PowerToys.GPOWrapper.GpoRuleConfigured.Enabled,
}
// Some WPF applications have trouble consuming WinRT/C++ projections, because WPF makes an intermediary _wpftmp.csproj which doesn't build projections correctly on MSBUILD.
// This is a workaround to give access to GPOWrapper for WPF applications.
public static class GPOWrapper
{
public static GpoRuleConfigured GetConfiguredPowerLauncherEnabledValue()
{
return (GpoRuleConfigured)PowerToys.GPOWrapper.GPOWrapper.GetConfiguredPowerLauncherEnabledValue();
}
public static GpoRuleConfigured GetConfiguredFancyZonesEnabledValue()
{
return (GpoRuleConfigured)PowerToys.GPOWrapper.GPOWrapper.GetConfiguredFancyZonesEnabledValue();
}
public static GpoRuleConfigured GetConfiguredColorPickerEnabledValue()
{
return (GpoRuleConfigured)PowerToys.GPOWrapper.GPOWrapper.GetConfiguredColorPickerEnabledValue();
}
public static GpoRuleConfigured GetConfiguredImageResizerEnabledValue()
{
return (GpoRuleConfigured)PowerToys.GPOWrapper.GPOWrapper.GetConfiguredImageResizerEnabledValue();
}
public static GpoRuleConfigured GetConfiguredTextExtractorEnabledValue()
{
return (GpoRuleConfigured)PowerToys.GPOWrapper.GPOWrapper.GetConfiguredTextExtractorEnabledValue();
}
}
}