/// <summary>
        /// Add nested children.
        /// </summary>
        /// <param name="con"></param>
        protected override void OnNestedChildShapeElementAdded(NodeShapeReferencesNestedChildren con)
        {
            DomainClassInfo info = con.ChildShape.GetDomainClass();
            if (info.Id != NodeShape.DomainClassId)
            {
                DiagramItemElementViewModel elementVM = this.ViewModelStore.Factory.CreateDiagramItemViewModel(
                    info.Id, this.Diagram, con.ChildShape);

                if (elementVM != null)
                {
                    this.Diagram.AddElement(elementVM);
                    return;
                }
            }

            GraphicalDependencyItemViewModel vm = new GraphicalDependencyItemViewModel(
                                    this.ViewModelStore, this.Diagram, con.ChildShape);
            this.Diagram.AddElement(vm);
        }
Exemplo n.º 2
0
        /// <summary>
        /// Add nested children.
        /// </summary>
        /// <param name="con"></param>
        protected override void OnNestedChildShapeElementAdded(NodeShapeReferencesNestedChildren con)
        {
            DomainClassInfo info = con.ChildShape.GetDomainClass();

            if (info.Id != NodeShape.DomainClassId)
            {
                DiagramItemElementViewModel elementVM = this.ViewModelStore.Factory.CreateDiagramItemViewModel(
                    info.Id, this.Diagram, con.ChildShape);

                if (elementVM != null)
                {
                    this.Diagram.AddElement(elementVM);
                    return;
                }
            }

            GraphicalDependencyItemViewModel vm = new GraphicalDependencyItemViewModel(
                this.ViewModelStore, this.Diagram, con.ChildShape);

            this.Diagram.AddElement(vm);
        }
Exemplo n.º 3
0
        public override void OnChildShapeElementAdded(DiagramHasChildren con, DiagramSurfaceViewModel diagVm)
        {
            if (IsDisplayingNodeShape(con.ChildShape))
            {
                return;
            }

            if (con.ChildShape is GraphicalDependencyShape)
            {
                GraphicalDependencyHostViewModel vm = new GraphicalDependencyHostViewModel(
                    this.ViewModelStore, this, con.ChildShape as GraphicalDependencyShape);
                diagVm.AddElement(vm);
            }
            else if (con.ChildShape is GraphicalDependencyMainShape)
            {
                GraphicalDependencyMainItemViewModel vm = new GraphicalDependencyMainItemViewModel(
                    this.ViewModelStore, this, con.ChildShape as GraphicalDependencyMainShape);
                diagVm.AddElement(vm);
            }
            else
            {
                DomainClassInfo info = con.ChildShape.GetDomainClass();
                if (info.Id != NodeShape.DomainClassId)
                {
                    DiagramItemElementViewModel elementVM = this.ViewModelStore.Factory.CreateDiagramItemViewModel(
                        info.Id, this, con.ChildShape);

                    if (elementVM != null)
                    {
                        diagVm.AddElement(elementVM);
                        return;
                    }
                }

                GraphicalDependencyItemViewModel vm = new GraphicalDependencyItemViewModel(
                    this.ViewModelStore, this, con.ChildShape);
                diagVm.AddElement(vm);
            }
        }