/// <summary> /// Creates an IMenuBarButton that edits metadata on all the leaf nodes of type ObservedDataNode /// </summary> /// <param name="classificationNode">The node whose leaf nodes contain the observed data to be edited</param> /// <returns>The MenuBarButton</returns> public static IMenuBarButton EditMultipleMetaData(ITreeNode classificationNode) { var repositories = classificationNode.AllNodes <ObservedDataNode>().Select(x => x.Tag.Repository); return(CreateMenuButton.WithCaption(MenuNames.EditAllMetaData) .WithCommandFor <EditMultipleMetaDataUICommand, IEnumerable <DataRepository> >(repositories) .WithIcon(ApplicationIcons.Edit)); }
public override bool RemoveDataUnderClassification(ITreeNode <IClassification> classificationNode) { if (classificationNode.Tag.ClassificationType == ClassificationType.Simulation) { var allSimulations = classificationNode.AllNodes <SimulationNode>().Select(x => x.Tag.Simulation).ToList(); return(_buildingBlockTask.Delete(allSimulations)); } if (classificationNode.Tag.ClassificationType == ClassificationType.Comparison) { var allComparisons = classificationNode.AllNodes <ComparisonNode>().Select(x => x.Tag.Comparison).ToList(); return(_simulationComparisonTask.Delete(allComparisons)); } return(_parameterAnalysablesInExplorerPresenter.RemoveDataUnderClassification(classificationNode)); }
public override bool RemoveDataUnderClassification(ITreeNode <IClassification> classificationNode) { if (classificationNode.Tag.ClassificationType == ClassificationType.Simulation) { IReadOnlyList <IMoBiSimulation> allSimulations = classificationNode.AllNodes <SimulationNode>().Select(x => x.Tag.Simulation).ToList(); var command = _interactionTasksForSimulation.RemoveMultipleSimulations(allSimulations); _context.AddToHistory(command); return(!command.IsEmpty()); } return(_parameterAnalysablesInExplorerPresenter.RemoveDataUnderClassification(classificationNode)); }
public bool RemoveDataUnderClassification(ITreeNode <IClassification> classificationNode) { if (classificationNode.Tag.ClassificationType == ClassificationType.ParameterIdentification) { IReadOnlyList <ParameterIdentification> allParameterIdentifications = classificationNode.AllNodes <ParameterIdentificationNode>().Select(x => x.Tag.ParameterIdentification).ToList(); return(_parameterIdentificationTask.Delete(allParameterIdentifications)); } if (classificationNode.Tag.ClassificationType == ClassificationType.SensitiviyAnalysis) { IReadOnlyList <SensitivityAnalysis> allSensitivityAnalyses = classificationNode.AllNodes <SensitivityAnalysisNode>().Select(x => x.Tag.SensitivityAnalysis).ToList(); return(_sensitivityAnalysisTask.Delete(allSensitivityAnalyses)); } return(false); }
public bool RemoveObservedDataUnder(ITreeNode <IClassification> classificationNode) { var allObservedData = classificationNode.AllNodes <ObservedDataNode>().Select(x => x.Tag.Repository); return(_observedDataTask.Delete(allObservedData)); }