Exemplo n.º 1
0
        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);
        }
Exemplo n.º 2
0
        private void AddPoolPresenter(TilePool pool)
        {
            TilePoolPresenter presenter = new TilePoolPresenter(pool);
            presenter.SelectedTileChanged += SelectedTileChanged;

            _tilePoolPresenters[pool.Uid] = presenter;
        }
Exemplo n.º 3
0
        private void ClearPoolPresenters()
        {
            foreach (TilePoolPresenter presenter in _tilePoolPresenters.Values)
                presenter.Dispose();

            _tilePoolPresenters.Clear();
            _selectedPool = Guid.Empty;
            _selectedPoolRef = null;
        }
Exemplo n.º 4
0
        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;
            }
        }