Exemplo n.º 1
0
        public void SetDirectory()
        {
            if (Directory.Exists(InfoData.DirectoryPath))
            {
                MVCDirectory.Clear();

                var mvc = new MVCDirectoryModel();
                mvc.DirctoryName = Path.GetFileName(InfoData.DirectoryPath);
                mvc.FullName = (InfoData.DirectoryPath);

                AddDirectory(InfoData.DirectoryPath, mvc);
                MVCDirectory.Add(mvc);
            }
        }
Exemplo n.º 2
0
        public void SetDirectory()
        {
            if (Directory.Exists(InfoData.DirectoryPath))
            {
                MVCDirectory.Clear();

                var mvc = new MVCDirectoryModel();
                mvc.DirctoryName = Path.GetFileName(InfoData.DirectoryPath);
                mvc.FullName     = (InfoData.DirectoryPath);

                AddDirectory(InfoData.DirectoryPath, mvc);
                MVCDirectory.Add(mvc);
            }
        }
Exemplo n.º 3
0
        private void AddDirectory(string dir, MVCDirectoryModel mvc)
        {
            var files = Directory.EnumerateDirectories(dir);
            foreach (var file in files)
            {
                if (!file.Contains(ModelName) && !file.Contains(ControllerName) && !file.Contains(ViewName)) continue;

                var child = new MVCDirectoryModel();
                child.DirctoryName = Path.GetFileName(file);
                child.FullName = file;
                mvc.Children.Add(child);

                AddDirectory(file, child);
            }
        }
Exemplo n.º 4
0
        private void AddDirectory(string dir, MVCDirectoryModel mvc)
        {
            var files = Directory.EnumerateDirectories(dir);

            foreach (var file in files)
            {
                if (!file.Contains(ModelName) && !file.Contains(ControllerName) && !file.Contains(ViewName))
                {
                    continue;
                }

                var child = new MVCDirectoryModel();
                child.DirctoryName = Path.GetFileName(file);
                child.FullName     = file;
                mvc.Children.Add(child);

                AddDirectory(file, child);
            }
        }