Exemplo n.º 1
0
        private PageReport PaintInvalid(Page page,PageReport report,string mode)
        {
            int invalidCount=0;
            Hashtable shapeHandlers=new Hashtable();
            CgoConfig[] Cgo=CgoConfigs.Search();

            GroupElementTable groupElementTable=new GroupElementTable();
            ElementTable elementTable=new ElementTable();

            foreach(Shape shape in page.Shapes)
            {
                string shapeName=VisioUtils.GetProperty(shape,"User","ScreenShape");
                if(shapeName==null)
                    continue;

                IShapeHandler shapeHandler=GetShapeHandler(shapeHandlers,shape,shapeName,mode);
                if(shape.Data1==_INVALID)
                {
                    shapeHandler.PaintAsInvalid();
                }
                else
                {
                    if(Cgo!=null)
                    {
                        XmlNode shapeProperties=shapeHandler.GetProperties();
                        XmlNode cgoNode=shapeProperties.SelectSingleNode("cgoName");
                        if(cgoNode!=null)
                        {
                            string cgoCode=cgoNode.InnerText;
                            if(!CgoConfigs.Exists(Cgo,cgoCode))
                            {
                            }
                        }
                    }
                }
                invalidCount++;

                string groupElementName=VisioUtils.GetProperty(shape,"Prop","Group");
                string elementName=VisioUtils.GetProperty(shape,"Prop","Element");
                if((groupElementName==null)||(elementName==null))
                    continue;

                GroupElement groupElement=new GroupElement(groupElementName);
                groupElementTable.AddGroupElement(groupElement);

                Element element=new Element(elementName);
                elementTable.AddElement(element);
            }
            report=ShapeGroupValidation.Validate(groupElementTable,elementTable,report);

            return report;
        }
Exemplo n.º 2
0
 /// <summary>
 /// 
 /// </summary>
 public void AddElement(Element element)
 {
     bool found=false;
     for(int i=0;i<this._elementTable.Count;i++)
     {
         Element iterator=(Element)this._elementTable[i];
         if(iterator.ToString()==element.ToString())
         {
             iterator.AddCount(1);
             found=true;
             i=this._elementTable.Count;
         }
     }
     if(found==false)
     {
         this._elementTable.Add(element);
     }
 }