public SearchEngine( EventReactor eventReactor, IFileIndexer indexer, IIndexEjector indexEjector, IFileSupervisor supervisor, ISearcher searcher, IScheduler scheduler) { _indexer = indexer; _indexEjector = indexEjector; _supervisor = supervisor; _searcher = searcher; _scheduler = scheduler; eventReactor.Register(EngineEvent.PathWatchingStarted, a => PathWatchingStarted?.Invoke(a)); eventReactor.Register(EngineEvent.PathWatchingEnded, a => PathWatchingEnded?.Invoke(a)); eventReactor.Register(EngineEvent.FileIndexingStarted, a => FileIndexingStarted?.Invoke(a)); eventReactor.Register(EngineEvent.FileIndexingEnded, a => FileIndexingEnded?.Invoke(a)); eventReactor.Register(EngineEvent.FileRemovingStarted, a => FileRemovingStarted?.Invoke(a)); eventReactor.Register(EngineEvent.FileRemovingEnded, a => FileRemovingEnded?.Invoke(a)); eventReactor.Register(EngineEvent.FileUpdateInitiated, a => FileUpdateInitiated?.Invoke(a)); eventReactor.Register(EngineEvent.FileUpdateFailed, a => FileUpdateFailed?.Invoke(a)); eventReactor.Register(EngineEvent.PathChanged, a => FilePathChanged?.Invoke(a)); eventReactor.Register(EngineEvent.IndexCleanUpFailed, a => IndexCleanUpFailed?.Invoke(a)); _scheduler.Start(); }
private void metroTextBox1_TextChanged(object sender, EventArgs e) { FilePathChanged?.Invoke(this, e); }