DataHubServicesAddin.Dialogs.ConfigureLocatorForm.ReConnectToRemoteService C# (CSharp) Method

ReConnectToRemoteService() private method

Re-connects to remote service.
private ReConnectToRemoteService ( OnlineLocator inLocatorDefinition ) : void
inLocatorDefinition OnlineLocator The in locator definition.
return void
        private void ReConnectToRemoteService(OnlineLocator inLocatorDefinition)
        {
            cboUrl.Text = inLocatorDefinition.Url;
            txtUsername.Text = inLocatorDefinition.Username;
            txtPassword.Text = inLocatorDefinition.Password;
            switch (inLocatorDefinition.Authentication)
            {
                case AuthenticationMode.CurrentWindows:
                    radAuthWindows.Checked = true;
                    chkUseCurrentCredntials.Checked = true;
                    break;
                case AuthenticationMode.Token:
                    radAuthToken.Checked = true;
                    break;
                case AuthenticationMode.Windows:
                    radAuthWindows.Checked = true;
                    chkUseCurrentCredntials.Checked = false;
                    break;
                default:
                    radAuthNone.Checked = true;
                    break;
            }
            ConnectToHub();
            cboLocator.SelectedValue = inLocatorDefinition.GazId;
            if (cboLocator.SelectedItem != null)
            {
                lblDesc.Text = ((RemoteLocator)cboLocator.SelectedItem).LocatorDescription;
            }
        }