コード例 #1
0
        public async Task <bool> BeforeGoNext()
        {
            ViewModel.OutputFilePath = null;

            var outputFileName = GetDesiredOutputFileName();

            outputFileName = _dialogService.AskUserToSaveFile("Save output to a file",
                                                              $"{outputFileName}.pdf", new[] { "PDF files (*.pdf)|*.pdf" });
            if (outputFileName == null)
            {
                return(false);
            }


            if (!await _tuningBrowserViewPresenter.SavePdfReportAsync(outputFileName))
            {
                await _dialogService.InvalidOperationMessage("An error occurred during report create. Try to save a file to another folder or using another name (For example, with Latin symbols only).");

                return(false);
            }

            ViewModel.OutputFilePath = outputFileName;

            return(false);
        }