public void ObjectFilter(IMap SelectedMap) { BasPathList.Clear(); foreach (var ch in SelectedMap.BasPaths.BasFilePathList) { BasPathList.Add(ch); } FilePathList.Clear(); var srcpath = new FileInfo() { Path = SelectedMap.SrcPath, Type = "Source", }; var tgtpath = new FileInfo() { Path = SelectedMap.TrgtPath, Type = "Target", }; var Mappath = new FileInfo() { Path = SelectedMap.MapPath, Type = "Map", }; FilePathList.Add(srcpath); FilePathList.Add(tgtpath); FilePathList.Add(Mappath); }
public override void AddFilePathsToList(string[] files, string rootDir) { foreach (string file in files) { try { var fileInfo = new FileInfo(file); FilePathList.Add(fileInfo.FullName.Replace(rootDir, "")); Console.Write("\r found files {0} ...", FilePathList.Count); } catch (FileNotFoundException ex) { Console.WriteLine(ex.Message); } } }
public override void AddFilePathsToList(string[] files, string rootDir) { foreach (string file in files) { try { var fileInfo = new FileInfo(file); if (fileInfo.Extension.Equals(_fileExtention)) { _stringBuilder.Clear(); _stringBuilder.AppendFormat("{0} /", fileInfo.FullName.Replace(rootDir, "")); FilePathList.Add(_stringBuilder.ToString()); Console.Write("\r found files {0} ...", FilePathList.Count); } } catch (FileNotFoundException ex) { Console.WriteLine(ex.Message); } } }