コード例 #1
0
ファイル: Form1.cs プロジェクト: vijayamazon/ezbob
        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;
                }
            }
        }
コード例 #2
0
ファイル: Form1.cs プロジェクト: vijayamazon/ezbob
        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;
        }
コード例 #3
0
ファイル: LoadWindowHelper.cs プロジェクト: vijayamazon/ezbob
 public static List <Endpoint> LoadEndpointsFromConfig()
 {
     return(LoadWindowHelper.LoadEndpointsFromConfig(null));
 }