예제 #1
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 OnShowRelatedEntitiesRequested(ShowRelatedNodeButtonViewModel diagramNodeButtonViewModel, IReadOnlyList <IModelEntity> modelEntities)
 => ShowRelatedEntitiesRequested?.Invoke(diagramNodeButtonViewModel, modelEntities);
 public override void Hide()
 {
     OwnerButton = null;
     base.Hide();
 }
예제 #4
0
 private void OnShowRelatedEntitySelectorRequested(ShowRelatedNodeButtonViewModel diagramNodeButtonViewModel, IEnumerable <IModelEntity> modelEntities)
 {
     DiagramViewportViewModel.PinDecoration();
     RelatedEntityListBoxViewModel.Show(diagramNodeButtonViewModel, modelEntities);
 }
 public void Show(ShowRelatedNodeButtonViewModel ownerButton, IEnumerable <IModelEntity> items)
 {
     base.Show(items);
     OwnerButton = ownerButton;
 }