public void BindController(ITileBrushManagerPresenter controller) { if (_controller == controller) return; if (_controller != null) { _controller.SyncTileBrushManager -= SyncTileBrushManagerHandler; _controller.SyncTileBrushCollection -= SyncTileBrushCollectionHandler; _controller.SyncCurrentBrush -= SyncCurrentBrushHandler; } _controller = controller; if (_controller != null) { _controller.SyncTileBrushManager += SyncTileBrushManagerHandler; _controller.SyncTileBrushCollection += SyncTileBrushCollectionHandler; _controller.SyncCurrentBrush += SyncCurrentBrushHandler; _commandController.BindCommandManager(_controller.CommandManager); } else { _commandController.BindCommandManager(null); } }
public void BindTileBrushManager(ITileBrushManagerPresenter controller) { if (_brushManager != null) { _brushManager.TileBrushSelected -= TileBrushSelectedHandler; } _brushManager = controller; if (_brushManager != null) { _brushManager.TileBrushSelected += TileBrushSelectedHandler; } }