private ControlMarkupCount FindControlWithMissingMarkup(IValidTreeControl node) { ControlMarkupCount missingMarkupControl = null; if (node is GeometricShapeWpfControl) { var geometricShapeControl = node as GeometricShapeWpfControl; int numberOfMissingMarkup = NumberOfMissingMarkupRequiredByControl(geometricShapeControl); if (numberOfMissingMarkup > 0) { return new ControlMarkupCount { GeometricShapeWpfControl = geometricShapeControl, MarkupCount = numberOfMissingMarkup } } ; } if (node.ChildControls != null) { foreach (var child in node.ChildControls) { missingMarkupControl = FindControlWithMissingMarkup(child); if (missingMarkupControl != null) { break; } } } return(missingMarkupControl); }
internal ControlMarkupCount FindControlWithMissingMarkup() { ControlMarkupCount missingMarkupControl = null; _unusedMarkup = new List <IMarkup>(Component.AimTemplateTree.Markup); foreach (var node in NodeControls) { missingMarkupControl = FindControlWithMissingMarkup(node); if (missingMarkupControl != null) { break; } } return(missingMarkupControl); }