|
|
@ -85,7 +85,6 @@ namespace fileFinder |
|
|
|
{ |
|
|
|
MessageBox.Show(ex.Message, "Ошибка поиска внутри файла!"); |
|
|
|
} |
|
|
|
|
|
|
|
_report.progress = counter; |
|
|
|
_report.currentFileUrl = item; |
|
|
|
report.Report(_report); |
|
|
@ -128,11 +127,21 @@ namespace fileFinder |
|
|
|
|
|
|
|
private async void handleSearchBtn_Click(object sender, EventArgs e) |
|
|
|
{ |
|
|
|
Progress<ProgressReportModel> progress = new Progress<ProgressReportModel>(); |
|
|
|
progress.ProgressChanged += reportProgress; |
|
|
|
TreeNode tN = await Task.Run(() => buildResultTree(mainController, progress)); |
|
|
|
resultViewer.Nodes.Clear(); |
|
|
|
resultViewer.Nodes.Add(tN); |
|
|
|
if (mainController.isStopped) |
|
|
|
{ |
|
|
|
mainController.beginTask(); |
|
|
|
Progress<ProgressReportModel> progress = new Progress<ProgressReportModel>(); |
|
|
|
progress.ProgressChanged += reportProgress; |
|
|
|
TreeNode tN = await Task.Run(() => buildResultTree(mainController, progress)); |
|
|
|
resultViewer.Nodes.Clear(); |
|
|
|
resultViewer.Nodes.Add(tN); |
|
|
|
} else if (mainController.isPaused) |
|
|
|
{ |
|
|
|
mainController.resumeTask(); |
|
|
|
} else |
|
|
|
{ |
|
|
|
mainController.pauseTask(); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
public async Task fillChildNode (TreeNode node, String item) |
|
|
|