コード例 #1
0
        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);
        }
コード例 #2
0
        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);
        }