protected AppRunner(IDispatcher dispatcher, IUpdatablesService updatablesService, IApplicationStopwatch applicationStopwatch, IIoCFactory iocFactory) { this.dispatcher = dispatcher; this.updatablesService = updatablesService; this.applicationStopwatch = applicationStopwatch; Canvas = iocFactory.Create <ICanvas>(); }
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; }
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)); }; }