public Search(string SourcePath, CallBackSearchFolder callback, ShowMSGDelegate showmsg) { this._sourcepPath = SourcePath; this._callbackSearch = callback; this._show_msg_callback = showmsg; MakeDataTable(); }
private void StartSearch() { #region Start Search // Get SourcePath if (GetSourceFolder() == false) { return; } // // Clear ListView dtFiles.Clear(); // // If Search was canceled last time reset flag Search.CancelSearch = false; // if (CheckBoxSearchSubFolder.IsChecked == false) { // Search in New Thread CallBackSearchFolder cbSearch = new CallBackSearchFolder(BindAsync); ShowMSGDelegate shd = new ShowMSGDelegate(ShowMSG); Search sh = new Search(SourcePath, cbSearch, shd); ThreadStart ts = new ThreadStart(sh.SearchFolderNewThread); Thread t1 = new Thread(ts); t1.IsBackground = true; t1.Start(); // } else if (CheckBoxSearchSubFolder.IsChecked == true) { CallBackSearchFolder cbSearch = new CallBackSearchFolder(BindAsync); ProgressCurrentFile pcFile = new ProgressCurrentFile(ShowFoundCurrentFile); ShowMSGDelegate shd = new ShowMSGDelegate(ShowMSG); Search sh = new Search(SourcePath, cbSearch, pcFile, shd); ThreadStart ts = new ThreadStart(sh.SearchSubFolderNewThread); Thread t1 = new Thread(ts); t1.IsBackground = true; t1.Start(); } #endregion }