Exemple #1
0
        private void FileOpen()
        {
            var filename = _openFileDialogService.Show();

            if (!string.IsNullOrEmpty(filename))
            {
                _applicationState.ExcelFilename = filename;
                RunCloudCommand.RaiseCanExecuteChanged();
            }
        }
Exemple #2
0
        private void DoWork(object state)
        {
            var cancellationToken = ((CancellationTokenSource)state).Token;

            // Execute the process steps
            var step1 = new ExecuteExcelToCsvProcessStep(_eventAggregator, _logger, 1);

            step1.Run(cancellationToken);

            var step2 = new ExecuteCreateZipFileProcessStep(_eventAggregator, _logger, 2);

            step2.Run(cancellationToken);

            // Update the UI command state
            Dispatcher.CurrentDispatcher.Invoke(() =>
            {
                _isRunning = false;
                RunCloudCommand.RaiseCanExecuteChanged();
                CancelCommand.RaiseCanExecuteChanged();
                FileOpenCommand.RaiseCanExecuteChanged();
            });
        }