public void BindController(TileBrushManagerPresenter 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 Bind(TileBrushManagerPresenter controller) { if (_tileBrushController != null) { _tileBrushController.TileBrushSelected -= TileBrushSelectedHandler; } _tileBrushController = controller; if (_tileBrushController != null) { _tileBrushController.TileBrushSelected += TileBrushSelectedHandler; } }
public void BindTileBrushManager(TileBrushManagerPresenter controller) { if (_brushManager != null) { _brushManager.TileBrushSelected -= TileBrushSelectedHandler; } _brushManager = controller; if (_brushManager != null) { _brushManager.TileBrushSelected += TileBrushSelectedHandler; } }