Exemple #1
0
        private void contextMenuServiceConnect_Click(object sender, EventArgs e)
        {
            XElement description = null;

            DoService(data =>
            {
                description = data.Service.Callback.GetServiceDescription();
            });

            if (description != null)
            {
                try
                {
                    ServiceReflector reflector = new ServiceReflector(description);
                    using (var form = new ServiceTestClientForm())
                    {
                        form.Reflector = reflector;
                        form.ShowDialog();
                    }
                }
                catch (Exception ex)
                {
                    MessageBox.Show(ex.Message, this.Text);
                }
            }
        }
Exemple #2
0
        private void buttonConnectRemoteService_Click(object sender, EventArgs e)
        {
            ListViewItem item = listViewRemoteServices.SelectedItems[0];
            string       url  = item.SubItems[1].Text;
            string       host = (string)item.Tag;

            QueryHttp(
                url,
                message =>
            {
                XElement description       = XElement.Parse(message);
                ServiceReflector reflector = new ServiceReflector(description);
                using (var form = new ServiceTestClientForm())
                {
                    form.Reflector = reflector;
                    form.Host      = host;
                    form.ShowDialog();
                }
            },
                () => { }
                );
        }