Exemplo n.º 1
0
 static void GrepFileChanged(object sender, GrepFileChangeEventArgs e)
 {
     lock (_updatelock)
     {
         Debug.WriteLine(string.Format("Scanning File: {0}", e.FilePath));
     }
 }
Exemplo n.º 2
0
 void GrepFileChanged(object sender, GrepFileChangeEventArgs e)
 {
     SetCursor(this, Cursors.WaitCursor);
     lock (_updatelock)
     {
         SetText(txtCurFile, e.FilePath);
     }
 }
Exemplo n.º 3
0
 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);
     }
 }
Exemplo n.º 4
0
 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);
     }
 }