|
@@ -1152,7 +1152,7 @@ namespace PDF_Office.ViewModels
|
|
|
|
|
|
|
|
|
|
|
|
- public bool saveAsFile(bool isApplyRedaction = false, bool isEraseRedaction = false)
|
|
|
+ public bool saveAsFile(Action RedactionAction=null)
|
|
|
{
|
|
|
var dlg = new Microsoft.Win32.SaveFileDialog();
|
|
|
dlg.Filter = Properties.Resources.OpenDialogFilter;
|
|
@@ -1160,22 +1160,27 @@ namespace PDF_Office.ViewModels
|
|
|
if (dlg.ShowDialog() == true && !string.IsNullOrEmpty(dlg.FileName))
|
|
|
{
|
|
|
bool result = false;
|
|
|
-
|
|
|
- if (isApplyRedaction)
|
|
|
+ if(RedactionAction!=null)
|
|
|
{
|
|
|
-
|
|
|
- try
|
|
|
- {
|
|
|
- PDFViewer.Document.ApplyRedaction();
|
|
|
- PDFViewer.Document.ReleasePages();
|
|
|
- PDFViewer.ReloadDocument();
|
|
|
- }
|
|
|
- catch { }
|
|
|
- }
|
|
|
- else if (isEraseRedaction)
|
|
|
- {
|
|
|
- EraseReadction();
|
|
|
+
|
|
|
+ RedactionAction.Invoke();
|
|
|
}
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
|
|
|
if (App.OpenedFileList.Contains(dlg.FileName))
|
|
|
{
|