private void Start() { try { _optionSet.Parse(_args); } catch (OptionException optionException) { _out.WriteLine(ProgramName + ": "); _out.WriteLine(optionException.Message); _out.WriteLine("Try `" + ProgramName + " --help' for more information."); return; } if(_startWithDebuggerAttached) Debugger.Break(); if(_showHelpAndExit) { ShowHelp(); return; } // Main Functionality var finder = new Finder(_startingPath); foreach (var line in finder.FindRecursivly()) { _out.WriteLine(line); } }
private async void HandleSearchButtonClick() { var startingWithPath = pathSelectionTextBox.Text; _finder = new Finder(startingWithPath); biggestFilesListBox.DataSource = new List<FileInfoView>(); biggestFilesListBox.DoubleClick -= biggestFilesListBox_DoubleClick; SetActionButtonStateAbort();// todo: include abort/cancellation var result = await _finder.FindFilesRecursivelyAsync(); HandleSearchFinished(result); }
public void Find() { _finder = new Finder(_startingPath); _finder.FinalResult += HandleTaskFinished; new Thread(_finder.EventBasedFind).Start(); }