static void GrepFileChanged(object sender, GrepFileChangeEventArgs e) { lock (_updatelock) { Debug.WriteLine(string.Format("Scanning File: {0}", e.FilePath)); } }
void GrepFileChanged(object sender, GrepFileChangeEventArgs e) { SetCursor(this, Cursors.WaitCursor); lock (_updatelock) { SetText(txtCurFile, e.FilePath); } }
static void GrepFileHasMatch(object sender, GrepFileChangeEventArgs e) { lock (_updatelock) { _totalFileMatches++; var line = string.Format("{0}{1}\r\n", e.FilePath, _fileNamesOnly ? null : ":"); Console.WriteLine(line); } }
void _grepWorker_GrepFileHasMatch(object sender, GrepFileChangeEventArgs e) { lock (_updatelock) { _totalFileMatches++; var fileNamesOnly = GetChecked(ckJustFiles); var showLineNum = GetChecked(ckLineNumbers); var showLineCount = fileNamesOnly ? false : GetChecked(ckCountLines); var grepResult = new GrepResult(e.FilePath, fileNamesOnly, showLineNum, showLineCount); AddListBoxItem(lbResults, grepResult); } }