public MissionItemVm(HyperMission mission, IHyperArgsSink store) { Mission = mission; HyperStore = store; ClearCommandWarning.AsyncDelegate = OnClearCommandWarningAsync; ClearCommand.AsyncDelegate = OnClearCommandAsync; LoadCommand.Delegate = OnLoadCommand; UnloadCommand.AsyncDelegate = OnUnloadCommandAsync; }
void OnRemovePhase(DefaultCommand command, object parameter) { var phaseModel = this.SelectedPhaseProp.Value; HyperMission mission = this.Mission; if (mission == null || phaseModel == null) { return; } mission.Phases.Remove(phaseModel); }
public async Task InitDataAsync(CrossModuleVisualizationRequest crossModuleVisualizationRequest = null) { if (_netStore != null) { var findArgs = new FindHyperDocumentsArgs(typeof(HyperTag)) { Skip = 0, Limit = 5000 // TODO: This is limited for faster testing. Consider to increase the value }; if (crossModuleVisualizationRequest != null && crossModuleVisualizationRequest.MetadataSetDocIds != null && crossModuleVisualizationRequest.MetadataSetDocIds.Any()) { var metadataSetId = crossModuleVisualizationRequest.MetadataSetDocIds.FirstOrDefault(); Logger.Instance.PriorityInfo($"Meta data set id retrieved: {metadataSetId}"); MetadataSet = await RetrieveHyperDocumentArgs.RetrieveAsync <HyperMetadataSet>(_netStore, metadataSetId); await ApplyFilterConditions(findArgs, MetadataSet); Mission = await LoadMission(MetadataSet); } var docs = await _netStore.ExecuteAsync(findArgs) ?? new HyperDocument[0]; _allTags = docs.Select(x => x.GetPayload <HyperTag>()).ToList(); PopulateCharts(); IsLoadedData = true; } else { Logger.Instance.Error("NetStore is null"); } }