public RenderAction(DxRender.DxDeviceContext devices, DxRender.IDxRenderer render, States states, IOnTickActionContext context) : this(devices, render, states) { }
public IOnTickActionContext DisposeAndExportContext() { IOnTickActionContext res = _context; _context = null; Dispose(); return(res); }
public SimResultsLoadingAction(States states, IOnTickActionContext context) { _states = states; _context = context as Context; foreach (var provider in _context.StateProviders) { _states.RegisterStateProvider(provider); } }
public GuiEventProcessingAction(DxRender.DxDeviceContext devices, States states, IOnTickActionContext context) { _devices = devices; _states = states; _context = context as Context; foreach (IStateProvider provider in _context.StateProviders) { _states.RegisterStateProvider(provider); } }
public SelectAction(DxRender.DxDeviceContext devices, DxRender.IDxRenderer render, States states, IOnTickActionContext context) { _context = context as Context; _devices = devices; _render = render; _states = states; _rtAspect = new Mitosis.DxRender.TextureRenderTargetAspect(_devices, _devices.FrameWidth, _devices.FrameHeight); _stAspect = new Mitosis.DxRender.ObjectSelectingStyleAspect(); _renderContext = new Mitosis.DxRender.DxRenderContext(_stAspect, _rtAspect); foreach (var stateProvider in _context.StateProviders) { _states.RegisterStateProvider(stateProvider); } }
private void SafeRecreate() { IOnTickActionContext srlActionContext = _srlAction.DisposeAndExportContext(); IOnTickActionContext gepActionContext = _gepAction.DisposeAndExportContext(); IOnTickActionContext rActionContext = _rAction.DisposeAndExportContext(); IOnTickActionContext cActionContext = _cAction.DisposeAndExportContext(); IOnTickActionContext sActionContext = _sAction.DisposeAndExportContext(); IOnTickActionContext spfActionContext = _spfAction.DisposeAndExportContext(); _states.RemoveStateProviders(); _render.Dispose(); _devices.Dispose(); _devices = new Mitosis.DxRender.DxDeviceContext(_owner.Handle, _renderArea, false); _render = new DxRender.GeometricDxRenderer(_devices); _srlAction = new SimResultsLoadingAction(_states, srlActionContext); _gepAction = new GuiEventProcessingAction(_devices, _states, gepActionContext); _rAction = new RenderAction(_devices, _render, _states, rActionContext); if (_recreateSavers) { cActionContext.Dispose(); _cAction = new CaptureAction(_devices, _render, _states, SettingsManager.GetRef().CaptureSettings); } else { _cAction = new CaptureAction(_devices, _render, _states, cActionContext); } _sAction = new SelectAction(_devices, _render, _states, sActionContext); _spfAction = new SelectionPopupFormAction(_states, spfActionContext); if (!_states.IsInitialized) { throw new ApplicationException("Internal error - failed to register all state providers"); } }
public CaptureAction(DxRender.DxDeviceContext devices, DxRender.IDxRenderer render, States states, IOnTickActionContext context) { _states = states; _devices = devices; _render = render; _context = context as Context; _imageRttAspect = new DxRender.TextureRenderTargetAspect(devices, _context.ImageWidth, _context.ImageHeight); _imageRenderContext = new Mitosis.DxRender.DxRenderContext(new DxRender.DefaultStyleAspect(), _imageRttAspect); _videoRttAspect = new Mitosis.DxRender.TextureRenderTargetAspect(devices, _context.VideoWidth, _context.VideoHeight); _videoRenderContext = new Mitosis.DxRender.DxRenderContext(new DxRender.DefaultStyleAspect(), _videoRttAspect); foreach (IStateProvider stateProvider in _context.StateProviders) { _states.RegisterStateProvider(stateProvider); } }
public SelectionPopupFormAction(States states, IOnTickActionContext context) { _states = states; _context = context as Context; }