public override void AddToTree(Shape s, bool allowAddOfSubpart) { //make s into an rcomponent for access to wrapper VisioShape shapeComponent = new VisioShape(Page) { Shape = s }; if (CheckBoxStateComponent.IsCheckBoxStateComponent(shapeComponent.Name)) { Children.Add(new CheckBoxStateComponent(Page, s)); }//TODO validate whether it's the right one }
public CheckBoxComponent(Page page, Shape shape) : base(page) { Shape = shape; foreach (int shapeIdentifier in shape.ContainerProperties.GetMemberShapes((int)VisContainerFlags.visContainerFlagsExcludeNested)) { Shape checkBoxComponent = page.Shapes.ItemFromID[shapeIdentifier]; if (CheckBoxStateComponent.IsCheckBoxStateComponent(checkBoxComponent.Name)) { CheckBoxStateComponent cbComponent = new CheckBoxStateComponent(page, checkBoxComponent); Children.Add(cbComponent); } } InitStyle(); }