Beispiel #1
0
        public FormItem GetItemByName(string name)
        {
            foreach (var f in Contents.OfType <FormItem>())
            {
                if (f.Name == name)
                {
                    return(f);
                }
            }

            foreach (var g in Contents.OfType <FormGroup>())
            {
                FormItem formItem = g.GetItemByName(name);

                if (formItem != null)
                {
                    return(formItem);
                }
            }

            return(null);
        }
Beispiel #2
0
        public FormItem GetItem(string path)
        {
            foreach (var f in Contents.OfType <FormItem>())
            {
                if (f.Path == path)
                {
                    return(f);
                }
            }

            foreach (var g in Contents.OfType <FormGroup>())
            {
                FormItem formItem = g.GetItem(path);

                if (formItem != null)
                {
                    return(formItem);
                }
            }

            return(null);
        }