private void ddlEndpoints_SelectedIndexChanged(object sender, EventArgs e) { SelectedEndpoint = ((ComboBox)sender).SelectedValue.ToString(); var endpoints = LoadWindowHelper.LoadEndpointsFromConfig(); foreach (var endpoint in endpoints) { if (SelectedEndpoint.Equals(endpoint.EndPointName)) { EndPoint.Text = DEFAULT_ENDPOINT_IP_TEXT + endpoint.EndPointPath.Host; } } }
private void Form1_Load(object sender, EventArgs e) { var service = new EzServiceClient(); Type type = typeof(EzServiceClient); System.Reflection.MethodInfo[] methods = type.GetMethods(); var methodsStr = new List <string>(30); methodsStr.AddRange(methods.Select(method => method.Name)); methodsStr.Sort(); ddlMethods.DataSource = methodsStr; // ddlMethods.Text = "Name"; // ddlMethods.ValueMember = "Name"; ddlMethods.PerformLayout(); AutoCompleteStringCollection AutoCompleteMethods = new AutoCompleteStringCollection(); for (int i = 0; i < methods.Length; i++) { AutoCompleteMethods.Add(methods[i].Name); } ddlMethods.AutoCompleteMode = AutoCompleteMode.SuggestAppend; ddlMethods.AutoCompleteSource = AutoCompleteSource.ListItems; ddlMethods.AutoCompleteCustomSource = AutoCompleteMethods; SelectedMethod = ddlMethods.SelectedValue.ToString(); //lblFbnclient.Text = TestMethod.Fbnclient.Endpoint.ListenUri.ToString(); imgLoader.Visible = true; pictureBox1.Visible = false; imgLoader.Text = ""; imgLoader.Refresh(); var endpoints = LoadWindowHelper.LoadEndpointsFromConfig(); EndPoint.Text = DEFAULT_ENDPOINT_IP_TEXT + endpoints[0].EndPointPath.Host; }
public static List <Endpoint> LoadEndpointsFromConfig() { return(LoadWindowHelper.LoadEndpointsFromConfig(null)); }