public DiagramViewModel( [NotNull] IModelEventSource modelEventSource, [NotNull] IDiagramEventSource diagramEventSource, [NotNull] IDiagramViewportUi diagramViewportUi, [NotNull] IRelatedNodeItemViewModelFactory relatedNodeItemViewModelFactory, [NotNull] IComparer <IModelNode> modelNodeComparer) : base(modelEventSource, diagramEventSource) { _relatedNodeItemViewModelFactory = relatedNodeItemViewModelFactory; _modelNodeComparer = modelNodeComparer; DiagramViewportViewModel = (DiagramViewportViewModel)diagramViewportUi; RelatedNodeListBoxViewModel = new RelatedNodeListBoxViewModel(ModelEventSource, DiagramEventSource); RelatedNodeListBoxViewModel.ItemSelected += OnRelatedNodeSelected; RelatedNodeListBoxViewModel.Items.CollectionChanged += OnRelatedNodeCollectionChanged; PopupTextViewModel = new AutoHidePopupTextViewModel(); PreviewMouseDownCommand = new DelegateCommand(OnAnyMouseDownEvent); MouseDownCommand = new DelegateCommand(OnUnhandledMouseDownEvent); DiagramEventSource.DiagramChanged += OnDiagramChanged; SubscribeToViewportEvents(); _lastDiagram = DiagramEventSource.LatestDiagram; }
public RoslynDiagramViewModel( [NotNull] IModelEventSource modelEventSource, [NotNull] IDiagramEventSource diagramEventSource, [NotNull] IDiagramViewportUi diagramViewportUi) : base(modelEventSource, diagramEventSource, diagramViewportUi) { _roslynDiagramViewportViewModel = (RoslynDiagramViewportViewModel)diagramViewportUi; }
public RoslynDiagramViewModel( [NotNull] IModelEventSource modelEventSource, [NotNull] IDiagramEventSource diagramEventSource, [NotNull] IDiagramViewportUi diagramViewportUi, [NotNull] IRelatedNodeItemViewModelFactory relatedNodeItemViewModelFactory, [NotNull] IComparer <IModelNode> modelNodeComparer) : base(modelEventSource, diagramEventSource, diagramViewportUi, relatedNodeItemViewModelFactory, modelNodeComparer) { _roslynDiagramViewportViewModel = (RoslynDiagramViewportViewModel)diagramViewportUi; }