private void SelectTilePool(Guid poolUid) { if (_selectedPool == poolUid) return; if (poolUid == null || !_tilePoolPresenters.ContainsKey(poolUid)) { _selectedPool = Guid.Empty; _selectedPoolRef = null; _commandManager.Invalidate(CommandKey.TilePoolProperties); return; } _selectedPool = poolUid; _selectedPoolRef = _tilePoolPresenters[poolUid]; _commandManager.Invalidate(CommandKey.TilePoolProperties); OnSelectedTilePoolChanged(EventArgs.Empty); }
private void AddPoolPresenter(TilePool pool) { TilePoolPresenter presenter = new TilePoolPresenter(pool); presenter.SelectedTileChanged += SelectedTileChanged; _tilePoolPresenters[pool.Uid] = presenter; }
private void ClearPoolPresenters() { foreach (TilePoolPresenter presenter in _tilePoolPresenters.Values) presenter.Dispose(); _tilePoolPresenters.Clear(); _selectedPool = Guid.Empty; _selectedPoolRef = null; }
private void BindTilePool(TilePoolPresenter tilePool) { if (_tilePool != null) { _tilePool.LevelGeometry = null; } if (_layerControl.RootLayer != null) { _layerControl.RootLayer.Dispose(); _layerControl.RootLayer = null; } _tilePool = tilePool; if (_tilePool != null) { _tilePool.LevelGeometry = _layerControl.LevelGeometry; _root = new GroupLayer(tilePool.RootLayer); _layerControl.RootLayer = _root; //_pointerController.Responder = tilePool.PointerEventResponder; _pointerController.Responder = new LocalPointerEventResponder(this, tilePool.PointerEventResponder); } else { _root = null; _pointerController.Responder = null; } }