public void Reset(ISessionCircle sessionCircle, ISessionCircleList sessionCircles) { var position = sessionCircles.NonCollidingPoint(DefaultSize); sessionCircle.X = position.X; sessionCircle.Y = position.Y; }
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); }
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); }