iControl.Dialogs.ConnectionDialog.fillupForm C# (CSharp) Method

fillupForm() private method

private fillupForm ( String sHostname ) : void
sHostname String
return void
        private void fillupForm(String sHostname)
        {
            HostnameComboBox.Text = sHostname;
            UsernameTextBox.Text = "";
            //PortTextBox.Text = "";
            PasswordTextBox.Text = "";

            m_ci.loadFromRegistry(sHostname);
            HostnameComboBox.Focus();
            if (m_ci.hostname.Length > 0)
            {
                HostnameComboBox.Text = m_ci.hostname;
                UsernameTextBox.Focus();
            }
            if (-1 != m_ci.port)
            {
                PortTextBox.Text = m_ci.port.ToString();
            }
            if (m_ci.username.Length > 0)
            {
                UsernameTextBox.Text = m_ci.username;
                PasswordTextBox.Focus();
            }
            System.Net.WebProxy proxy = m_ci.getWebProxy();
            if (null != proxy)
            {
                UseProxyCheckBox.Checked = true;
                ProxyAddressTextBox.Text = proxy.Address.Host;
                ProxyPortTextBox.Text = Convert.ToString(proxy.Address.Port);
                if (null != proxy.Credentials)
                {
                    ProxyUserTextBox.Text = ((System.Net.NetworkCredential)proxy.Credentials).UserName;
                }
            }
            else
            {
                UseProxyCheckBox.Checked = false;
                ProxyAddressTextBox.Text = "";
                ProxyPortTextBox.Text = "";
                ProxyUserTextBox.Text = "";
                ProxyPassTextBox.Text = "";
            }
        }