Exemple #1
0
        public virtual object Clone()
        {
            ShapeCollection shapeCollection = new ShapeCollection();

            foreach (IShape current in this)
            {
                shapeCollection.Add(current.Clone() as IShape);
            }
            return(shapeCollection);
        }
Exemple #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);
        }