mirror of
https://github.com/jkocon/g-helper.git
synced 2026-02-23 13:00:52 +01:00
Tweaks and fixes
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
using System.Text.RegularExpressions;
|
||||
using System.Text;
|
||||
using System.Diagnostics;
|
||||
using Microsoft.Win32;
|
||||
|
||||
namespace GHelper
|
||||
{
|
||||
@@ -40,6 +41,25 @@ namespace GHelper
|
||||
return (Process.GetProcessesByName("AsusOptimization").Count() > 0);
|
||||
}
|
||||
|
||||
|
||||
public static void SetBacklightOffDelay(int value = 60)
|
||||
{
|
||||
try
|
||||
{
|
||||
RegistryKey myKey = Registry.LocalMachine.OpenSubKey(@"SOFTWARE\ASUS\ASUS System Control Interface\AsusOptimization\ASUS Keyboard Hotkeys", true);
|
||||
if (myKey != null)
|
||||
{
|
||||
myKey.SetValue("TurnOffKeybdLight", value, RegistryValueKind.DWord);
|
||||
myKey.Close();
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Logger.WriteLine(ex.Message);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user