Ejemplo n.º 1
0
        public void LoadDisplay(TabGraphicPageControl tabdisplaypagecontrol)
        {
            //GraphicsList graphicslist = new Draw.GraphicsList();
            Pages = new PageList(tabdisplaypagecontrol);


            foreach (tblBitmap tblbitmap in m_tblBitmapCollection)
            {
                DrawImage obj = new DrawImage(Pages);
                obj.Load(tblbitmap);
                Pages.GraphicPagesList[Pages.ActivePageNo].Add(obj);
            }
            foreach (tblADText tbladtext in m_tblADTextCollection)
            {
                DrawText obj = new DrawText(Pages);
                obj.Load(tbladtext);
                Pages.GraphicPagesList[Pages.ActivePageNo].Add(obj);
            }
            foreach (tblLine tblline in m_tblLineCollection)
            {
                DrawLine obj = new DrawLine(Pages);
                obj.Load(tblline);
                Pages.GraphicPagesList[Pages.ActivePageNo].Add(obj);
            }
            foreach (tblRect tblrect in m_tblRectCollection)
            {
                switch ((STATIC_OBJ_TYPE)tblrect.Type)
                {
                case STATIC_OBJ_TYPE.ID_ELLIPS:
                    DrawEllipse drawellipse = new DrawEllipse(Pages);
                    drawellipse.Load(tblrect);
                    Pages.GraphicPagesList[Pages.ActivePageNo].Add(drawellipse);
                    break;

                case STATIC_OBJ_TYPE.ID_ROUNDRECT:
                case STATIC_OBJ_TYPE.ID_RECT:
                    DrawRectangle drawrectangle = new DrawRectangle(Pages);
                    drawrectangle.Load(tblrect);
                    Pages.GraphicPagesList[Pages.ActivePageNo].Add(drawrectangle);
                    break;
                }
            }
            foreach (tblPolyline tblpolyline in m_tblPolylineCollection)
            {
                DrawPolyLine drawpolyline = new DrawPolyLine(Pages);
                drawpolyline.Load(tblpolyline);
                Pages.GraphicPagesList[Pages.ActivePageNo].Add(drawpolyline);
            }
            foreach (tblPolygon tblpolygon in m_tblPolygonCollection)
            {
                DrawPolygon drawpolygon = new DrawPolygon(Pages);
                drawpolygon.Load(tblpolygon);
                Pages.GraphicPagesList[Pages.ActivePageNo].Add(drawpolygon);
            }
            foreach (tblCurve tblcurve in m_tblCurveCollection)
            {
                DrawCurve drawcurve = new DrawCurve(Pages);
                drawcurve.Load(tblcurve);
                Pages.GraphicPagesList[Pages.ActivePageNo].Add(drawcurve);
            }
            Pages.GraphicPagesList[Pages.ActivePageNo].SortoIndex();
        }