Esempio n. 1
0
        public StructArrow(IFigure figure)
        {
            AbstractArrow arrow = (AbstractArrow)figure;

            Type   = arrow.GetType().FullName;
            Color  = arrow.GetColor();
            Width  = arrow.GetWidth();
            Points = new List <IPoint>();
            for (int i = 0; i < arrow.Points.Count; i++)
            {
                StructPoints structPoints = new StructPoints(arrow.Points[i]);
                Points.Add(structPoints);
            }
            Data = new List <IDataCommon>();
            for (int i = 0; i < arrow.DataCommon.Count; i++)
            {
                StructDataCommon structData = new StructDataCommon(arrow.DataCommon[i]);
                Data.Add(structData);
            }
        }
Esempio n. 2
0
        public StructBox(IFigure figure)
        {
            AbstractBox box = (AbstractBox)figure;

            Type     = box.GetType().FullName;
            DataText = box.DataText;
            Font     = box.GetFont();
            Color    = box.GetColor();
            Width    = box.GetWidth();
            Points   = new List <IPoint>();
            for (int i = 0; i < box.Points.Count; i++)
            {
                StructPoints structPoints = new StructPoints(box.Points[i]);
                Points.Add(structPoints);
            }
            Data = new List <IDataCommon>();
            for (int i = 0; i < box.DataCommon.Count; i++)
            {
                StructDataCommon structData = new StructDataCommon(box.DataCommon[i]);
                Data.Add(structData);
            }
        }