예제 #1
0
        public static string GetNewValueName(RegistryKey key)
        {
            List <RegValue> values = RegExplorer.GetValues(key);
            bool            found  = false;
            int             suffix = 0;
            string          title  = String.Empty;

            while (!found)
            {
                suffix++;
                title = "New Value #" + suffix;
                found = !values.Exists(val => val.Name == title);
            }
            return(title);
        }
예제 #2
0
        public static string GetNewKeyName(RegistryKey key)
        {
            List <RegKey> subKeys = RegExplorer.GetSubKeys(key);
            bool          found   = false;
            int           suffix  = 0;
            string        title   = String.Empty;

            while (!found)
            {
                suffix++;
                title = "New Key #" + suffix;
                found = !subKeys.Exists(subKey => subKey.Name == title);
            }
            return(title);
        }