예제 #1
0
 private void GroupShapeAdded(IGroupShapesContainer container, IGroupShape groupShape)
 {
     if (groupShape?.Identity is ITrustBoundary trustBoundary)
     {
         HandleGroupShapeEvent(trustBoundary);
     }
 }
예제 #2
0
 private void GroupShapeRemoved(IGroupShapesContainer container, IGroup group)
 {
     if (group is ITrustBoundary trustBoundary)
     {
         HandleGroupShapeEvent(trustBoundary);
     }
 }
예제 #3
0
        public IGroupShape Clone([NotNull] IGroupShapesContainer container)
        {
            GroupShape result = null;

            if (container is IThreatModelChild child && child.Model is IThreatModel model)
            {
                result = new GroupShape()
                {
                    _associatedId = _associatedId,
                    _model        = model,
                    _modelId      = model.Id,
                    Position      = new PointF(Position.X, Position.Y),
                    Size          = new SizeF(Size)
                };
                this.CloneProperties(result);

                container.Add(result);
            }

            return(result);
        }
 private void OnGroupShapeRemoved(IGroupShapesContainer arg1, IGroup arg2)
 {
     _groupShapeRemoved?.Invoke(arg1, arg2);
 }