Exemplo n.º 1
0
 private IEnumerable <IMenuBarItem> allMenuItemsFor(IMoleculesPresenter presenter)
 {
     yield return
         (CreateMenuButton.WithCaption(_addProteinCaption)
          .WithActionCommand(presenter.AddMolecule <TMolecule>)
          .WithIcon(_addProteinIcon));
 }
        private IEnumerable <IMenuBarItem> allMenuItemsFor(IMoleculesPresenter presenter)
        {
            yield return
                (CreateMenuButton.WithCaption(PKSimConstants.MenuNames.AddProteinDefault(_addProteinCaption))
                 .WithActionCommand(presenter.AddDefaultMolecule <TMolecule>)
                 .WithIcon(_addProteinIcon));

            var databaseEnabled = presenter.QueryConfigurationEnabled;

            yield return
                (CreateMenuButton.WithCaption(PKSimConstants.MenuNames.AddProteinQuery(_addProteinCaption, databaseEnabled))
                 .WithActionCommand(presenter.AddMolcule <TMolecule>)
                 .WithEnabled(databaseEnabled)
                 .WithIcon(_addProteinIcon));
        }
Exemplo n.º 3
0
 public override IContextMenu CreateFor(RootNode proteinsNode, IMoleculesPresenter moleculesPresenter)
 {
     return(new EnzymesContextMenu(moleculesPresenter));
 }
Exemplo n.º 4
0
 public abstract IContextMenu CreateFor(RootNode proteinsNode, IMoleculesPresenter presenter);
Exemplo n.º 5
0
 public TransportersContextMenu(IMoleculesPresenter presenter)
     : base(presenter, PKSimConstants.UI.AddTransportProtein, ApplicationIcons.Transporter)
 {
 }
Exemplo n.º 6
0
 public OtherProteinsContextMenu(IMoleculesPresenter presenter)
     : base(presenter, PKSimConstants.UI.AddSpecificBindingPartner, ApplicationIcons.Protein)
 {
 }
Exemplo n.º 7
0
 public EnzymesContextMenu(IMoleculesPresenter presenter)
     : base(presenter, PKSimConstants.UI.AddMetabolizingEnzyme, ApplicationIcons.Enzyme)
 {
 }
Exemplo n.º 8
0
 protected IndividualMoleculesContextMenu(IMoleculesPresenter presenter, string addProteinCaption, ApplicationIcon addProteinIcon)
 {
     _addProteinCaption = addProteinCaption;
     _addProteinIcon    = addProteinIcon;
     allMenuItemsFor(presenter).Each(_view.AddMenuItem);
 }
Exemplo n.º 9
0
 public override IContextMenu CreateFor(RootNode proteinsNode, IMoleculesPresenter presenter)
 {
     return(new TransportersContextMenu(presenter));
 }
Exemplo n.º 10
0
 public void AttachPresenter(IMoleculesPresenter presenter)
 {
     _presenter = presenter;
 }