Beispiel #1
0
        public void BindController(IContentInfoPresenter controller)
        {
            if (_controller == controller)
            {
                return;
            }

            if (_controller != null)
            {
                _controller.SyncContentInfoActions -= SyncActionsHandler;
                _controller.SyncStatusInfo         -= SyncStatusInfoHandler;
                _controller.SyncZoomLevel          -= SyncZoomHandler;
            }

            _controller = controller;

            if (_controller != null)
            {
                _controller.SyncContentInfoActions += SyncActionsHandler;
                _controller.SyncStatusInfo         += SyncStatusInfoHandler;
                _controller.SyncZoomLevel          += SyncZoomHandler;

                _controller.RefreshContentInfo();
            }
            else
            {
                ResetComponent();
            }
        }
 public void RefreshContentInfo()
 {
     if (_curPresenter != null)
     {
         _curPresenter.RefreshContentInfo();
     }
     else
     {
         OnSyncContentInfoActions(EventArgs.Empty);
         OnSyncStatusInfo(EventArgs.Empty);
         OnSyncZoomLevel(EventArgs.Empty);
     }
 }
Beispiel #3
0
        public void BindController(IContentInfoPresenter controller)
        {
            if (_controller == controller) {
                return;
            }

            if (_controller != null) {
                _controller.SyncContentInfoActions -= SyncActionsHandler;
                _controller.SyncStatusInfo -= SyncStatusInfoHandler;
                _controller.SyncZoomLevel -= SyncZoomHandler;
            }

            _controller = controller;

            if (_controller != null) {
                _controller.SyncContentInfoActions += SyncActionsHandler;
                _controller.SyncStatusInfo += SyncStatusInfoHandler;
                _controller.SyncZoomLevel += SyncZoomHandler;

                _controller.RefreshContentInfo();
            }
            else {
                ResetComponent();
            }
        }