public DiagramShapeViewModelFactory(
     [NotNull] IModelEventSource modelEventSource,
     [NotNull] IDiagramEventSource diagramEventSource,
     [NotNull] IRelatedNodeTypeProvider relatedNodeTypeProvider)
 {
     ModelEventSource        = modelEventSource;
     DiagramEventSource      = diagramEventSource;
     RelatedNodeTypeProvider = relatedNodeTypeProvider;
 }
Ejemplo n.º 2
0
 public MiniButtonViewModelFactory(
     [NotNull] IModelEventSource modelEventSource,
     [NotNull] IDiagramEventSource diagramEventSource,
     [NotNull] IRelatedNodeTypeProvider relatedNodeTypeProvider)
 {
     _modelEventSource        = modelEventSource;
     _diagramEventSource      = diagramEventSource;
     _relatedNodeTypeProvider = relatedNodeTypeProvider;
 }
Ejemplo n.º 3
0
 public RoslynDiagramShapeViewModelFactory(
     [NotNull] IModelEventSource modelEventSource,
     [NotNull] IDiagramEventSource diagramEventSource,
     [NotNull] IRelatedNodeTypeProvider relatedNodeTypeProvider,
     bool isDescriptionVisible)
     : base(modelEventSource, diagramEventSource, relatedNodeTypeProvider)
 {
     IsDescriptionVisible = isDescriptionVisible;
 }
Ejemplo n.º 4
0
        public IUiService Create(
            IModelService modelService,
            IDiagramService diagramService,
            IRelatedNodeTypeProvider relatedNodeTypeProvider,
            double minZoom,
            double maxZoom,
            double initialZoom)
        {
            var diagramShapeUiFactory = new DiagramShapeUiFactory(relatedNodeTypeProvider);

            var diagramViewModel = new DiagramViewModel(modelService, diagramService, diagramShapeUiFactory, minZoom, maxZoom, initialZoom);

            return(new WpfUiService(diagramViewModel));
        }
Ejemplo n.º 5
0
        public DiagramNodeViewModel(
            [NotNull] IModelEventSource modelEventSource,
            [NotNull] IDiagramEventSource diagramEventSource,
            [NotNull] IDiagramNode diagramNode,
            [NotNull] IRelatedNodeTypeProvider relatedNodeTypeProvider,
            [NotNull] IWpfFocusTracker <IDiagramShapeUi> focusTracker,
            [NotNull] IDiagramNodeHeaderUi header)
            : base(modelEventSource, diagramEventSource, diagramNode)
        {
            RelatedNodeTypeProvider  = relatedNodeTypeProvider;
            FocusTracker             = focusTracker;
            RelatedNodeCueViewModels = CreateRelatedNodeCueViewModels();
            Header = header;

            SetDiagramNodeProperties(diagramNode);
        }
Ejemplo n.º 6
0
        public DiagramNodeViewModel(
            [NotNull] IModelService modelService,
            [NotNull] IDiagramService diagramService,
            [NotNull] IRelatedNodeTypeProvider relatedNodeTypeProvider,
            [NotNull] IFocusTracker <IDiagramShapeUi> focusTracker,
            [NotNull] IDiagramNode diagramNode)
            : base(modelService, diagramService, diagramNode)
        {
            PopulateFromDiagramNode(diagramNode);
            // Must NOT populate size from model because its value flows from the controls to the models.

            RelatedNodeTypeProvider  = relatedNodeTypeProvider;
            FocusTracker             = (IWpfFocusTracker <IDiagramShapeUi>)focusTracker;
            RelatedNodeCueViewModels = CreateRelatedNodeCueViewModels();

            DiagramService.DiagramChanged += OnDiagramChanged;
        }
Ejemplo n.º 7
0
        public DiagramNodeViewModel(
            IModelService modelService,
            IDiagramService diagramService,
            IRelatedNodeTypeProvider relatedNodeTypeProvider,
            IFocusTracker <IDiagramShapeUi> focusTracker,
            IDiagramNode diagramNode)
            : base(modelService, diagramService, diagramNode)
        {
            Name    = diagramNode.ModelNode.Name;
            Center  = diagramNode.Center.ToWpf();
            TopLeft = diagramNode.TopLeft.ToWpf();
            // Must NOT populate size from model because its value flows from the controls to the models.

            _relatedNodeTypeProvider = relatedNodeTypeProvider;
            FocusTracker             = (IWpfFocusTracker <IDiagramShapeUi>)focusTracker;
            RelatedNodeCueViewModels = CreateRelatedNodeCueViewModels();
            ChildNodes = new ThreadSafeObservableCollection <DiagramNodeViewModel>();

            DiagramService.DiagramChanged += OnDiagramChanged;
        }
Ejemplo n.º 8
0
        public VisualizationService(
            IModelServiceFactory modelServiceFactory,
            IDiagramServiceFactory diagramServiceFactory,
            IUiServiceFactory uiServiceFactory,
            IDiagramPluginFactory diagramPluginFactory,
            IRelatedNodeTypeProvider relatedNodeTypeProvider,
            IEnumerable <DiagramPluginId> diagramPluginIds)
        {
            ModelServiceFactory     = modelServiceFactory;
            DiagramServiceFactory   = diagramServiceFactory;
            UiServiceFactory        = uiServiceFactory;
            DiagramPluginFactory    = diagramPluginFactory;
            RelatedNodeTypeProvider = relatedNodeTypeProvider;
            DiagramPluginIds        = diagramPluginIds;

            ModelService     = ModelServiceFactory.Create();
            _diagramServices = new Dictionary <DiagramId, IDiagramService>();
            _diagramUis      = new Dictionary <DiagramId, IUiService>();
            _diagramPlugins  = new Dictionary <DiagramId, List <IDiagramPlugin> >();
        }
Ejemplo n.º 9
0
 public RoslynDiagramNodeViewModel(
     [NotNull] IModelEventSource modelEventSource,
     [NotNull] IDiagramEventSource diagramEventSource,
     [NotNull] IDiagramNode diagramNode,
     [NotNull] IRelatedNodeTypeProvider relatedNodeTypeProvider,
     [NotNull] IWpfFocusTracker <IDiagramShapeUi> focusTracker,
     bool isDescriptionVisible,
     [NotNull] ISymbol symbol,
     RoslynDiagramNodeHeaderViewModelBase header)
     : base(
         modelEventSource,
         diagramEventSource,
         diagramNode,
         relatedNodeTypeProvider,
         focusTracker,
         header)
 {
     _isDescriptionVisible = isDescriptionVisible;
     _symbol = symbol;
     Name    = symbol.GetName();
 }
Ejemplo n.º 10
0
 public DiagramShapeUiFactory([NotNull] IRelatedNodeTypeProvider relatedNodeTypeProvider)
 {
     RelatedNodeTypeProvider = relatedNodeTypeProvider;
 }
Ejemplo n.º 11
0
 public DiagramShapeUiFactory(IRelatedNodeTypeProvider relatedNodeTypeProvider)
 {
     _relatedNodeTypeProvider = relatedNodeTypeProvider;
 }