private void OnShowRelatedNodesRequested(RelatedNodeMiniButtonViewModel ownerButton, IReadOnlyList <IModelNode> modelNodes)
        {
            switch (modelNodes.Count)
            {
            case 0:
                return;

            case 1:
                ShowModelItemsRequested?.Invoke(modelNodes, followNewDiagramNodes: true);
                break;

            default:
                HideRelatedNodeListBox();
                ShowModelItemsRequested?.Invoke(modelNodes, followNewDiagramNodes: true);
                break;
            }
        }
예제 #2
0
        private void OnShowRelatedEntitiesRequested(ShowRelatedNodeButtonViewModel diagramNodeButtonViewModel, IReadOnlyList <IModelEntity> modelEntities)
        {
            switch (modelEntities.Count)
            {
            case 0:
                return;

            case 1:
                var diagramNodes = Diagram.ShowModelItems(modelEntities).OfType <IDiagramNode>().ToArray();
                FollowDiagramNodes(diagramNodes);
                break;

            default:
                HideRelatedEntityListBox();
                ShowModelItemsRequested?.Invoke(modelEntities);
                break;
            }
        }
 private void OnRelatedNodeSelected(IModelNode modelNode)
 {
     StopFollowingDiagramNodes();
     ShowModelItemsRequested?.Invoke(new[] { modelNode }, followNewDiagramNodes: false);
 }
예제 #4
0
 private void SubscribeToDiagramViewModelEvents(DiagramViewModel diagramViewModel)
 {
     diagramViewModel.ShowSourceRequested     += i => ShowSourceRequested?.Invoke(i);
     diagramViewModel.ShowModelItemsRequested += i => ShowModelItemsRequested?.Invoke(i);
 }
예제 #5
0
 private void OnRelatedNodeSelected(IRelatedNodeItemViewModel relatedNodeItemViewModel)
 {
     StopFollowingDiagramNodes();
     ShowModelItemsRequested?.Invoke(new[] { relatedNodeItemViewModel.Id }, followNewDiagramNodes: false);
 }