Example #1
0
 private void initialize()
 {
     Outputs  = new OutputCollection(NextModule);
     files    = new Queue <FileInfo>();
     printers = new PrinterManager(log);
     qLock    = new SpinLock();
 }
        // Initialization function, for use only in constructors. Used to eliminate duplication in the constructors, since they can't call one another while also invoking different base class constructors.
        private void initialize()
        {
            Outputs = new OutputCollection(NextModule);

            // Now, Set up the FileSystemWatcher, aside from Path and EnableRaisingEvents.

            fsw.IncludeSubdirectories = false;

            // Use the LastWrite filter so that we can (in theory) check once per file write and not have to loop to wait for the file to become available. That SHOULD mean that, in OnChanged, we simply check whether the file is available to open, yet, and if not, we wait for another event.
            fsw.NotifyFilter = NotifyFilters.FileName;

            // TODO Expose this option to the user.
            fsw.Filter = "*.jpg";

            fsw.Created += new FileSystemEventHandler(OnCreated);
            // TODO Handle other events - such as renamed files?
        }
Example #3
0
 private void initialize()
 {
     Outputs = new OutputCollection(NextModule);
 }
Example #4
0
 private void initialize()
 {
     Outputs = new OutputCollection(OutputNames);
 }