GetFileData() public method

public GetFileData ( string path ) : FileData
path string
return FileData
コード例 #1
0
        public FileData GetSelectedFileData(string selected)
        {
            string[] path = selected.Split('\\');
            if (path.Length <= 2)
            {
                return(null);
            }

            Module     module = mModules[path[0]];
            ModuleFile file   = module.GetModuleFile(path[1], path[2]);

            if (file != null)
            {
                return(file.GetFileData(path));
            }

            return(null);
        }
コード例 #2
0
        public FileData GetSelectedFileData(string selected)
        {
            // FullPath is a property of treeviews that consists of the labels of all of the
            // tree nodes that must be navigated to reach the selected tree node
            string[] path = selected.Split(Path.DirectorySeparatorChar, Path.AltDirectorySeparatorChar);

            if (path.Length <= 2 || !mModules.ContainsKey(path[0]))
            {
                return(null);
            }

            Module     module = mModules[path[0]];
            ModuleFile file   = module.GetModuleFile(path[1], path[2]);

            if (file != null)
            {
                return(file.GetFileData(path));
            }

            return(null);
        }