Esempio 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));
        }
Esempio n. 3
0
 public override IContextMenu CreateFor(RootNode proteinsNode, IMoleculesPresenter moleculesPresenter)
 {
     return(new EnzymesContextMenu(moleculesPresenter));
 }
Esempio n. 4
0
 public abstract IContextMenu CreateFor(RootNode proteinsNode, IMoleculesPresenter presenter);
Esempio n. 5
0
 public TransportersContextMenu(IMoleculesPresenter presenter)
     : base(presenter, PKSimConstants.UI.AddTransportProtein, ApplicationIcons.Transporter)
 {
 }
Esempio n. 6
0
 public OtherProteinsContextMenu(IMoleculesPresenter presenter)
     : base(presenter, PKSimConstants.UI.AddSpecificBindingPartner, ApplicationIcons.Protein)
 {
 }
Esempio n. 7
0
 public EnzymesContextMenu(IMoleculesPresenter presenter)
     : base(presenter, PKSimConstants.UI.AddMetabolizingEnzyme, ApplicationIcons.Enzyme)
 {
 }
Esempio n. 8
0
 protected IndividualMoleculesContextMenu(IMoleculesPresenter presenter, string addProteinCaption, ApplicationIcon addProteinIcon)
 {
     _addProteinCaption = addProteinCaption;
     _addProteinIcon    = addProteinIcon;
     allMenuItemsFor(presenter).Each(_view.AddMenuItem);
 }
Esempio n. 9
0
 public override IContextMenu CreateFor(RootNode proteinsNode, IMoleculesPresenter presenter)
 {
     return(new TransportersContextMenu(presenter));
 }
Esempio n. 10
0
 public void AttachPresenter(IMoleculesPresenter presenter)
 {
     _presenter = presenter;
 }