Beispiel #1
0
        protected AppRunner(IDispatcher dispatcher, IUpdatablesService updatablesService, IApplicationStopwatch applicationStopwatch, IIoCFactory iocFactory)
        {
            this.dispatcher           = dispatcher;
            this.updatablesService    = updatablesService;
            this.applicationStopwatch = applicationStopwatch;

            Canvas = iocFactory.Create <ICanvas>();
        }
Beispiel #2
0
        public GesturesService(IInputPanel inputPanel, IUpdatablesService updatablesService)
        {
            updatablesService.Register(this);

            inputPanel.PointerDown += InputPanel_PointerDown;
            inputPanel.PointerMove += InputPanel_PointerMove;
            inputPanel.PointerLost += InputPanel_PointerLost;
            inputPanel.PointerUp   += InputPanel_PointerUp;
            inputPanel.MouseWheel  += InputPanel_MouseWheel;
        }
Beispiel #3
0
        public WpfAppRunner(SKElement skElement, IDispatcher dispatcher, IUpdatablesService updatablesService, IInputPanel inputPanel, IApplicationStopwatch applicationStopwatch, IIoCFactory iocFactory)
            : base(dispatcher, updatablesService, applicationStopwatch, iocFactory)
        {
            winDispatcher  = skElement.Dispatcher;
            this.skElement = skElement;

            skElement.PaintSurface += (o, args) =>
            {
                inputPanel.Scale = new Vector2((float)(args.Info.Width / skElement.ActualWidth),
                                               (float)(args.Info.Height / skElement.ActualHeight));

                OnRender(args.Surface.Canvas, new Size(args.Info.Width, args.Info.Height));
            };
        }