/// <summary>
        /// Displays a message indicating that no data could be showed.
        /// </summary>
        public void DisplayNoDataMessage()
        {
            postDataEditor.Clear();

            TreeEditorNode node = new TreeEditorNode();
            node.Text = "No data available for display";
            postDataEditor.Nodes.Add(node);
        }
        /// <summary>
        /// Loads the post data tree.
        /// </summary>
        public void LoadPostData()
        {
            postDataEditor.Clear();

            string postDataString = this.PostData;

            // TODO: Change to PostDataCollection method.
            postDataItems = formConverter.GetPostDataCollection(postDataString);

            // Create parent node
            TreeEditorNode parentNode = new TreeEditorNode();
            parentNode.Text = "Post Data";

            postDataEditor.Nodes.Add(parentNode);

            for (int j=0;j<postDataItems.Count;j++)
            {
                string name = postDataItems.Keys[j];
                ArrayList values = postDataItems[name];

                TreeEditorNode labelNode = new TreeEditorNode();
                labelNode.Text = name;
                parentNode.Nodes.Add(labelNode);

                int i = 0;
                foreach ( object val in values )
                {
                    string value = (string)val;
                    // TODO: Put format
                    postDataEditor.AddTextBoxControl(labelNode, "Index " + i.ToString() + ":", value, 350);

                    i++;
                }
            }

            postDataEditor.ExpandAll();
        }
        /// <summary>
        /// Loads the query string tree.
        /// </summary>
        public void LoadQueryStringTree()
        {
            string separator = this.txtSeparator.Text;
            string addonSeparator = this.txtAddonSeparator.Text;

            if ( this.QueryString.Length > 0 )
            {
                queryStringEditor.Clear();

                Hashtable queryStringValues = formConverter.ConvertQueryString(this.QueryString, separator, addonSeparator);

                // Create parent node
                TreeEditorNode parentNode = new TreeEditorNode();
                parentNode.Text = "Query String";

                queryStringEditor.Nodes.Add(parentNode);

                #region Load Query String Tree
                foreach ( DictionaryEntry de in queryStringValues )
                {
                    string name = (string)de.Key;
                    ArrayList values = (ArrayList)de.Value;

                    TreeEditorNode labelNode = new TreeEditorNode();
                    labelNode.Text = name;
                    parentNode.Nodes.Add(labelNode);

                    int i = 0;
                    foreach ( object val in values )
                    {
                        string value = (string)val;
                        queryStringEditor.AddTextBoxControl(labelNode, "Index " + i.ToString() + ":", value, 350);

                        i++;
                    }
                }

                queryStringEditor.ExpandAll();
                #endregion

                this.txtQueryString.Visible = true;
                this.txtQueryString.Dock = DockStyle.Top;
                this.txtQueryString.Height = 50;
                this.queryStringEditor.Visible = true;
            }
        }
        /// <summary>
        /// Displays a message indicating that no data could be showed.
        /// </summary>
        public void DisplayNoDataMessage()
        {
            queryStringEditor.Clear();

            TreeEditorNode node = new TreeEditorNode();
            node.Text = "No data available for display.";
            queryStringEditor.Nodes.Add(node);
        }
        /// <summary>
        /// Adds a control node.
        /// </summary>
        /// <param name="text"> The node text.</param>
        /// <param name="control"> The node control.</param>
        public void AddControlNode(string text, System.Windows.Forms.Control control)
        {
            TreeEditorNode newNode = new TreeEditorNode();
            newNode.Text = text;
            newNode.NodeControl = control;

            Label label = new Label();
            label.Text=text;
            label.Size=new Size(300,10);
            newNode.LabelControl=label;

            this.Nodes.Add(newNode);
        }
 /// <summary>
 /// Gets the text box value from a node.
 /// </summary>
 /// <param name="node"></param>
 /// <returns></returns>
 public string GetTextBoxValue(TreeEditorNode node)
 {
     return node.NodeControl.Text;
 }
        /// <summary>
        /// Adds a text box control.
        /// </summary>
        /// <param name="root"> The parent TreeEditorNode.</param>
        /// <param name="text"> The text to set.</param>
        /// <param name="value"> The value to set.</param>
        /// <param name="controlWidth"> The control width.</param>
        public void AddTextBoxControl(TreeEditorNode root, string text,string value, int controlWidth)
        {
            TreeEditorNode node = new TreeEditorNode();

            // add it to root node
            root.Nodes.Add(node);
            node.Text = text;

            TextBox[] textboxes;

            textboxes = GetTextBoxArray(1);
            textboxes[0].Size = new Size(controlWidth, this.ItemHeight - 5);
            textboxes[0].Name = "txtValue";
            textboxes[0].Text = value;

            node.NodeControl = textboxes[0];

            Label label = new Label();
            label.Text = value;
            label.Size = new Size(controlWidth,10);
            node.LabelControl = label;
        }