public Form1() { InitializeComponent(); _bgWorker = new BackgroundWorker(); _bgWorker.WorkerReportsProgress = true; _bgWorker.DoWork += _bgWorker_DoWork; _bgWorker.ProgressChanged += _bgWorker_ProgressChanged; _bgWorker.RunWorkerCompleted += _bgWorker_RunWorkerCompleted; _indexHelper = new IndexHelper(Config.IndexFolder, Config.TextFilesFolder); _indexHelper.HasLog += ShowLog; _indexHelper.OnProgressChanged += (percent) => { _bgWorker.ReportProgress(percent); }; _searchHelper = new SearchHelper(Config.IndexFolder); _searchHelper.HasLog += ShowLog; }
public static void CreateIndex(this IndexHelper indexHelper) { indexHelper.CreateIndex(new PanGuAnalyzer()); }