|
@@ -909,8 +909,8 @@ namespace PDFViewer
|
|
|
{
|
|
|
filePath = ComPDFKit.Controls.Helper.CommonHelper.GetExistedPathOrEmpty();
|
|
|
}
|
|
|
- string oldFilePath = pdfDoc.FilePath;
|
|
|
|
|
|
+ string oldFilePath = pdfDoc.FilePath;
|
|
|
if (!string.IsNullOrEmpty(filePath) && regularViewerControl.PdfViewControl != null)
|
|
|
{
|
|
|
if (oldFilePath.ToLower() == filePath.ToLower())
|
|
@@ -923,6 +923,21 @@ namespace PDFViewer
|
|
|
return;
|
|
|
}
|
|
|
|
|
|
+ if (CanSave)
|
|
|
+ {
|
|
|
+ string fileName = pdfDoc.FileName;
|
|
|
+ var message = fileName + " " + LanguageHelper.CommonManager.GetString("Warn_NotSave");
|
|
|
+ var result = MessageBox.Show(message, LanguageHelper.CommonManager.GetString("Caption_Warning"), MessageBoxButton.YesNoCancel, MessageBoxImage.Question);
|
|
|
+ if (result == MessageBoxResult.Yes)
|
|
|
+ {
|
|
|
+ SaveFile();
|
|
|
+ }
|
|
|
+ else if (result == MessageBoxResult.Cancel)
|
|
|
+ {
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
passwordViewer = new PDFViewControl();
|
|
|
passwordViewer.InitDocument(filePath);
|
|
|
CPDFViewer tempViewer = passwordViewer.PDFViewTool?.GetCPDFViewer();
|