예제 #1
0
 public CompositeTransformer(CompositeShape shape) : base(shape)
 {
     if (shape == null)
     {
         throw new ApplicationException();
     }
     this._shape = shape;
 }
예제 #2
0
 public CompositeShape(CompositeShape compositeShape) : base(compositeShape)
 {
     base.Transformer                   = new CompositeTransformer(this);
     this._shapes.InsertedItem         += new ShapeCollection.OnInsertedItem(this._shapes_InsertedItem);
     this._shapes.RemovedItem          += new ShapeCollection.OnRemovedItem(this._shapes_RemovedItem);
     base.Transformer.MovementOccurred += new MovementHandler(this.Transformer_MovementOccurred);
     base.Geometric.Reset();
     foreach (IShape current in compositeShape.Shapes)
     {
         this._shapes.Add(current.Clone() as IShape);
     }
 }