Exemplo n.º 1
0
        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);
            }
        }
Exemplo n.º 2
0
        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);
        }
Exemplo n.º 3
0
 public void Find()
 {
     _finder = new Finder(_startingPath);
     _finder.FinalResult += HandleTaskFinished;
     new Thread(_finder.EventBasedFind).Start();
 }