mirror of
https://github.com/jkocon/g-helper.git
synced 2026-02-23 13:00:52 +01:00
25 lines
605 B
C#
25 lines
605 B
C#
using Microsoft.Win32;
|
|
|
|
namespace GHelper.Helpers
|
|
{
|
|
public static class DynamicLightingHelper
|
|
{
|
|
|
|
public static bool IsEnabled()
|
|
{
|
|
using var key = Registry.CurrentUser.OpenSubKey(@"Software\Microsoft\Lighting");
|
|
var registryValueObject = key?.GetValue("AmbientLightingEnabled");
|
|
|
|
if (registryValueObject == null) return true;
|
|
return (int)registryValueObject > 0;
|
|
}
|
|
|
|
public static void OpenSettings()
|
|
{
|
|
ProcessHelper.RunCMD("explorer","ms-settings:personalization-lighting");
|
|
}
|
|
|
|
|
|
}
|
|
}
|