Пример #1
0
        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);
            }
        }
Пример #2
0
        public void Bind(TileBrushManagerPresenter controller)
        {
            if (_tileBrushController != null)
            {
                _tileBrushController.TileBrushSelected -= TileBrushSelectedHandler;
            }

            _tileBrushController = controller;

            if (_tileBrushController != null)
            {
                _tileBrushController.TileBrushSelected += TileBrushSelectedHandler;
            }
        }
Пример #3
0
        public void BindTileBrushManager(TileBrushManagerPresenter controller)
        {
            if (_brushManager != null) {
                _brushManager.TileBrushSelected -= TileBrushSelectedHandler;
            }

            _brushManager = controller;

            if (_brushManager != null) {
                _brushManager.TileBrushSelected += TileBrushSelectedHandler;
            }
        }