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 BindInfoPresenter(IContentInfoPresenter pres) { if (_curPresenter != null) { _curPresenter.SyncContentInfoActions -= SyncContentInfoActionsHandler; _curPresenter.SyncStatusInfo -= SyncStatusInfoHandler; _curPresenter.SyncZoomLevel -= SyncZoomLevelHandler; } _curPresenter = pres; if (_curPresenter != null) { _curPresenter.SyncContentInfoActions += SyncContentInfoActionsHandler; _curPresenter.SyncStatusInfo += SyncStatusInfoHandler; _curPresenter.SyncZoomLevel += SyncZoomLevelHandler; } }