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); }
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); }