Esempio n. 1
0
        private void AddNode(IDiagramNode diagramNode)
        {
            var diagramNodeUi = (DiagramNodeViewModel)DiagramShapeUiFactory.CreateDiagramNodeUi(diagramNode, MiniButtonManager);

            diagramNodeUi.HeaderSizeChanged            += OnDiagramNodeHeaderSizeChanged;
            diagramNodeUi.ShowRelatedNodesRequested    += OnShowRelatedNodesRequested;
            diagramNodeUi.RelatedNodeSelectorRequested += OnEntitySelectorRequested;
            diagramNodeUi.RemoveRequested += OnRemoveDiagramNodeRequested;

            _diagramNodeToViewModelMap.Set(diagramNode.Id, diagramNodeUi);
            DiagramNodeViewModels.Add(diagramNodeUi);
        }
Esempio n. 2
0
        private void AddNode(IDiagramNode diagramNode)
        {
            var diagramNodeViewModel = (DiagramNodeViewModel)DiagramShapeUiFactory.CreateDiagramNodeUi(diagramNode);

            diagramNodeViewModel.SizeChanged += OnDiagramNodeSizeChanged;
            diagramNodeViewModel.ChildrenAreaTopLeftChanged   += OnDiagramNodeChildrenAreaTopLeftChanged;
            diagramNodeViewModel.ShowRelatedNodesRequested    += OnShowRelatedNodesRequested;
            diagramNodeViewModel.RelatedNodeSelectorRequested += OnEntitySelectorRequested;
            diagramNodeViewModel.RemoveRequested += OnRemoveDiagramNodeRequested;

            _diagramNodeToViewModelMap.Set(diagramNode.Id, diagramNodeViewModel);
            DiagramNodeViewModels.Add(diagramNodeViewModel);
        }