private async Task ShowPresentationAsync(IEnumerable <IEntity> entities, int index)
 {
     if (_presenter == null)
     {
         _presenter = GetPresenter();
         _presenter.View.Show(Application.Panel, DockState.Document);
     }
     else
     {
         _presenter.View.EnsureVisible();
     }
     await _presenter.ShowEntityAsync(entities.ToList(), index);
 }
        private PresentationPresenter GetPresenter()
        {
            if (_presenter != null)
            {
                return(_presenter);
            }

            _presenter = new PresentationPresenter(
                new PresentationView(), _selection, _imageLoader, _dialogView);
            _presenter.View.Text       = Strings.Presentation_Label;
            _presenter.View.CloseView += (s, args) =>
            {
                _presenter.Dispose();
                _presenter = null;
            };
            return(_presenter);
        }