コード例 #1
0
 private IEnumerable <IMenuBarItem> allMenuItemsFor(IMoleculesPresenter presenter)
 {
     yield return
         (CreateMenuButton.WithCaption(_addProteinCaption)
          .WithActionCommand(presenter.AddMolecule <TMolecule>)
          .WithIcon(_addProteinIcon));
 }
コード例 #2
0
        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));
        }
コード例 #3
0
 public override IContextMenu CreateFor(RootNode proteinsNode, IMoleculesPresenter moleculesPresenter)
 {
     return(new EnzymesContextMenu(moleculesPresenter));
 }
コード例 #4
0
 public abstract IContextMenu CreateFor(RootNode proteinsNode, IMoleculesPresenter presenter);
コード例 #5
0
 public TransportersContextMenu(IMoleculesPresenter presenter)
     : base(presenter, PKSimConstants.UI.AddTransportProtein, ApplicationIcons.Transporter)
 {
 }
コード例 #6
0
 public OtherProteinsContextMenu(IMoleculesPresenter presenter)
     : base(presenter, PKSimConstants.UI.AddSpecificBindingPartner, ApplicationIcons.Protein)
 {
 }
コード例 #7
0
 public EnzymesContextMenu(IMoleculesPresenter presenter)
     : base(presenter, PKSimConstants.UI.AddMetabolizingEnzyme, ApplicationIcons.Enzyme)
 {
 }
コード例 #8
0
 protected IndividualMoleculesContextMenu(IMoleculesPresenter presenter, string addProteinCaption, ApplicationIcon addProteinIcon)
 {
     _addProteinCaption = addProteinCaption;
     _addProteinIcon    = addProteinIcon;
     allMenuItemsFor(presenter).Each(_view.AddMenuItem);
 }
コード例 #9
0
 public override IContextMenu CreateFor(RootNode proteinsNode, IMoleculesPresenter presenter)
 {
     return(new TransportersContextMenu(presenter));
 }
コード例 #10
0
ファイル: MoleculesView.cs プロジェクト: valdiman/PK-Sim
 public void AttachPresenter(IMoleculesPresenter presenter)
 {
     _presenter = presenter;
 }