private void btnFind_Click(object sender, EventArgs e) { FindFileManager find = new FindFileManager(); find.AddCompletedStatusEventHandler(CompletedStatusEventHandler); find.AddUpdateStatusbarEventHandler(UpdateStatusbarEventHandler); find.AddUpdateStatusEventHandler(UpdateStatusEventHandler); FindFileArgs args = new FindFileArgs(); args.searchPath = txtFolderPath.Text; args.searchSubFolders = chkSearchSubfolders.Checked; args.extension = txtExtension.Text; args.findString = txtTextToFind.Text; Cursor = Cursors.WaitCursor; m_curState = STATE.BUSY; updateUI(); find.findFilesAsync(args); }
public void findFilesAsync(FindFileArgs args) { worker.RunWorkerAsync(args); }