public bool IsSatisfiedBy(IViewItem objectRequestingContextMenu, IPresenterWithContextMenu <IViewItem> presenter)
 {
     if (objectRequestingContextMenu == null && presenter.IsAnImplementationOf <IEventGroupListPresenter>())
     {
         return(true);
     }
     if (objectRequestingContextMenu.IsAnImplementationOf <EventGroupBuilderDTO>())
     {
         return(true);
     }
     return(false);
 }
        public IContextMenu CreateFor(IViewItem viewItem, IPresenterWithContextMenu <IViewItem> presenter)
        {
            IContextMenuFor contextMenu;

            if (viewItem == null || !viewItem.IsAnImplementationOf <ApplicationBuilderDTO>())
            {
                contextMenu = IoC.Resolve <ContextMenuForEventGroupBuilder>();
            }
            else
            {
                contextMenu = IoC.Resolve <ContextMenuForApplicationBuilder>();
            }


            return(contextMenu.InitializeWith(viewItem as EventGroupBuilderDTO, presenter));
        }
Example #3
0
 public bool IsSatisfiedBy(IViewItem objectRequestingContextMenu, IPresenterWithContextMenu <IViewItem> presenter)
 {
     return(presenter.IsAnImplementationOf <IDescriptorConditionListPresenter>() &&
            (objectRequestingContextMenu.IsAnImplementationOf <DescriptorConditionDTO>() ||
             objectRequestingContextMenu.IsAnImplementationOf <IRootViewItem <DescriptorConditionDTO> >()));
 }
Example #4
0
 public bool IsSatisfiedBy(IViewItem viewItem, IPresenterWithContextMenu <IViewItem> presenter)
 {
     return((viewItem == null || viewItem.IsAnImplementationOf <ReactionPartnerBuilderDTO>()) &&
            presenter.IsAnImplementationOf <IReactionProductsPresenter>());
 }
Example #5
0
 public bool IsSatisfiedBy(IViewItem objectRequestingContextMenu, IPresenterWithContextMenu <IViewItem> presenter)
 {
     return(objectRequestingContextMenu.IsAnImplementationOf <TransportBuilderDTO>() && presenter.IsAnImplementationOf <TPresenter>());
 }
Example #6
0
 public bool IsSatisfiedBy(IViewItem objectRequestingContextMenu, IPresenterWithContextMenu <IViewItem> presenter)
 {
     return((objectRequestingContextMenu == null && presenter.IsAnImplementationOf <IEditApplicationBuilderPresenter>()) ||
            objectRequestingContextMenu.IsAnImplementationOf <ApplicationMoleculeBuilderDTO>());
 }
Example #7
0
 public bool IsSatisfiedBy(IViewItem viewItem, IPresenterWithContextMenu <IViewItem> presenter)
 {
     return(viewItem.IsAnImplementationOf <IRootViewItem <TChild> >());
 }