public void treeMethods_AfterSelect(object sender, TreeViewEventArgs e)
        {
            if (e.Node.Tag is MethodInfo)
            {
                MethodInfo info1 = e.Node.Tag as MethodInfo;
                treeInput.Nodes.Clear();
                MethodProperty property1 = new MethodProperty(GetProxyPropertyFromNode(e.Node), info1);
                property1.RecreateSubtree(null);
                treeInput.Nodes.Add(property1.TreeNode);
                if (!OutCall)
                {
                    e.Node.Tag = property1.TreeNode;
                }

                XmlCongifManager.ApplyDefaultConfig(treeInput.Nodes[0]);
            }
            else if (e.Node.Tag is TreeNode)
            {
                treeInput.Nodes.Clear();
                treeInput.Nodes.Add((TreeNode)e.Node.Tag);
            }
            treeInput.ExpandAll();
            treeInput.SelectedNode = treeInput.Nodes[0];

            if (treeInput.Nodes.Count > 0)
                this.AddIconRecursively(treeInput.Nodes[0]);
        }
 private void InvokeWebMethod()
 {
     MethodProperty currentMethodProperty = this.GetCurrentMethodProperty();
     if (currentMethodProperty != null)
     {
         HttpWebClientProtocol proxy = currentMethodProperty.GetProxyProperty().GetProxy();
         RequestProperties properties = new RequestProperties(proxy);
         try
         {
             MethodInfo method = currentMethodProperty.GetMethod();
             System.Type declaringType = method.DeclaringType;
             WSSWebRequest.RequestTrace = properties;
             object[] parameters = currentMethodProperty.ReadChildren() as object[];
             object result = method.Invoke(proxy, BindingFlags.Public, null, parameters, null);
             this.treeOutput.Nodes.Clear();
             MethodProperty property2 = new MethodProperty(currentMethodProperty.GetProxyProperty(), method, result, parameters);
             property2.RecreateSubtree(null);
             this.treeOutput.Nodes.Add(property2.TreeNode);
             this.treeOutput.ExpandAll();
         }
         finally
         {
             WSSWebRequest.RequestTrace = null;
             this.propRequest.SelectedObject = properties;
             this.richRequest.Text = properties.requestPayLoad;
             this.richResponse.Text = properties.responsePayLoad;
         }
     }
 }
        private void InvokeWebMethod()
        {
            MethodProperty property1 = GetCurrentMethodProperty();
            if (property1 != null)
            {
                HttpWebClientProtocol protocol1 = property1.GetProxyProperty().GetProxy();
                RequestProperties properties1 = new RequestProperties(protocol1);
                try
                {
                    MethodInfo info1 = property1.GetMethod();
                    //Type type1 = info1.DeclaringType;
                    WSSWebRequest.RequestTrace = properties1;
                    object[] objArray1 = property1.ReadChildren() as object[];
                    object obj1 = info1.Invoke(protocol1, BindingFlags.Public, null, objArray1, null);
                    treeOutput.Nodes.Clear();
                    MethodProperty property2 = new MethodProperty(property1.GetProxyProperty(), info1, obj1, objArray1);
                    property2.RecreateSubtree(null);
                    treeOutput.Nodes.Add(property2.TreeNode);

                    if (!chkCollapse.Checked)
                        treeOutput.ExpandAll();

                    if (treeOutput.Nodes.Count > 0)
                    {
                        this.RemoveSpecifiedFieldsRecursively(treeOutput.Nodes[0]);
                        this.AddIconRecursively(treeOutput.Nodes[0]);
                    }

                }
                finally
                {
                    WSSWebRequest.RequestTrace = null;
                    propRequest.SelectedObject = properties1;
                    richRequest.Text = properties1.requestPayLoad;
                    richResponse.Text = properties1.responsePayLoad;
                }
            }
        }
 private void treeMethods_AfterSelect(object sender, TreeViewEventArgs e)
 {
     if (e.Node.Tag is MethodInfo)
     {
         MethodInfo tag = e.Node.Tag as MethodInfo;
         this.treeInput.Nodes.Clear();
         MethodProperty property = new MethodProperty(this.GetProxyPropertyFromNode(e.Node), tag);
         property.RecreateSubtree(null);
         this.treeInput.Nodes.Add(property.TreeNode);
         e.Node.Tag = property.TreeNode;
     }
     else if (e.Node.Tag is TreeNode)
     {
         this.treeInput.Nodes.Clear();
         this.treeInput.Nodes.Add((TreeNode) e.Node.Tag);
     }
     this.treeInput.ExpandAll();
     this.treeInput.SelectedNode = this.treeInput.Nodes[0];
 }