Пример #1
0
    public List <EditorControl> FindControls(string ctrlName)
    {
        FindControlByNameVisitor finder = new FindControlByNameVisitor();

        finder.name = ctrlName;
        if (rootCtrl != null)
        {
            rootCtrl.Traverse(finder);
        }
        return(finder.results);
    }
Пример #2
0
    public EditorControl FindControl(string ctrlName)
    {
        FindControlByNameVisitor finder = new FindControlByNameVisitor();

        finder.name = ctrlName;
        if (rootCtrl != null)
        {
            rootCtrl.Traverse(finder);
        }
        if (finder.results.Count > 0)
        {
            return(finder.results[0]);
        }
        return(null);
    }