/// <summary> /// Same as <see cref="GetSubKey"/>, but this method forces the creation /// where <see cref="GetSubKey"/> just returns the object which will create /// itself when needed (a value is set) /// </summary> /// <param name="Name"></param> /// <returns></returns> public RegKey CreateSubKey(string Name) { RegKey key = GetSubKey(Name); if (!key.Exists()) { key.Create(); } return(key); }
/// <summary> /// Get the registry information if not done so already after the last Refresh /// </summary> protected void GetKey() { if (!regkeysSearched) { regkeysSearched = true; if (Root == null) { if (rootkey == null) { throw new Exception("No root was specified!"); } } else if (Root.Exists()) { //RegistryKey classes = ; rootkey = Root.RegistryKey; } if (rootkey != null) { regkey = rootkey.OpenSubKey(name, writable); } onKeyChanged(); } }