Example #1
0
        protected override void SetModelMenuItems(IContextMenuView contextMenuView, IContainerBase containerBase, IBaseNode node)
        {
            var container = Get <IContainer>(node.Id);

            contextMenuView.AddMenuItem(CreateMenuButton.WithCaption(AppConstants.MenuNames.AddNew(ObjectTypes.Container))
                                        .WithCommandFor <AddNewCommandFor <IContainer, IContainer>, IContainer>(container)
                                        .WithIcon(ApplicationIcons.ContainerAdd));

            contextMenuView.AddMenuItem(CreateMenuButton.WithCaption(AppConstants.MenuNames.AddExisting(ObjectTypes.Container))
                                        .WithCommandFor <AddExistingCommandFor <IContainer, IContainer>, IContainer>(container)
                                        .WithIcon(ApplicationIcons.ContainerLoad));

            contextMenuView.AddMenuItem(CreateMenuButton.WithCaption(AppConstants.MenuNames.AddNew(ObjectTypes.Parameter))
                                        .WithCommandFor <AddNewCommandFor <IContainer, IParameter>, IContainer>(container)
                                        .WithIcon(ApplicationIcons.Parameters));

            contextMenuView.AddMenuItem(CreateMenuButton.WithCaption(AppConstants.MenuNames.AddExisting(ObjectTypes.Parameter))
                                        .WithCommandFor <AddExistingCommandFor <IContainer, IParameter>, IContainer>(container)
                                        .WithIcon(ApplicationIcons.PKMLLoad));

            contextMenuView.AddMenuItem(CreateMenuButton.WithCaption(AppConstants.MenuNames.AddNew(ObjectTypes.DistributedParameter))
                                        .WithCommandFor <AddNewCommandFor <IContainer, IDistributedParameter>, IContainer>(container)
                                        .WithIcon(ApplicationIcons.ParameterDistribution));

            base.SetModelMenuItems(contextMenuView, containerBase, node);

            if (container.ParentContainer == null) // container is TopContainer
            {
                contextMenuView.RemoveMenuItem(AppConstants.MenuNames.Delete);
                contextMenuView.AddMenuItem(CreateMenuButton.WithCaption(AppConstants.MenuNames.Delete)
                                            .WithCommandFor <RemoveTopContainerCommand, IContainer>(Get <IContainer>(node.Id))
                                            .WithIcon(ApplicationIcons.Delete));
            }
        }
Example #2
0
 private IMenuBarItem createConfigure(IMoBiSimulation simulation)
 {
     return(CreateMenuButton.WithCaption(AppConstants.MenuNames.Configure)
            .WithIcon(ApplicationIcons.SimulationConfigure)
            .WithCommandFor <ConfigureSimulationUICommand, IMoBiSimulation>(simulation)
            .AsGroupStarter());
 }
Example #3
0
 private IMenuBarItem createExportODEForRItem(IMoBiSimulation simulation)
 {
     return(CreateMenuButton.WithCaption(MenuNames.AsDeveloperOnly(MenuNames.ExportODEForR))
            .WithCommandFor <ExportODEForRUICommand, IMoBiSimulation>(simulation)
            .WithIcon(ApplicationIcons.R)
            .ForDeveloper());
 }
Example #4
0
 private IMenuBarItem createDeleteItem(IMoBiSimulation simulation)
 {
     return(CreateMenuButton.WithCaption(AppConstants.MenuNames.Delete)
            .WithCommandFor <RemoveSimulationUICommand, IMoBiSimulation>(simulation)
            .WithIcon(ApplicationIcons.Delete)
            .AsGroupStarter());
 }
 protected override IEnumerable <IMenuBarItem> AllMenuItemsFor(SystemicProcessNodeType systemicProcessNodeType, ICompoundProcessesPresenter presenter)
 {
     yield return
         (CreateMenuButton.WithCaption(PKSimConstants.UI.AddPartialProcess(systemicProcessNodeType.Name))
          .WithActionCommand(() => presenter.AddSystemicProcess(systemicProcessNodeType.SystemicTypes))
          .WithIcon(systemicProcessNodeType.Icon));
 }
 protected override IEnumerable <IMenuBarItem> AllMenuItemsFor(ITreeNode nodeRequestingContextMenu, ICompoundProcessesPresenter presenter)
 {
     yield return
         (CreateMenuButton.WithCaption(PKSimConstants.UI.AddInhibitionProcess)
          .WithActionCommand(presenter.AddInhibitionProcess)
          .WithIcon(ApplicationIcons.Inhibition));
 }
Example #7
0
 private static IMenuBarItem loadSimulationFromSnapshot()
 {
     return(CreateMenuButton.WithCaption(PKSimConstants.MenuNames.AsDeveloperOnly("Load from Snapshot"))
            .WithCommand <LoadSimulationFromSnapshotUICommand>()
            .WithIcon(ApplicationIcons.SnapshotImport)
            .ForDeveloper());
 }
 private static IMenuBarButton scaleIndividualMenuFor(Individual individual)
 {
     return(CreateMenuButton.WithCaption(PKSimConstants.MenuNames.Scale)
            .WithIcon(ApplicationIcons.ScaleIndividual)
            .WithCommandFor <ScaleIndividualCommand, Individual>(individual)
            .AsGroupStarter());
 }
Example #9
0
 public ContextMenuForEmptyFormulaUsablePath(IEditFormulaPathListPresenter editFormulaPathListPresenter)
 {
     _allMenuItems = new List <IMenuBarItem> {
         CreateMenuButton.WithCaption(AppConstants.MenuNames.AddNew("Reference")).
         WithActionCommand(editFormulaPathListPresenter.CreateNewPath).
         WithIcon(ApplicationIcons.Add)
     };
 }
 public static IMenuBarButton SensitivityAnalysisFeedbackView(MenuBarItemId menuBarItemId)
 {
     return(CreateMenuButton.WithCaption(MenuNames.FeedbackView)
            .WithId(menuBarItemId)
            .WithCommand <SensitivityAnalysisFeedbackViewVisibilityUICommand>()
            .WithDescription(MenuDescriptions.SensitivityAnalysisFeedbackViewDescription)
            .WithIcon(ApplicationIcons.SensitivityAnalysisVisualFeedback));
 }
 public static IMenuBarItem CorrelationMatrixParameterIdentification(MenuBarItemId menuBarItemId)
 {
     return(CreateMenuButton.WithCaption(Captions.ParameterIdentification.CorrelationMatrix)
            .WithId(menuBarItemId)
            .WithCommand <StartCorrelationMatrixAnalysisUICommand>()
            .WithDescription(MenuDescriptions.CorrelationMatrix)
            .WithIcon(ApplicationIcons.CorrelationAnalysis));
 }
 public static IMenuBarItem ResidualHistogramParameterIdentification(MenuBarItemId menuBarItemId)
 {
     return(CreateMenuButton.WithCaption(Captions.ParameterIdentification.ResidualHistogramAnalysis)
            .WithId(menuBarItemId)
            .WithCommand <StartResidualHistogramParameterIdentificationAnalysisUICommand>()
            .WithDescription(MenuDescriptions.ResidualHistogramAnalysisDescription)
            .WithIcon(ApplicationIcons.ResidualHistogramAnalysis));
 }
 public static IMenuBarItem TimeProfileParameterIdentification(MenuBarItemId menuBarItemId)
 {
     return(CreateMenuButton.WithCaption(Captions.ParameterIdentification.TimeProfileAnalysis)
            .WithId(menuBarItemId)
            .WithCommand <StartTimeProfileParameterIdentificationAnalysisUICommand>()
            .WithDescription(MenuDescriptions.TimeProfileAnalysisDescription)
            .WithIcon(ApplicationIcons.TimeProfileAnalysis));
 }
 private IMenuBarItem createAddExistingInteractionContainerFor(IMoleculeBuilder moleculeBuilder)
 {
     return(CreateMenuButton.WithCaption(
                AppConstants.MenuNames.AddExisting(ObjectTypes.InteractionContainer))
            .WithCommandFor <AddExistingCommandFor <IMoleculeBuilder, InteractionContainer>, IMoleculeBuilder>(
                moleculeBuilder)
            .WithIcon(ApplicationIcons.PKMLLoad));
 }
Example #15
0
        protected override IMenuBarItem CreateRemoveItemFor(ITransportBuilder transportBuilder)
        {
            var buildingblock = _context.CurrentProject.PassiveTransportCollection.FirstOrDefault(x => x.Contains(transportBuilder));

            return(CreateMenuButton.WithCaption(AppConstants.MenuNames.Delete)
                   .WithRemoveCommand(buildingblock, transportBuilder)
                   .WithIcon(ApplicationIcons.Delete));
        }
 public static IMenuBarButton SaveFavoritesToFile(MenuBarItemId menuBarItemId)
 {
     return(CreateMenuButton.WithCaption(MenuNames.SaveFavoriteToFile)
            .WithId(menuBarItemId)
            .WithDescription(MenuDescriptions.SaveFavoritesToFile)
            .WithCommand <SaveFavoritesToFileUICommand>()
            .WithIcon(ApplicationIcons.FavoritesSave));
 }
 private IMenuBarItem exportParameterIdentificationToR(ParameterIdentification parameterIdentification)
 {
     return(CreateMenuButton.WithCaption(PKSimConstants.MenuNames.AsDeveloperOnly("Export for R®"))
            .WithCommandFor <ExportParameterIdentificationToRUICommand, ParameterIdentification>(parameterIdentification)
            .WithIcon(ApplicationIcons.R)
            .AsGroupStarter()
            .ForDeveloper());
 }
 protected override void SetLayoutMenuItems(IContextMenuView contextMenuView, IContainerBase containerBase)
 {
     AddTemplateLayoutMenuItems(contextMenuView, containerBase);
     AddAutoLayoutMenuItems(contextMenuView, containerBase);
     contextMenuView.AddMenuItem(SubMenuLayout);
     contextMenuView.AddMenuItem(CreateMenuButton.WithCaption("AutoLayout in layers")
                                 .WithActionCommand(() => Presenter.LayerLayout(containerBase)));
 }
 public static IMenuBarButton TimeProfileConfidenceInterval(MenuBarItemId menuBarItemId)
 {
     return(CreateMenuButton.WithCaption(Captions.ParameterIdentification.TimeProfileConfidenceIntervalAnalysis)
            .WithId(menuBarItemId)
            .WithCommand <StartTimeProfileConfidenceIntervalAnalysisUICommand>()
            .WithDescription(MenuDescriptions.TimeProfileConfidenceInterval)
            .WithIcon(ApplicationIcons.TimeProfileConfidenceInterval));
 }
Example #20
0
        private static IMenuBarButton comparisonNotPossibleMenu(IReadOnlyList <TBuildingBlock> buildingBlocks, IExecutionContext executionContext)
        {
            var buildingBlockType = executionContext.TypeFor(buildingBlocks[0]);

            return(CreateMenuButton.WithCaption(MenuNames.CompareObjects(executionContext.TypeFor(buildingBlocks[0])))
                   .WithIcon(ApplicationIcons.Comparison)
                   .WithActionCommand(() => throw new PKSimException(PKSimConstants.Error.ComparisonBetweenBuildingBLocksNotSupportedForBuildingBlockOfType(buildingBlockType))));
        }
 public static IMenuBarItem PredictedVsObservedParameterIdentification(MenuBarItemId menuBarItemId)
 {
     return(CreateMenuButton.WithCaption(Captions.ParameterIdentification.PredictedVsObservedAnalysis)
            .WithId(menuBarItemId)
            .WithCommand <StartPredictedVsObservedParameterIdentificationAnalysisUICommand>()
            .WithDescription(MenuDescriptions.PredictedVsObservedAnalysisDescription)
            .WithIcon(ApplicationIcons.PredictedVsObservedAnalysis));
 }
Example #22
0
        protected IMenuBarItem SaveAsUserTemplateMenuFor(IReadOnlyList <NamedBuildingBlock <TBuildingBlock> > buildingBlocks)
        {
            var buildingBlockList = buildingBlocks.Select(x => x.BuildingBlock).ToList();

            return(CreateMenuButton.WithCaption(PKSimConstants.MenuNames.SaveAsTemplate)
                   .WithCommandFor <SaveBuildingBlockAsTemplateCommand <TBuildingBlock>, IReadOnlyList <TBuildingBlock> >(buildingBlockList)
                   .WithIcon(ApplicationIcons.SaveAsTemplate));
        }
 public static IMenuBarItem ParameterIdentificationFeedbackView(MenuBarItemId menuBarItemId)
 {
     return(CreateMenuButton.WithCaption(MenuNames.FeedbackView)
            .WithId(menuBarItemId)
            .WithCommand <ParameterIdentificationFeedbackViewVisibilityUICommand>()
            .WithDescription(MenuDescriptions.ParameterIdentificationFeedbackViewDescription)
            .WithIcon(ApplicationIcons.ParameterIdentificationVisualFeedback));
 }
 public static IMenuBarButton LoadFavoritesFromFile(MenuBarItemId menuBarItemId)
 {
     return(CreateMenuButton.WithCaption(MenuNames.LoadFavoritesFromFile)
            .WithId(menuBarItemId)
            .WithDescription(MenuDescriptions.LoadFavoritesFromFile)
            .WithCommand <LoadFavoritesFromFileUICommand>()
            .WithIcon(ApplicationIcons.FavoritesLoad));
 }
Example #25
0
 private IMenuBarItem createStartPopulationSimulation(IMoBiSimulation simulation)
 {
     return(CreateMenuButton.WithCaption(AppConstants.MenuNames.StartPopulationSimualtion)
            .AsGroupStarter()
            .WithIcon(ApplicationIcons.PopulationSimulation)
            .WithCommandFor <SendSimulationToPKSimUICommand, IMoBiSimulation>(simulation)
            .AsGroupStarter());
 }
 public static IMenuBarButton ManageUserDisplayUnits(MenuBarItemId menuBarItemId)
 {
     return(CreateMenuButton.WithCaption(MenuNames.ManageUserDisplayUnits)
            .WithId(menuBarItemId)
            .WithDescription(ToolTips.ManageUserDisplayUnits)
            .WithIcon(ApplicationIcons.UserDisplayUnitsConfigure)
            .WithCommand <ManageUserDisplayUnitsUICommand>());
 }
 public static IMenuBarItem SensitivityAnalysisPKParameterAnalysis(MenuBarItemId menuBarItemId)
 {
     return(CreateMenuButton.WithCaption(Captions.SensitivityAnalysis.SensitivityAnalysisPKParameterAnalysis)
            .WithId(menuBarItemId)
            .WithDescription(Captions.SensitivityAnalysis.SensitivityAnalysisPKParameterAnalysisDescription)
            .WithIcon(ApplicationIcons.PKParameterSensitivityAnalysis)
            .WithCommand <StartSensitivityAnalysisUICommand>());
 }
 public static IMenuBarButton UpdateAllToDisplayUnits(MenuBarItemId menuBarItemId)
 {
     return(CreateMenuButton.WithCaption(MenuNames.UpdateAllToDisplaytUnits)
            .WithId(menuBarItemId)
            .WithDescription(ToolTips.UpdateAllToDisplayUnits)
            .WithIcon(ApplicationIcons.Refresh)
            .WithCommand <UpdateAllDisplayUnitsUICommand>());
 }
Example #29
0
        protected override IEnumerable <IMenuBarItem> AllMenuItemsFor(SystemicProcess systemicProcess, ICompoundProcessesPresenter presenter)
        {
            yield return(CreateMenuButton.WithCaption(PKSimConstants.MenuNames.Rename)
                         .WithActionCommand(() => presenter.RenameDataSourceInProcess(systemicProcess))
                         .WithIcon(ApplicationIcons.Rename));

            yield return(DeleteMenuFor(systemicProcess, presenter).AsGroupStarter());
        }
 public static IMenuBarItem JournalDiagramView(MenuBarItemId menuBarItemId)
 {
     return(CreateMenuButton.WithCaption(Captions.Journal.JournalDiagramView)
            .WithId(menuBarItemId)
            .WithDescription(Captions.Journal.JournalDiagramDescription)
            .WithCommand <JournalDiagramVisibilityUICommand>()
            .WithIcon(ApplicationIcons.JournalDiagram));
 }