//        public void Print()
//        {
//            try
//            {
//                PdfSharp.Pdf.PdfDocument x;
//                PdfFilePrinter y = new PdfFilePrinter(_pathToCurrentlyDisplayedPdf);
//                PdfFilePrinter.AdobeReaderPath =
//                y.Print();
//            }
//            catch(Exception e)
//            {
//                ErrorReport.NotifyUserOfProblem(e, "Could not print");
//            }
//        }

        public void SetLayoutMethod(LayoutMethod method)
        {
            SelectedMethod = method;
            if (HaveIncomingPdf)
            {
                // Handle NullLayoutMethod the same as the others to allow testing crop marks.
                _view.ClearThenContinue(ContinueConversionAndNavigation);
            }
            if (!string.IsNullOrEmpty(_incomingPath) && Settings.Default.PreviousIncomingPath != _incomingPath)
            {
                Settings.Default.PreviousIncomingPath = _incomingPath;
                Settings.Default.Save();
            }
            _view.UpdateDisplay();
        }
Exemple #2
0
//        public void Print()
//        {
//            try
//            {
//                PdfSharp.Pdf.PdfDocument x;
//                PdfFilePrinter y = new PdfFilePrinter(_pathToCurrentlyDisplayedPdf);
//                PdfFilePrinter.AdobeReaderPath =
//                y.Print();
//            }
//            catch(Exception e)
//            {
//                ErrorReport.NotifyUserOfProblem(e, "Could not print");
//            }
//        }

        public void SetLayoutMethod(LayoutMethod method)
        {
            SelectedMethod = method;
            if (HaveIncomingPdf)
            {
                if (method is NullLayoutMethod)
                {
                    _pathToCurrentlyDisplayedPdf = _incomingPath;
                    _view.ClearThenContinue(() => _view.Navigate(_incomingPath));
                }
                else
                {
                    _view.ClearThenContinue(ContinueConversionAndNavigation);
                }
            }
            if (!string.IsNullOrEmpty(_incomingPath) && Settings.Default.PreviousIncomingPath != _incomingPath)
            {
                Settings.Default.PreviousIncomingPath = _incomingPath;
                Settings.Default.Save();
            }
            _view.UpdateDisplay();
        }