public PixelHistoryEventViewModel(TracefileEvent tracefileEvent)
			: base(tracefileEvent)
		{
			_pixelHistoryEvents = tracefileEvent.PixelEvents.Select<PixelEvent, PixelHistoryEventViewModelBase>(x =>
			{
				if (x is SimpleEvent)
					return new SimplePixelHistoryEventViewModel((SimpleEvent) x);
				if (x is DrawEvent)
					return new DrawPixelHistoryEventViewModel((DrawEvent) x);
				throw new ArgumentOutOfRangeException();
			}).ToList();
            
            _result = (_pixelHistoryEvents.LastOrDefault(x => x.Result is ColorResultViewModel) ?? _pixelHistoryEvents.Last()).Result;
		}
예제 #2
0
		public Replayer(TracefileFrame frame, TracefileEvent lastEvent, 
			ISwapChainPresenter swapChainPresenter, 
            int? renderTargetViewID = null, int? renderTargetArrayIndex = null,
            int? pixelX = null, int? pixelY = null)
		{
			_frame = frame;
			_lastEvent = lastEvent;
		    _swapChainPresenter = swapChainPresenter;
		    _device = new Device();
		    _deviceContext = _device.ImmediateContext;
            _logger = new TracefileBuilder(_device, 
                renderTargetViewID, renderTargetArrayIndex, 
                pixelX, pixelY);
		}
		public TracefileEventViewModel(TracefileEvent tracefileEvent)
		{
			_tracefileEvent = tracefileEvent;
		}