Esempio n. 1
0
        public static RegKey Parse(String keyPath, Boolean writable)
        {
            String[]    tokens  = keyPath.Split(new Char[] { '\\' }, 2);
            RegistryKey rootKey = Reger.ParseRootKey(tokens[0]);

            if (tokens.Length == 1)
            {
                return(new RegKey(rootKey));
            }
            String path = tokens[1];
            String name = keyPath.Substring(keyPath.LastIndexOf('\\') + 1);

            try
            {
                var key = rootKey.OpenSubKey(path, writable);
                if (key == null)
                {
                    return(null);
                }
                return(new RegKey(name, key));
            }
            catch
            {
                return(null);
            }
        }
Esempio n. 2
0
 public List <RegKey> GetChilds()
 {
     return(Reger.GetChilds(Key));
 }
Esempio n. 3
0
 public List <RegValue> GetValues()
 {
     return(Reger.GetValues(Key));
 }