private void GroupShapeAdded(IGroupShapesContainer container, IGroupShape groupShape) { if (groupShape?.Identity is ITrustBoundary trustBoundary) { HandleGroupShapeEvent(trustBoundary); } }
private void GroupShapeRemoved(IGroupShapesContainer container, IGroup group) { if (group is ITrustBoundary trustBoundary) { HandleGroupShapeEvent(trustBoundary); } }
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); }