private TreeNode AddInteractionTreeNode(TreeNode rootNode, InteractionClassDescriptor interactionDescriptor)
        {
            TreeNodeCollection parentNodes;

            if (interactionDescriptor.ParentDescriptors.Count != 0)
            {
                TreeNode parentNode = AddInteractionTreeNode(rootNode, interactionDescriptor.ParentDescriptors[0]);
                parentNodes = parentNode.Nodes;
            }
            else
            {
                parentNodes = rootNode.Nodes;
            }

            TreeNode tmpNode = FindNode(parentNodes, interactionDescriptor.Name);

            if (tmpNode != null)
            {
                return(tmpNode);
            }
            else
            {
                TreeNode node = new TreeNode(interactionDescriptor.Name);
                node.ImageIndex         = 1;
                node.SelectedImageIndex = 1;
                HLAInteractionClassPropertiesInformation nodeInfo = new HLAInteractionClassPropertiesInformation(interactionDescriptor.interactionClass, null);
                node.Tag = nodeInfo;
                parentNodes.Add(node);

                return(node);
            }
        }
        private TreeNode AddInteractionTreeNode(TreeNode rootNode, InteractionClassDescriptor interactionDescriptor)
        {
            TreeNodeCollection parentNodes;
            if (interactionDescriptor.ParentDescriptors.Count != 0)
            {
                TreeNode parentNode = AddInteractionTreeNode(rootNode, interactionDescriptor.ParentDescriptors[0]);
                parentNodes = parentNode.Nodes;
            }
            else
                parentNodes = rootNode.Nodes;

            TreeNode tmpNode = FindNode(parentNodes, interactionDescriptor.Name);
            if (tmpNode != null)
                return tmpNode;
            else
            {
                TreeNode node = new TreeNode(interactionDescriptor.Name);
                node.ImageIndex = 1;
                node.SelectedImageIndex = 1;
                HLAInteractionClassPropertiesInformation nodeInfo = new HLAInteractionClassPropertiesInformation(interactionDescriptor.interactionClass, null);
                node.Tag = nodeInfo;
                parentNodes.Add(node);

                return node;
            }
        }