コード例 #1
0
ファイル: SystemOptions.cs プロジェクト: ywscr/ShareX
        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);
        }