Exemple #1
0
        public BouncingBallRenderer(BouncingBall ball, int ballNo, Canvas theCanvas)
        {
            _drawers = new List <IShapeDrawer <UIElement> >();

            Ellipse ellipProto = new Ellipse
            {
                Stroke          = new SolidColorBrush(Colors.Black),
                StrokeThickness = 2,
                Fill            = new SolidColorBrush(Colors.Green)
            };

            _drawers.Add(new BouncingBallDrawer(ball, ellipProto, true, 0, 0, ballNo * 2));
            _drawers.Add(new BouncingBallDrawerText(ball, ballNo, 0, 0, ballNo * 2 + 1));

            AttachToCanvas(theCanvas);
        }
Exemple #2
0
 public void Add(BouncingBall ball)
 {
     _balls.Add(ball);
 }