コード例 #1
0
 public void ClearFiles()
 {
     Files.Clear();
     ProcessedFiles.Clear();
     FileCount       = 0;
     DroppedFileSize = 0d;
     UploadFileSize  = 0d;
 }
コード例 #2
0
        /// <summary>
        /// Clear the processing list and process the files that are queued
        /// </summary>
        public virtual void ClearProcessedList()
        {
            if (!CurrentlyProcessing && ProcessedFiles.Count > 0)
            {
                //We are now processing
                CurrentlyProcessing = true;

                Console.WriteLine("{0} : Clearing the List", DateTime.Now);
                ProcessedFiles.Clear();
                Console.WriteLine("{0} : Cleared the List", DateTime.Now);

                //Finished Processing
                CurrentlyProcessing = false;

                if (ToBeProcessed.Count > 0)
                {
                    Console.WriteLine("{0} : Copying files that have had changes since the last copy", DateTime.Now);
                    ToBeProcessed.ForEach(x => OnChanged(new object(), new FileSystemEventArgs(WatcherChangeTypes.Changed, WatchLocation, x.ToString(CultureInfo.DefaultThreadCurrentUICulture))));
                    ToBeProcessed.Clear();
                }
            }
        }