public BallPresenter(IInfrastructureFactory infrastructureFactory, IScreenSize screenSize, IElementSize elementSize) { _elementSize = elementSize; _view = infrastructureFactory.Cteate(Data.Enum.Infrastructure.Ball) as IBallView; screenSize.ChangeSizeEvent += ChangeScreenSize; }
public BorderPresenter(IInfrastructureFactory infrastructureFactory, IBorder border, IScreenSize screenSize) { _border = border; _view = infrastructureFactory.Cteate(Data.Enum.Infrastructure.Border) as ISceneBorderView; screenSize.ChangeSizeEvent += ChangeSizeEventHandler; ChangeSizeEventHandler(screenSize.Size); }
public BottomPresenter(IInfrastructureFactory infrastructureFactory, IBottom bottom, IScreenSize screenSize) { _view = infrastructureFactory.Cteate(Data.Enum.Infrastructure.Bottom) as IBottomView; _model = bottom; _view.ViewEvent += ViewEventHandler; screenSize.ChangeSizeEvent += ChangeSizeEventHandler; ChangeSizeEventHandler(screenSize.Size); _bottomEventActions = new Dictionary <string, Action>() { { BottomEvent.ButtonDown, () => _model.StartDrag() }, { BottomEvent.Drag, () => _view.SetIncline(_model.Drag()) }, { BottomEvent.ButtonUp, () => _model.EndDrag() } }; }