Exemple #1
0
        public override void ElementDeleting(ElementDeletingEventArgs e)
        {
            if (e.ModelElement.Store.InSerializationTransaction)
            {
                return;
            }

            if (e.ModelElement is MarriedToShape)
            {
                MarriedToShape shape = e.ModelElement as MarriedToShape;
                DiagramLayouter.Layout(shape.Diagram);
            }
            else
            {
                ParentOfShape shape = e.ModelElement as ParentOfShape;
                DiagramLayouter.Layout(shape.Diagram);
            }
        }
Exemple #2
0
        public override void ElementAdded(Microsoft.VisualStudio.Modeling.ElementAddedEventArgs e)
        {
            if (e.ModelElement.Store.InSerializationTransaction)
            {
                return;
            }

            if (e.ModelElement is MarriedToShape)
            {
                MarriedToShape shape = e.ModelElement as MarriedToShape;
                DiagramLayouter.Layout(shape.Diagram);
            }
            else
            {
                ParentOfShape shape = e.ModelElement as ParentOfShape;
                DiagramLayouter.Layout(shape.Diagram);
            }
        }