//Constructor public MainController(Main forma) { historyController = new HistoryController(); loadedFilesController = new LoadedFilesController(historyController); //Watcher watcher.NotifyFilter = NotifyFilters.LastWrite | NotifyFilters.LastAccess | NotifyFilters.FileName; watcher.Filter = "*.*"; watcher.Changed += new FileSystemEventHandler(OnChanged); watcher.Created += new FileSystemEventHandler(OnChanged); watcher.Renamed += new RenamedEventHandler(OnRenamed); }
//Constructor public LoadedFilesController(HistoryController history) { loggerController = new LoggerController(); queueFiles = new BlockingCollection <FileInfo>(); historyController = history; //Reset _NUMBER_OF_THREADS = 0; _THREAD_CREATOR_RUNNING = false; _END_OF_ENC_DEC_THREADS = false; numberActiveThreads = 0; //Starting the logger thread new Thread(() => loggerController.PrintLog()).Start(); }