private void ShowConfiguration() { if (endPointsListView.SelectedItems.Count == 0) { return; } string endpointName = endPointsListView.SelectedItems[0].Tag.ToString(); string networkName = networkDropDown.SelectedItem.ToString() == "Not Specified" ? null : networkDropDown.SelectedItem.ToString(); configurationGroupBox.Text = String.Format(Properties.Resources.ConfigurationForEndpoint, endpointName); ClearConfigurationFields(); if (endpointCatalog.AddressExistsForEndpoint(endpointName, networkName)) { addressTextBox.Text = endpointCatalog.GetAddressForEndpoint(endpointName, networkName); NetworkCredential credential = endpointCatalog.GetCredentialForEndpoint(endpointName, networkName); userTextBox.Text = credential.UserName; passwordTextBox.Text = credential.Password; domainTextBox.Text = credential.Domain; } else { addressTextBox.Text = Properties.Resources.NoConfigurationFoundForSpecifiedNetwork; } }
/// <summary> /// This method creates the proxy object and set the URL and Credentials properties. /// </summary> /// <param name="request">Request to be dispatched.</param> /// <param name="networkName">Current network name.</param> /// <returns>The proxy object which has been created.</returns> public virtual object GetOnlineProxy(Request request, string networkName) { Guard.ArgumentNotNull(request, "request"); SoapHttpClientProtocol proxy = (SoapHttpClientProtocol)Activator.CreateInstance(request.OnlineProxyType); if ((catalog != null) && (catalog.Count > 0) && (catalog.EndpointExists(request.Endpoint))) { proxy.Credentials = catalog.GetCredentialForEndpoint(request.Endpoint, networkName); proxy.Url = catalog.GetAddressForEndpoint(request.Endpoint, networkName); } return(proxy); }