Exemplo n.º 1
0
        private bool formationPathExistsInModel(string path, ITreeNode model)
        {
            string formationName  = getDirectoryName(path);
            string areaChildName  = getDirectoryName(path, numberDirectoriesUp: 1);
            string areaParentName = getDirectoryName(path, numberDirectoriesUp: 2);

            ParentRegion parentArea = new ParentRegion(areaParentName);

            if (model.ContainsChild(parentArea))
            {
                parentArea = (ParentRegion)model.GetChild(parentArea);
                if (parentArea.ContainsChildRegion(areaChildName))
                {
                    ChildRegion childRegion = parentArea.GetChildRegion(areaChildName);
                    return(childRegion.ContainsFormation(formationName));
                }
            }
            return(false);
        }
Exemplo n.º 2
0
        public ChildRegion GetChildRegion(string name)
        {
            ChildRegion childRegion = new ChildRegion(name);

            return(GetChild(childRegion) as ChildRegion);
        }
Exemplo n.º 3
0
        public bool ContainsChildRegion(string name)
        {
            ChildRegion childRegion = new ChildRegion(name);

            return(ContainsChild(childRegion));
        }