Пример #1
0
        private static bool GetSystemOptionBoolean(string name)
        {
            object value = RegistryHelpers.GetValue(RegistryPath, name, RegistryHive.LocalMachine);

            if (value != null)
            {
                try
                {
                    return(Convert.ToBoolean(value));
                }
                catch
                {
                }
            }

            value = RegistryHelpers.GetValue(RegistryPath, name, RegistryHive.CurrentUser);

            if (value != null)
            {
                try
                {
                    return(Convert.ToBoolean(value));
                }
                catch
                {
                }
            }

            return(false);
        }
Пример #2
0
        public static string GetConfigsDir()
        {
            var result = RegistryHelpers.GetValue <string>(AppRootKeyPath, "ConfigsDir");

            return(result);
        }