Exemple #1
0
        public RelatedNodeMiniButtonViewModel(IModelService modelService, IDiagramService diagramService,
                                              RelatedNodeType relatedNodeType)
            : base(modelService, diagramService, relatedNodeType.Name)
        {
            _directedModelRelationshipType = relatedNodeType.RelationshipType;
            ConnectorType = diagramService.GetConnectorType(relatedNodeType.RelationshipType.Stereotype);

            _lastModel   = modelService.Model;
            _lastDiagram = diagramService.Diagram;

            ModelService.ModelChanged     += OnModelChanged;
            DiagramService.DiagramChanged += OnDiagramChanged;
        }
Exemple #2
0
        public RelatedNodeMiniButtonViewModel(
            IModelEventSource modelEventSource,
            IDiagramEventSource diagramEventSource,
            RelatedNodeType relatedNodeType)
            : base(modelEventSource, diagramEventSource, relatedNodeType.Name)
        {
            DirectedModelRelationshipType = relatedNodeType.RelationshipType;

            _lastModel   = modelEventSource.LatestModel;
            _lastDiagram = diagramEventSource.LatestDiagram;

            ModelEventSource.ModelChanged     += OnModelChanged;
            DiagramEventSource.DiagramChanged += OnDiagramChanged;
        }
        public RelatedNodeCueViewModel(IModelService modelService, IDiagramService diagramService,
                                       IDiagramNode diagramNode, RelatedNodeType relatedNodeType)
            : base(modelService, diagramService)
        {
            _diagramNode = diagramNode;
            _directedModelRelationshipType = relatedNodeType.RelationshipType;

            _lastModel   = modelService.LatestModel;
            _lastDiagram = diagramService.LatestDiagram;

            ModelService.ModelChanged     += OnModelChanged;
            DiagramService.DiagramChanged += OnDiagramChanged;

            UpdateVisibility();
        }