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