Esempio n. 1
0
        public virtual object Clone()
        {
            ShapeCollection shapeCollection = new ShapeCollection();

            foreach (IShape current in this)
            {
                shapeCollection.Add(current.Clone() as IShape);
            }
            return(shapeCollection);
        }
Esempio n. 2
0
        public static ShapeCollection GetSelectedShapes(ShapeCollection shapes)
        {
            ShapeCollection shapeCollection = new ShapeCollection();

            foreach (IShape current in shapes)
            {
                if (current.Selected)
                {
                    shapeCollection.Add(current);
                }
            }
            return(shapeCollection);
        }