Exemple #1
0
        public void Reset(ISessionCircle sessionCircle, ISessionCircleList sessionCircles)
        {
            var position = sessionCircles.NonCollidingPoint(DefaultSize);

            sessionCircle.X = position.X;
            sessionCircle.Y = position.Y;
        }
Exemple #2
0
        public SessionDrawer(ISessionCircleFactory sessionCircleFactory, ISessionCircleList sessionCircles, ILineFactory lineFactory,
                             ICanvasWrapper canvas, ISessionDetail sessionDetail)
        {
            this.sessionCircleFactory = sessionCircleFactory;
            this.sessionCircles       = sessionCircles;
            this.lineFactory          = lineFactory;
            this.canvas        = canvas;
            this.sessionDetail = sessionDetail;

            this.canvas.OnMouseMove(MouseMove);
            this.canvas.OnMouseUp(EndMove);
        }
Exemple #3
0
        public ISessionCircle Create(SessionDto sessionDto, ISessionCircleList sessionCircles)
        {
            var position      = sessionCircles.NonCollidingPoint(DefaultSize);
            var sessionCirlce = new SessionCircle
            {
                Session = sessionDto,
                SpeedX  = GlobalRandom.Instance.Next(-1, 2),
                SpeedY  = GlobalRandom.Instance.Next(-1, 2),
                X       = position.X,
                Y       = position.Y,
                Size    = DefaultSize,
            };

            sessionCirlce.OnMouseOver(circle => sessionTooltip.ShowSummary(circle.Session));
            sessionCirlce.OnMouseLeave(circle => sessionTooltip.HideSummary(circle.Session));

            return(sessionCirlce);
        }