Inheritance: MFTreeNodeBase
Beispiel #1
0
        protected void AddFileList(CollectionWrapper <BuildFileWrapper, MFBuildFile> source_list, string path)
        {
            List <string> unicue_path_list = new List <string>();

            foreach (BuildFileWrapper source_file in source_list)
            {
                string text = ExpandPath(source_file.File);

                if (!File.Exists(text))
                {
                    text = Path.GetFullPath(text);
                }
                if (!File.Exists(text))
                {
                    text = Path.GetFullPath(ExpandPath(Path.GetDirectoryName(path) + "\\" + ExpandPath(source_file.File)));
                }
                if (!File.Exists(text))
                {
                }

                if (!unicue_path_list.Contains(text))
                {
                    source_file.FullPath = text;
                    unicue_path_list.Add(text);
                    MFTreeNodeBase SourceNode = new MFSourceFileTreeNode(source_file);//this.NewNode(Path.GetFileName(source_file.File), MFTreeNodeBase.TreeNodeType.SourceFile, source_file, key);
                    this.Nodes.Add(SourceNode);
                }
                else
                {
                }
            }
        }
        protected void AddFileList(CollectionWrapper<BuildFileWrapper, MFBuildFile> source_list, string path)
        {
            List<string> unicue_path_list = new List<string>();

            foreach (BuildFileWrapper source_file in source_list)
            {

                string text = ExpandPath(source_file.File);

                if (!File.Exists(text))
                {
                    text = Path.GetFullPath(text);
                }
                if (!File.Exists(text))
                {
                    text = Path.GetFullPath(ExpandPath(Path.GetDirectoryName(path) + "\\" + ExpandPath(source_file.File)));
                }
                if (!File.Exists(text))
                {
                }

                if (!unicue_path_list.Contains(text))
                {
                    source_file.FullPath = text;
                    unicue_path_list.Add(text);
                    MFTreeNodeBase SourceNode = new MFSourceFileTreeNode(source_file);//this.NewNode(Path.GetFileName(source_file.File), MFTreeNodeBase.TreeNodeType.SourceFile, source_file, key);
                    this.Nodes.Add(SourceNode);
                }
                else
                {

                }
            }
        }