Beispiel #1
0
        private ExportPdfParameters ShowSaveExportPdfDialog(IntPtr owner, ExportArguments pdfArguments, string filter, string initialPath = null, string title = null)
        {
            var exportPdfDialog = new ExportPDFDialog(pdfArguments);

            exportPdfDialog.ShowModal();

            var pdfParameters = exportPdfDialog.GetExportParameters();

            if (exportPdfDialog.DialogResult == true)
            {
                pdfParameters.FilePath = _shell.FileDialog().ShowSaveFileDialog(filter, initialPath, title);
                return(pdfParameters);
            }
            return(null);
        }
Beispiel #2
0
        protected override void Handle()
        {
            var projectService    = _projectServiceAccessor.GetProjectService();
            var lastLoadedProject = projectService.LoadedUnconfiguredProjects.LastOrDefault();

            var initialPath = lastLoadedProject != null?lastLoadedProject.GetProjectDirectory() : Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments);

            var file = _shell.FileDialog().ShowSaveFileDialog(Resources.WorkspaceFileFilter, initialPath, Resources.SaveWorkspaceAsTitle);

            if (file == null)
            {
                return;
            }

            SaveWorkspace(file).DoNotWait();
        }