public void BindController(ITilePoolListPresenter controller) { if (_controller == controller) { return; } if (_controller != null) { _controller.SyncTilePoolManager -= SyncTilePoolManagerHandler; _controller.SyncTilePoolList -= SyncTilePoolListHandler; _controller.SyncTilePoolControl -= SyncTilePoolControlHandler; _controller.SelectedTilePoolChanged -= SelectedTilePoolChangedHandler; } _controller = controller; if (_controller != null) { _controller.SyncTilePoolManager += SyncTilePoolManagerHandler; _controller.SyncTilePoolList += SyncTilePoolListHandler; _controller.SyncTilePoolControl += SyncTilePoolControlHandler; _controller.SelectedTilePoolChanged += SelectedTilePoolChangedHandler; _commandController.BindCommandManager(_controller.CommandManager); BindTilePoolManager(_controller.TilePoolManager); BindTilePool(_controller.SelectedTilePool); } else { _commandController.BindCommandManager(null); BindTilePoolManager(null); BindTilePool(null); ResetComponent(); } RebuildPoolList(); }
public void BindTileController(ITilePoolListPresenter controller) { if (_tileController != null) { _tileController.SyncTilePoolList -= SyncTilePoolListHandler; } _tileController = controller; _tilePanel.BindController(controller); if (_tileController != null) { _tileController.SyncTilePoolList += SyncTilePoolListHandler; _layerControl.TextureCache.SourcePool = _tileController.TilePoolManager.TexturePool; } else { _layerControl.TextureCache.SourcePool = null; } InitializeTileSizeList(); }
public void BindTileController(ITilePoolListPresenter controller) { _tileController = controller; }
public void BindTilePoolController(ITilePoolListPresenter controller) { if (_tilePool != null) { _tilePool.TileSelectionChanged -= TileSelectionChangedHandler; } _tilePool = controller; if (_tilePool != null) { _tilePool.TileSelectionChanged += TileSelectionChangedHandler; } }