private void btnSearch_Click(object sender, EventArgs e) { GUIController.UpdateStopConButtonEnabled(true); GUIController.UpdateStopConButtonText("Pause"); threadJob.Start(treeView, txtPath.Text, txtFileName.Text); timerSearch.Start(); SaveSettings(); }
private void timerSearch_Tick(object sender, EventArgs e) { threadJob.ThreadTimeWork(); if (threadJob.ThreadCurrentState() == System.Threading.ThreadState.Stopped) { timerSearch.Stop(); GUIController.UpdateStopConButtonEnabled(false); MessageBox.Show("Поиск завершен"); } }