コード例 #1
0
ファイル: WRegisterTools.cs プロジェクト: bxstar/KanKan
        public static RegistryKey CreateRegistryKey(WRegisterTool.WRegisterRootKeyType rootKeyType, string keyPath, string keyValueName, string keyValue)
        {
            RegistryKey registryKey = WRegisterTool.CreateRegistryKey(rootKeyType, keyPath);

            registryKey.SetValue(keyValueName, keyValue);
            return(registryKey);
        }
コード例 #2
0
ファイル: WRegisterTools.cs プロジェクト: bxstar/KanKan
        public static RegistryKey CreateRegistryKey(RegistryKey fatherKey, string keyPath, string keyValueName, string keyValue)
        {
            RegistryKey registryKey = WRegisterTool.CreateRegistryKey(fatherKey, keyPath);

            registryKey.SetValue(keyValueName, keyValue);
            return(registryKey);
        }
コード例 #3
0
ファイル: WRegisterTools.cs プロジェクト: bxstar/KanKan
        public static bool SetRegistryValue(WRegisterTool.WRegisterRootKeyType rootKeyType, string keyPath, string keyValueName, string keyValue)
        {
            RegistryKey registryKey = WRegisterTool.GetRegistryKey(rootKeyType, keyPath);

            registryKey.SetValue(keyValueName, keyValue);
            return(true);
        }
コード例 #4
0
ファイル: WRegisterTools.cs プロジェクト: bxstar/KanKan
 public static bool DeleteRegistryValue(RegistryKey key, string keyValueName)
 {
     if (WRegisterTool.IsKeyHaveValue(key, keyValueName))
     {
         key.DeleteValue(keyValueName);
         return(true);
     }
     return(false);
 }
コード例 #5
0
ファイル: WRegisterTools.cs プロジェクト: bxstar/KanKan
        public static string GetRegistryValue(WRegisterTool.WRegisterRootKeyType rootKeyType, string keyPath, string keyName)
        {
            RegistryKey registryKey = WRegisterTool.GetRegistryKey(rootKeyType, keyPath);

            if (WRegisterTool.IsKeyHaveValue(registryKey, keyName))
            {
                return(registryKey.GetValue(keyName).ToString());
            }
            return(null);
        }
コード例 #6
0
ファイル: WRegisterTools.cs プロジェクト: bxstar/KanKan
        public static bool DeleteRegistryValue(WRegisterTool.WRegisterRootKeyType rootKeyType, string keyPath, string keyValueName)
        {
            RegistryKey registryKey = WRegisterTool.GetRegistryKey(rootKeyType, keyPath);

            if (WRegisterTool.IsKeyHaveValue(registryKey, keyValueName))
            {
                registryKey.DeleteValue(keyValueName);
                return(true);
            }
            return(false);
        }
コード例 #7
0
ファイル: WRegisterTools.cs プロジェクト: bxstar/KanKan
        public static bool DeleteRegistryKey(WRegisterTool.WRegisterRootKeyType rootKeyType, string keyPath, string keyName)
        {
            RegistryKey rootRegisterKey = WRegisterTool.GetRootRegisterKey(rootKeyType);
            RegistryKey registryKey     = rootRegisterKey.OpenSubKey(keyPath);

            if (WRegisterTool.IsKeyHaveSubKey(registryKey, keyName))
            {
                registryKey.DeleteSubKey(keyName);
                return(true);
            }
            return(false);
        }
コード例 #8
0
ファイル: WRegisterTools.cs プロジェクト: bxstar/KanKan
        public static RegistryKey GetRegistryKey(WRegisterTool.WRegisterRootKeyType rootKeyType, string keyPath)
        {
            RegistryKey rootRegisterKey = WRegisterTool.GetRootRegisterKey(rootKeyType);

            return(rootRegisterKey.OpenSubKey(keyPath, true));
        }
コード例 #9
0
ファイル: WRegisterTools.cs プロジェクト: bxstar/KanKan
 public static RegistryKey CreateRegistryKey(WRegisterTool.WRegisterRootKeyType rootKeyType, string keyPath)
 {
     WRegisterTool.GetRootRegisterKey(rootKeyType);
     return(WRegisterTool.CreateRegistryKey(rootKeyType, keyPath));
 }