internal FilesSorterRenamerCommand(FilesSorterRenamerCommandRequest request)
 {
     _sourceFolderPath           = request.SourceFolderPath;
     _destinationFolderPath      = request.DestinationFolderPath;
     _sortingStrategy            = request.SortingStrategy;
     OnPercentageProgressChanged = x => { };
 }
        private void worker_DoWork(object sender, DoWorkEventArgs e)
        {
            var sourceFolderPath = "";
            var destFolderPath   = "";
            var sortingStrategy  = default(SortingStrategy);

            TxtSourceFolder.Dispatcher.Invoke(new Action(delegate {
                sourceFolderPath = TxtSourceFolder.Text;
            }));

            TxtDestinationFolder.Dispatcher.Invoke(new Action(delegate {
                destFolderPath = TxtDestinationFolder.Text;
            }));

            TxtDestinationFolder.Dispatcher.Invoke(new Action(delegate
            {
                sortingStrategy = (SortingStrategy)CmbSortingStrategy.SelectedValue;
            }));

            var filesSorterRenamerCommandRequest = new FilesSorterRenamerCommandRequest
            {
                SourceFolderPath      = sourceFolderPath,
                DestinationFolderPath = destFolderPath,
                SortingStrategy       = sortingStrategy
            };

            new FilesSorterRenamerCommand(filesSorterRenamerCommandRequest)
            {
                OnPercentageProgressChanged = x => ((BackgroundWorker)sender).ReportProgress(x)
            }.Execute();
        }