/// <summary>
        /// loads the proxy server settings from the registry
        /// </summary>
        internal static ProxyServerConfiguration Read()
        {
            var proxyServerConfiguration = new ProxyServerConfiguration();

            var ProxyServerConfigurationKey = Registry.CurrentUser.OpenSubKey(RegistryPath);

            if (ProxyServerConfigurationKey != null)
            {
                proxyServerConfiguration.Address  = ProxyServerConfigurationKey.GetValue(Address).ToString();
                proxyServerConfiguration.Port     = ProxyServerConfigurationKey.GetValue(Port).ToString();
                proxyServerConfiguration.UserName = ProxyServerConfigurationKey.GetValue(UserName).ToString();
                proxyServerConfiguration.Password = DecryptString(ProxyServerConfigurationKey.GetValue(Password).ToString());

                ProxyServerConfigurationKey.Close();
            }
            else
            {
                proxyServerConfiguration.Address  = "proxy.cdp4.org";
                proxyServerConfiguration.Port     = "8888";
                proxyServerConfiguration.UserName = null;
                proxyServerConfiguration.Password = null;
            }

            return(proxyServerConfiguration);
        }
        /// <summary>
        /// Writes the <see cref="ProxyServerConfiguration"/> to the registry
        /// </summary>
        /// <param name="proxyServerConfiguration">
        /// The <see cref="ProxyServerConfiguration"/> to write.
        /// </param>
        internal static void Write(ProxyServerConfiguration proxyServerConfiguration)
        {
            var ProxyServerConfigurationKey = Registry.CurrentUser.CreateSubKey(RegistryPath);

            ProxyServerConfigurationKey.SetValue(Address, proxyServerConfiguration.Address);
            ProxyServerConfigurationKey.SetValue(Port, proxyServerConfiguration.Port);
            ProxyServerConfigurationKey.SetValue(UserName, proxyServerConfiguration.UserName ?? string.Empty);

            var encryptedPassword = EncryptString(proxyServerConfiguration.Password ?? string.Empty);

            ProxyServerConfigurationKey.SetValue(Password, encryptedPassword);

            ProxyServerConfigurationKey.Close();
        }