Beispiel #1
0
        /// <summary> 遍历文档指定Data的Item </summary>
        /// <param name="aTravEvent">每遍历到一个Item时触发的事件</param>
        /// <param name="aAreas">要遍历的Data</param>
        /// <param name="aTag">遍历标识</param>
        public void TraverseElement(TraverseItemEventHandle aTravEvent, HashSet <SectionArea> aAreas = null, int aTag = 0)
        {
            if (aTravEvent == null)
            {
                return;
            }

            HashSet <SectionArea> vArea = aAreas;

            if (vArea == null)
            {
                vArea = new HashSet <SectionArea>();
                vArea.Add(SectionArea.saHeader);
                vArea.Add(SectionArea.saFooter);
                vArea.Add(SectionArea.saPage);
            }
            else
            if (vArea.Count == 0)
            {
                return;
            }

            HCItemTraverse vItemTraverse = new HCItemTraverse();

            vItemTraverse.Tag     = aTag;
            vItemTraverse.Areas   = vArea;
            vItemTraverse.Process = aTravEvent;
            FEmrView.TraverseItem(vItemTraverse);

            FEmrView.FormatData();
        }