GPOWrapper.cs
1 // Copyright (c) Microsoft Corporation 2 // The Microsoft Corporation licenses this file to you under the MIT license. 3 // See the LICENSE file in the project root for more information. 4 5 namespace PowerToys.GPOWrapperProjection 6 { 7 public enum GpoRuleConfigured : int 8 { 9 WrongValue = PowerToys.GPOWrapper.GpoRuleConfigured.WrongValue, 10 Unavailable = PowerToys.GPOWrapper.GpoRuleConfigured.Unavailable, 11 NotConfigured = PowerToys.GPOWrapper.GpoRuleConfigured.NotConfigured, 12 Disabled = PowerToys.GPOWrapper.GpoRuleConfigured.Disabled, 13 Enabled = PowerToys.GPOWrapper.GpoRuleConfigured.Enabled, 14 } 15 16 // Some WPF applications have trouble consuming WinRT/C++ projections, because WPF makes an intermediary _wpftmp.csproj which doesn't build projections correctly on MSBUILD. 17 // This is a workaround to give access to GPOWrapper for WPF applications. 18 public static class GPOWrapper 19 { 20 public static GpoRuleConfigured GetConfiguredPowerLauncherEnabledValue() 21 { 22 return (GpoRuleConfigured)PowerToys.GPOWrapper.GPOWrapper.GetConfiguredPowerLauncherEnabledValue(); 23 } 24 25 public static GpoRuleConfigured GetConfiguredFancyZonesEnabledValue() 26 { 27 return (GpoRuleConfigured)PowerToys.GPOWrapper.GPOWrapper.GetConfiguredFancyZonesEnabledValue(); 28 } 29 30 public static GpoRuleConfigured GetConfiguredCmdNotFoundEnabledValue() 31 { 32 return (GpoRuleConfigured)PowerToys.GPOWrapper.GPOWrapper.GetConfiguredCmdNotFoundEnabledValue(); 33 } 34 35 public static GpoRuleConfigured GetConfiguredColorPickerEnabledValue() 36 { 37 return (GpoRuleConfigured)PowerToys.GPOWrapper.GPOWrapper.GetConfiguredColorPickerEnabledValue(); 38 } 39 40 public static GpoRuleConfigured GetConfiguredImageResizerEnabledValue() 41 { 42 return (GpoRuleConfigured)PowerToys.GPOWrapper.GPOWrapper.GetConfiguredImageResizerEnabledValue(); 43 } 44 45 public static GpoRuleConfigured GetConfiguredTextExtractorEnabledValue() 46 { 47 return (GpoRuleConfigured)PowerToys.GPOWrapper.GPOWrapper.GetConfiguredTextExtractorEnabledValue(); 48 } 49 50 public static GpoRuleConfigured GetConfiguredAdvancedPasteEnabledValue() 51 { 52 return (GpoRuleConfigured)PowerToys.GPOWrapper.GPOWrapper.GetConfiguredAdvancedPasteEnabledValue(); 53 } 54 55 public static GpoRuleConfigured GetConfiguredPeekEnabledValue() 56 { 57 return (GpoRuleConfigured)PowerToys.GPOWrapper.GPOWrapper.GetConfiguredPeekEnabledValue(); 58 } 59 60 public static GpoRuleConfigured GetRunPluginEnabledValue(string pluginID) 61 { 62 return (GpoRuleConfigured)PowerToys.GPOWrapper.GPOWrapper.GetRunPluginEnabledValue(pluginID); 63 } 64 65 public static GpoRuleConfigured GetConfiguredWorkspacesEnabledValue() 66 { 67 return (GpoRuleConfigured)PowerToys.GPOWrapper.GPOWrapper.GetConfiguredWorkspacesEnabledValue(); 68 } 69 70 public static GpoRuleConfigured GetConfiguredLightSwitchEnabledValue() 71 { 72 return (GpoRuleConfigured)PowerToys.GPOWrapper.GPOWrapper.GetConfiguredLightSwitchEnabledValue(); 73 } 74 } 75 }