Ejemplo n.º 1
0
        private void ParseRequirements(ReqPro40.Package___v1 rpxPkg, ReqTreeNode tn)
        {
            ReqPro40.Requirement___v6 rpxReq;
            ReqPro40.Package___v1     rpxPkgChild;
            ReqTreeNode tnPkgChild;
            ReqTreeNode tnReqNew;
            int         nKey;
            int         i;

            object[,] o = (object[, ])rpxPkg.KeyList(ReqPro40.enumElementTypes.eElemType_Requirement);
            for (i = 0; i < o.GetLength(1); i++)
            {
                if (o[0, i] != null)
                {
                    nKey     = (int)o[0, i];
                    rpxReq   = GetRequirement(nKey);
                    tnReqNew = new ReqTreeNode
                                   (rpxReq.get_Tag(ReqPro40.enumTagFormat.eTagFormat_Tag) + ": " + rpxReq.Name,
                                   rpxReq.key, ReqTreeNode.eReqTreeNodeType.eTreeNodeReq);
                    tn.Add(ref tnReqNew);
                    ParseReqChildren(rpxReq, tnReqNew);
                }
            }

            for (i = 0; i < tn.Count; i++)
            {
                tnPkgChild = tn[i];
                if (tnPkgChild.IsPackage())
                {
                    rpxPkgChild = (ReqPro40.Package___v1)rpxProject.GetPackage(tnPkgChild.Key, ReqPro40.enumPackageWeights.ePackageWeight_Empty);
                    //tnPkgChild = (ReqTreeNode)dictPackage[rpxPkgChild.PackageKey];
                    ParseRequirements(rpxPkgChild, tnPkgChild);
                }
            }
        }
Ejemplo n.º 2
0
        private void ReadReqTreeNode(ReqPro40.Package___v1 rpxPackage, ref ReqTreeNode reqParentTreeNode,
                                     ref int nPackageRead)
        {
            ReqPro40.Package___v1 rpxChildPackage;
            ReqTreeNode           reqMyTreeNode;

            reqMyTreeNode = new ReqTreeNode(rpxPackage.Name, rpxPackage.key, ReqTreeNode.eReqTreeNodeType.eTreeNodePkg);
            reqParentTreeNode.Add(ref reqMyTreeNode);
            dictPackage.Add(rpxPackage.key, reqMyTreeNode);
            cb.ShowProgressReqPkgTree(0, ++nPackageRead, 0, 0, null);

            rpxPackage.MoveFirst();
            while (!rpxPackage.IsEOF)
            {
                rpxChildPackage = (ReqPro40.Package___v1)rpxPackage.GetCurrentElement();
                ReadReqTreeNode(rpxChildPackage, ref reqMyTreeNode, ref nPackageRead);
                rpxPackage.MoveNext();
            }
        }
Ejemplo n.º 3
0
        private void ParseReqChildren(ReqPro40.Requirement___v6 rpxReq, ReqTreeNode tn)
        {
            ReqPro40.Relationships    rpxReqChildrenRelation;
            ReqPro40.Requirement___v6 rpxReqChild;
            ReqTreeNode tnReqNew;
            int         nChildCount;

            rpxReqChildrenRelation = rpxReq.Children;
            nChildCount            = rpxReqChildrenRelation.Count;
            rpxReqChildrenRelation.MoveFirst();

            for (int i = 0; i < nChildCount; i++)
            {
                rpxReqChild = GetRequirement(rpxReqChildrenRelation.ItemCurrent.DestinationKey);
                tnReqNew    = new ReqTreeNode
                                  (rpxReqChild.get_Tag(ReqPro40.enumTagFormat.eTagFormat_Tag) + ": " + rpxReqChild.Name,
                                  rpxReqChild.key, ReqTreeNode.eReqTreeNodeType.eTreeNodeReq);
                ParseReqChildren(rpxReqChild, tnReqNew);
                tn.Add(ref tnReqNew);
                rpxReqChildrenRelation.MoveNext();
            }
        }