Exemple #1
0
        public bool GetFiles <T>(FilesCollection <T> fc, bool preselect, FilePath <FileNameSimple> folder) where T : SheetNameInfo, new()
        {
            fc.Initialize();

            foreach (string file in
                     Directory.EnumerateFiles(folder.FullFilePath, "*.*",
                                              SearchOption.AllDirectories))
            {
                fc.Add(new FilePath <FileNameSimple>(file), preselect);
            }

            return(fc.SheetPdfs > 0);
        }
        public bool RenameFiles(FilesCollection <FileFinal> final)
        {
            FileInfo fi;

            string newPath;

            foreach (FileFinal tf in final.Files)
            {
                if (!tf.Selected)
                {
                    continue;
                }

                fi = new FileInfo(tf.FullFileRoute.FullFilePath);

                newPath = tf.FullFileRoute.FolderPath + "\\"
                          + tf.NewFileName;

                fi.MoveTo(newPath);
            }

            return(true);
        }