예제 #1
0
        static private void Coping()
        {
            Console.WriteLine("Копирование запущенно.");
            DateTimeSaveFile = new DateToXml(Settings.Settings[0].LastCopyDateTimeFilePath);
            LastCopyDateTime = DateTimeSaveFile.GetDataFromFile();

            NewFilesSearch      newFilesSearch = new NewFilesSearch();
            List <FilePathDate> newFiles       = newFilesSearch.GetFilesFromFolder(Settings.Settings[0].SourcePath, LastCopyDateTime);

            MoveFilesList = new MoveFilesList(Settings.Settings[0], newFiles)
            {
                Interval = 1
            };
            MoveFilesList?.MoveFiles();

            Console.WriteLine("Копирование файлов выполнено.");
        }
예제 #2
0
        private void CopingFilesToBuffer(object obj)
        {
            Settings set = obj as Settings;

            LogMessages.Log("Копирование запущенно.");
            DateToXml dtx = new DateToXml(set.LastCopyDateTimeFilePath);
            DateTime  lastCopyDateTime = dtx.GetDataFromFile();

            NewFilesSearch      newFilesSearch = new NewFilesSearch();
            List <FilePathDate> newFiles       = newFilesSearch.GetFilesFromFolder(set.SourcePath, lastCopyDateTime);

            MoveFilesList moveFilesList = new MoveFilesList(set, newFiles);

            MflDtx.Add(new ThreadsPack(moveFilesList, dtx));
            moveFilesList.MoveFiles();

            LogMessages.Log("Копирование файлов выполнено.");
        }