Пример #1
0
        public static object GetSetting(string name, out bool PolicySet)
        {
            object policySetting = null;

            PolicySet = false;
            RegistryKey registryKey = null;

            try
            {
                try
                {
                    policySetting = RegistryUtils.GetPolicySetting(name);
                    if (policySetting == null)
                    {
                        PolicySet   = false;
                        registryKey = Registry.CurrentUser.OpenSubKey("Software\\MacroView\\DMF\\UserOptions", false);
                        if (registryKey != null)
                        {
                            policySetting = registryKey.GetValue(name);
                        }
                    }
                    else
                    {
                        PolicySet = true;
                    }
                }
                catch (Exception exception)
                {
                }
            }
            finally
            {
                if (registryKey != null)
                {
                    registryKey.Close();
                }
            }
            return(policySetting);
        }